Thursday, March 27, 2014

android layout experts to help me look at the effect of how the layout


posts by qiuqingpo on 2013-10-11 13:55:17 Edit
Directly on the picture, the following four picture layout
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The bottom four pictures that do

Here you can achieve this effect almost
 android: layout_width = "match_parent" 
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />

android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />

android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />

android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />





Reply:
cited a floor guoyoulei520 reply:
the bottom of the four pictures you

Here you can achieve this effect almost
 android: layout_width = "match_parent" 
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />

android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />

android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />

android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: orientation = "horizontal">


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click1"
android: src = "@ drawable / ic_launcher" />


android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: onClick = "click2"
android: text = "11" />


Requires one to write it, there's no point in writing optimized
Reply:
LinearLayout and four TextView enough
TextView can also display image, using android: drawableLeft this property, on the left displays a text image.
Reply:
Oh, that four TextView on the line. Four sharing
Reply:
If I RelativeLayout layout right?
Reply:
references, 5th Floor qiuqingpo reply:
If I RelativeLayout layout right?

You can be sure, but I think this layout by sharing the good point is that layout_weight
....relativelayout do not have this property

No comments:

Post a Comment