In my application, I have 2 LinearLayout
's right above each other. Via a menu option, I want to be able to make the bottom one disappear, and have the top one drop down over the disappeared LinearLayout
.
The problem is, I have no idea on how to do this in Java.
It doesn't have to be animated, I want to hide the Layout
on return of another activity (the menu), in OnActivityResult
. The menu activity
sets a boolean
on which I check in OnActivityResult
, and according to it's value I determine if I need to hide or show the bottom Layout
:
// Only change value if it is different from what it was.
if(mUseVolumeButtonAsPTT != resultData.getBoolean("UseVolumeButtonAsPTT")){
mUseVolumeButtonAsPTT = resultData.getBoolean("UseVolumeButtonAsPTT");
if(!mUseVolumeButtonAsPTT){
// Hide lower LinearLayout.
} else {
// Show lower LinearLayout.
}
}
Can anybody give me a hint or a link on how I should do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…