Coder Social home page Coder Social logo

fragmentstateloss's Introduction

FragmentStateLoss

Demonstrates Fragment state loss

Screenshot

This app presents buttons, each of which will attempt to replace a big blue rectangle with a big red rectangle. The three different options are:

  • Don't allow state loss. This will crash the app because it will attempt to make the change after onSaveInstanceState().
  • Allow state loss. This will make the change, but you may lose state (more on that in a second).
  • No state loss. This will make the change in a way that will not cause state loss.

When allowing state loss, you can control whether or not state is lost using your device's developer options. If you turn on the "Don't Keep Activities" option, you will lose state after pressing the button.

If you turn on "Don't Keep Activities" and press the "no state loss" button, you will see that the FragmentManager properly retains its state.

fragmentstateloss's People

Contributors

bherbst avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.