FrameLayout display problems within the control switch
I want to implement a layout using FrameLayout EditText after clicking on a Button and a Button inside FrameLayout by changing attributes setVisibility () function to switch display. But time is running will not be prompted to create prompts java.lang.ClassCastException, meaning that the type conversion error but if I use two ImageButton to switch the display no problem at all. In this case two different controls to switch the display of the way with what is good.
<-! Baidu Button BEGIN -> more Share to: <-! Baidu Button END ->
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) -> Reply: Look code Reply:
Should be independent of the code, two ImageButton can switch the display, an EditText and Button will not work Reply: Since it is a "ClassCastException" exception, where the estimate is wrong inside your code. For example (ImageButton) findViewById (R.id.editor) category mistake. Reply: Possibility upstairs that great! Reply:
You are so sure, but also to ask what? To see such a person to gas, self-righteous! Hundred percent sure that you code wrong, wrong? Write (ImageView), (Button) This code at several mandatory type conversionYou can not type conversion, directly call the parent class is View the setVisibility way! Reply:
Code look
Should be independent of the code, two ImageButton can switch the display, an EditText and Button will not work
You are so sure, but also to ask what? To see such a person to gas, self-righteous! Hundred percent sure that you code wrong, wrong? Write (ImageView), (Button) This code at several mandatory type conversionYou can not type conversion, directly call the parent class is View the setVisibility way!
First, there is no code that mistake this is true, then there is no way I put that Button and EditText deleted in the configuration file have to re-add a bit on the baffling good.
But see what you are saying and I think you're opinionated!
No comments:
Post a Comment