Welcome Guest, Not a member yet? Register   Sign In
How to change the text on a button progamatically?
#19

Use your view's object to initialize

`Button mButton = (Button)your_view_object.findViewById(R.id.contact);
mButton.setText("number");`

For example, consider you have inflated a view like this:

`View View = mInflater.inflate(R.layout.gridelement, null);`

Also if you wish to learn more about CSS, refer to this CSS hub https://www.scaler.com/topics/css/
Reply


Messages In This Thread
RE: How to change the text on a button progamatically? - by soniajessica - 04-04-2022, 05:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB