Setting text to a view from within an action

To change the text within a view from the java class do this:


// declairing the text view to change

        TextView textElement = (TextView) findViewById(;

//leave this line to assign a specific text


Alternatively use this to change it to a string from the resources folder

//leave this line to assign a string resource