Java Code Examples for android.widget.Button#invalidate()
The following examples show how to use
android.widget.Button#invalidate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlaylistDialog.java From mobile-manager-tool with MIT License | 6 votes |
private void setSaveButton() { String typedname = mPlaylist.getText().toString(); Button button = mPlaylistDialog.getButton(Dialog.BUTTON_POSITIVE); if (button == null) return; if (typedname.trim().length() == 0 || PLAYLIST_NAME_FAVORITES.equals(typedname)) { button.setEnabled(false); } else { button.setEnabled(true); if (idForplaylist(typedname) >= 0 && !mOriginalName.equals(typedname)) { button.setText(R.string.overwrite); } else { button.setText(R.string.save); } } button.invalidate(); }
Example 2
Source File: GoJsActivity.java From DragonGoApp with GNU Affero General Public License v3.0 | 6 votes |
void initFinished() { System.out.println("init finished"); writeInLabel("init done. You can play !"); final Button button1 = (Button)findViewById(R.id.but1); button1.setClickable(true); button1.setEnabled(true); final Button button2 = (Button)findViewById(R.id.but2); button2.setClickable(true); button2.setEnabled(true); final Button button3 = (Button)findViewById(R.id.but3); button3.setClickable(true); button3.setEnabled(true); button1.invalidate(); button2.invalidate(); button3.invalidate(); }