How can Android use the app compat components automatically? -
recently i'm studying usage of appcompat support library , design support library. , met strange question(at least me) can't understand. in appcompat support library, there're several appcompat* components, such appcompatbutton, appcompatcheckbox... there's 1 same thing among these components - in official doc these components have such illustration,
this automatically used when use button in layouts. should need manually use class when writing custom views.
or this.
here come's question. since button isn't appcompatbutton, how can consider appcompatbutton when use button during xml or created in code? how work?
forgive cantonese english.
short brief on how appcomp decided class init - when using support library (appcompat) using support library widgets (e.g. android,support.v4.widget.button) ,the library use appropriate implementation based on android os. example ,if os support button use native implementation ,else use appcompat implementation. in other words ,it defers run time decide use.. assume automatically part..
Comments
Post a Comment