protected void onCreate()

in sample/app/src/main/java/com/twitter/serial/sample/MainActivity.java [35:56]


    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        fullNameView = findViewById(R.id.name);
        ageView = findViewById(R.id.age);
        findViewById(R.id.create_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                createPerson();
            }
        });

        if (savedInstanceState != null) {
            try {
                person = serial.fromByteArray(savedInstanceState.getByteArray(KEY_PERSON), Person.SERIALIZER);
                setTextViews();
            } catch (IOException | ClassNotFoundException e) {
                Log.d(TAG, "Person could not be deserialized", e);
            }
        }
    }