Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class JavaTest extends AppCompatActivity {
  2.  
  3. @Override
  4. protected void onCreate(Bundle savedInstanceState) {
  5. super.onCreate(savedInstanceState);
  6. setContentView(R.layout.activity_java_test);
  7. }
  8. public void changeInfo(View view){
  9. setContentView(R.layout.activity_java_test);
  10. TextView t = (TextView)findViewById(R.id.textSpace1);
  11. if (t.getText()==getResources().getString(R.string.lorem_ipsum)){
  12. t.setText("[Email Here]");
  13. }
  14. else{
  15. t.setText(getResources().getString(R.string.lorem_ipsum));
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement