Android layout pick up Shell + page Jump One, Android layout pick up the bay
These two days in the interface layout of the supplement (may be added in the future):
a), ScrollView
ScrollView (scrolling view) is a view that needs to be displayed by a scrolling axis when there is a lot of content and the screen is not displayed, ScrollView only supports vertical scrolling;
This view is a good choice when there are more columns at the bar level.
b), View
We want to divide a region into different sub-regions, and there is a distinct division between the regions (can be a split line, or it can be a certain height of the segmented area),
Then using <View/> is a good choice, using the example below:
<view
Android:layout_width= "Fill_parent"
android:layout_height= "20SP"//Set height, indicating the height of the grayscale area, the line character is rendered when the value is set to 1SP, the effect of delimiter
android:layout_margintop= "14SP"
android:background= "#fff7f7f7"/>
Second, page jump
In general, the implementation of page jumps, mainly consider the following several processes:
A), add a click event to the control
Scenario: There are two interfaces A, B, there is a button btn in interface A, you need to click BTN Jump to Interface B.
In a class that implements Activty (sometimes in order to differentiate between different controls, perhaps to implement Onclicklistener),
①, define a private Button Btntz = null;
②, in the OnCreate method, btntz= (Button) Findviewbyid (R.id.btntz); Gets the mapping object for the button;
③, Associate the button's Click event listener to the specific implementation method:
Btntz.setonclicklistener (this);
public void OnClick (View v) {//Some processing logic, then a specific jump}
Or
Btnclassspace.setonclicklistener (New Onclicklistener () {@Override public void oncli CK (View v) {//specific jump
} });
b), the specific jump
Intent Intent = new Intent (digitalschoolactivity.this,webviewactivty.class); Webviewmodel ViewModel = new Webviewmodel (title, Uri), Intent.putextra ("Webviewmodel", ViewModel); StartActivity ( Intent);
Java-android Study (fifth day)