Saturday, March 29, 2014

DrawerLayout coverage is the main interface navigation interface


posts by xiaoguohaha edited 2013-10-04 16:00:58
 
android: layout_width = "match_parent"
android: layout_height = "match_parent">
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: id = "@ + id / drawer_layout">








include first is the layout of the main interface, the latter two include the left and right navigation layout, but it is always open to display the last run of a navigation layout solving, statckflow seemingly no problem in this regard, and limited English proficiency, Official documents scanty.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Seeking unsinkable, seeking answers
Reply:
Before you do not include the entire layout is normal for you
Reply:
reference to the second floor minlee1121 reply:
you do not include the entire layout is normal before you

Not normal, has been covered

Reply:
left drawer need to define attributes android: layout_gravity = "start" and android: layout_width <320dp
Similarly right drawer requires android: layout_gravity = "end" and android: layout_width <320dp

Not tested circumstances include, the latter should be allowed to include these two properties directly with it?

You can try to define android in user_layout: layout_gravity = "right" and specify a width of less than 320dp,
module_layout same treatment ("start" pass "left", "end" pass "right")

Why should we include? For reuse? If for reuse, you can try

 android: layout_width = "match_parent" 
android: layout_height = "match_parent">
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: id = "@ + id / drawer_layout">


android: id = "@ + id / left_drawer"
android: layout_width = "240dp"
android: layout_height = "match_parent"
android: layout_gravity = "start">


android: id = "@ + id / right_drawer"
android: layout_width = "300dp"
android: layout_height = "match_parent"
android: layout_gravity = "end">





Also: did not see the necessity of the outermost RelativeLayout, you can take a look Lint proposal
Reply:
references, 4th Floor hutu_cn reply:
left drawer need to define attributes android: layout_gravity = "start" and android: layout_width <320dp
Similarly right drawer requires android: layout_gravity = "end" and android: layout_width <320dp

Not tested circumstances include, the latter should be allowed to include these two properties directly with it?

You can try to define android in user_layout: layout_gravity = "right" and specify a width of less than 320dp,
module_layout same treatment ("start" pass "left", "end" pass "right")

Why should we include? For reuse? If for reuse, you can try

 android: layout_width = "match_parent" 
android: layout_height = "match_parent">
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: id = "@ + id / drawer_layout">


android: id = "@ + id / left_drawer"
android: layout_width = "240dp"
android: layout_height = "match_parent"
android: layout_gravity = "start">


android: id = "@ + id / right_drawer"
android: layout_width = "300dp"
android: layout_height = "match_parent"
android: layout_gravity = "end">





Also: did not see the necessity of the outermost RelativeLayout, you can take a look Lint proposal


3q, resolved, relativelayout is the online reference code examples

No comments:

Post a Comment