android: id = "@ + id/toggleButton1" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: text = "ToggleButton" />
In the Activity starts, the default is to have a word switch "on / off", but I want to achieve is in oncreat () inside with XX.setTextOn ("switch status"); to realize that in case of default I set "switch status" instead of android: textOn = "ON /" this way.
Statement, which if used in ACtivity SET method, it is only when you click the button, set the status will be displayed on the switch. I want to achieve before the touch screen does not click switch, the switch is already on the text of the SET, and has been confirmed in experiments is of no use to refresh the start of the Activity.
Consult Great God, how<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) -> Reply: In onCreate which set about setTextOn and setTextOff on it, if not, it is estimated elsewhere wrong Reply:
You can try, I tried not, that is the time to start ACTIVITY display SetTextOn () to set the text inside the Reply:
Sorry, buddy, just tried it, really a little problem. Need to set about checked, can take effect
No comments:
Post a Comment