Wednesday, March 5, 2014

Neighborhoods android layout and controls refresh problem


Brother built a layout file, the layout defines a last look two gridview, above that gridview need to set gone and visible in the code in the operation, then you have problems, because gone up less space, visible accounting space, so the implementation and operation of appearing to hide, to be re-layout each time, so the following gridview always blinks, just as every fall from above, because there are two gridview interaction, I want to be able in Under conditions do not solve the separation and maybe a gridview of this issue, there is no good solution, Great God help him find you, gratitude!! invisible is not flash, but I wrote this little thing is in systemui Lane, In the bottom of the desktop layout when floating on top of the desktop icons appear, there is a click event in gridview like Samsung seems to have a multi-window function, when the set is also invisible because of the space, the entire layout of the same height, will block behind Icons lead to less than a point ... when you set up gone, God has a way to solve this big problem? below gridview can set absolute coordinate it? neighborhoods ah<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
You can set absolute coordinates, but does not advocate, or use a relative layout bar, a GRIDVIEW on onparentTop, one on onBottom, so hidden which will not jump
Reply:
cited a floor mmorss reply:
can set absolute coordinates, but does not advocate, or use a relative layout bar, a GRIDVIEW on onparentTop, one on onBottom, so hidden which will not jump

Great God can specifically point it? OnparentTop / onBottom This is the attribute xml Why??
Reply:
Such ah

  
android: layout_width = "match_parent"
android: layout_height = "match_parent">

android: id = "@ + id/g1"
android: layout_width = "fill_parent"
android: layout_height = "50dp"
android: layout_above = "@ id/t1"
android: layout_alignParentTop = "true">


android: id = "@ + id/t1"
android: layout_centerVertical = "true"
android: layout_width = "fill_parent"
android: layout_height = "0dp" />

android: id = "@ + id/g2"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: layout_alignParentBottom = "true"
android: layout_below = "@ id/t1">





Reply:
reference to the third floor mmorss reply:
so ah

  
android: layout_width = "match_parent"
android: layout_height = "match_parent">

android: id = "@ + id/g1"
android: layout_width = "fill_parent"
android: layout_height = "50dp"
android: layout_above = "@ id/t1"
android: layout_alignParentTop = "true">


android: id = "@ + id/t1"
android: layout_centerVertical = "true"
android: layout_width = "fill_parent"
android: layout_height = "0dp" />

android: id = "@ + id/g2"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: layout_alignParentBottom = "true"
android: layout_below = "@ id/t1">




reference to the third floor mmorss reply:
so ah

  
android: layout_width = "match_parent"
android: layout_height = "match_parent">

android: id = "@ + id/g1"
android: layout_width = "fill_parent"
android: layout_height = "50dp"
android: layout_above = "@ id/t1"
android: layout_alignParentTop = "true">


android: id = "@ + id/t1"
android: layout_centerVertical = "true"
android: layout_width = "fill_parent"
android: layout_height = "0dp" />

android: id = "@ + id/g2"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: layout_alignParentBottom = "true"
android: layout_below = "@ id/t1">




After performing this coincidence of ...
Reply:
Quote: references to the 4th floor xc8501342 reply:

Is accounted for full-screen ...

Reply:
How much you want to put, set mostly in the relative placement on the line
Reply:
reference to the 6th floor mmorss reply:
how much you want to put, set mostly in the relative placement on the line

After this modification, when you set up and hide or will occur jitter , but better than the previous point ...
Reply:
reference to the 6th floor mmorss reply:
how much you want to put, set mostly in the relative placement on the line

Ask how to set absolute coordinate ...
Is set in the absolute control layout layout_x, layout_y it?
Reply:
LayoutParames.x and y, the specific own Baidu
Reply:
gridView.setvisibility (0) visible
gridView.setvisibility (4) is not occupying invisible
gridView.setvisibility (8) occupying invisible
The landlord can use this to try it

No comments:

Post a Comment