3. User interfaces
A special feature of Android UI construction is that it can be carried out either programmatically or declaratively.
A screen is the result of the organization of different containers, themselves made up of views arranged according to a chosen layout.
Example of the programmatic construction of a user interface (UI)
LinearLayout container = new LinearLayout(this);
container.setLayoutParams( new LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT );
container.setOrientation( LinearLayout.HORIZONTAL);
EditText editText = new EditText( this );
editText.setText( "Your name?" ) ;
container.addView( editText ) ;...
You do not have access to this resource.
Exclusive to subscribers. 97% yet to be discovered!
Already subscribed?
Log in!
Ongoing reading
User interfaces