A layout file, there are a lot RelativeLayout, how to ensure that every one can select it, thank you
Such as title, thank you for your reply Reply: By ID ah Reply: In fact, not clear what the landlord said, a selected one do you mean? Reply: Do not understand what is meant by the landlord said Reply:
I've come to my view, how to get the view circulating in the RelativeLayout Thank you Reply:
You either use an array of these layout id save up, or to use reflection to get Reply: This is to achieve what function? Set ID to each relativeLayout Why can not it Reply:
reflectionHaha, saw a style TM, would like to practice your hand Want to know there is no one method can take to the view of all controls, if not, then I had to find one plus Reply: Your outermost layer should be a FrameLayout, LinearLayout or RelativeLayout, add a LinearLayout, It can be used to traverse the sub-View method:
LayoutInflater layout = LayoutInflater.from (this); LinearLayout parentView = layout.inflate (R.layout.frame_setting, null); for (int i = 0; parentView.getChildCount (); + + i) { / / Here is the landlord required childView one of RelativeLayout View childView = view.getChildAt (i); }
Reply:
Your outermost layer should be a FrameLayout, LinearLayout or RelativeLayout, add a LinearLayout, It can be used to traverse the sub-View method:
LayoutInflater layout = LayoutInflater.from (this); LinearLayout parentView = layout.inflate (R.layout.frame_setting, null); for (int i = 0; parentView.getChildCount (); + + i) { / / Here is the landlord required childView one of RelativeLayout View childView = view.getChildAt (i); }
Due to the current activity is another loaded my layout, so I put up not working? You may not Reply:
Your outermost layer should be a FrameLayout, LinearLayout or RelativeLayout, add a LinearLayout, It can be used to traverse the sub-View method:
LayoutInflater layout = LayoutInflater.from (this); LinearLayout parentView = layout.inflate (R.layout.frame_setting, null); for (int i = 0; parentView.getChildCount (); + + i) { / / Here is the landlord required childView one of RelativeLayout View childView = view.getChildAt (i); }
Due to the current activity is another loaded my layout, so I put up not working? You can not
I can, what the other my layout? Reply:
Your outermost layer should be a FrameLayout, LinearLayout or RelativeLayout, add a LinearLayout, It can be used to traverse the sub-View method:
LayoutInflater layout = LayoutInflater.from (this); LinearLayout parentView = layout.inflate (R.layout.frame_setting, null); for (int i = 0; parentView.getChildCount (); + + i) { / / Here is the landlord required childView one of RelativeLayout View childView = view.getChildAt (i); }
Due to the current activity is another loaded my layout, so I put up not working? You can not
In a layout, it seems another layout also can not change the properties of a control in another display plus how to recover when the current layout? Reply:
Your outermost layer should be a FrameLayout, LinearLayout or RelativeLayout, add a LinearLayout, It can be used to traverse the sub-View method:
LayoutInflater layout = LayoutInflater.from (this); LinearLayout parentView = layout.inflate (R.layout.frame_setting, null); for (int i = 0; parentView.getChildCount (); + + i) { / / Here is the landlord required childView one of RelativeLayout View childView = view.getChildAt (i); }
Due to the current activity is another loaded my layout, so I put up not working? You can not
I can, what the other my layout?
Hardy hit a few words, is another layout file Reply: View view = layout.inflate (R.layout.frame_setting, null); This right can not be null. Because you want to add another layout above, it is added to specify the layout of LayoutParams. Reply:
View view = layout.inflate (R.layout.frame_setting, null); This right can not be null. Because you want to add another layout above, it is added to specify the layout of LayoutParams.
Can you be more specific, do not quite understand it Reply: Why in the same activity can not modify the properties of another layout file controls
No comments:
Post a Comment