🔒 Closed Mod

Status
Not open for further replies.
Eto po sa ibang forum to e
This is very simple to accomplish

If you want to change it in code, call:

setTitle("My new title");
getActionBar().setIcon(R.drawable.my_icon);
And set the values to whatever you please.

Or, in the Android manifest XML file:

<activity android:name=".MyActivity"
android:icon="@drawable/my_icon"
android:label="My new title" />
To enable the back button in your app use:

getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
The code should all be placed in your onCreate so that the label/icon changing is transparent to the user, but in reality it can be called anywhere during the activity's lifecycle.
 
Eto po sa ibang forum to e
This is very simple to accomplish

If you want to change it in code, call:

setTitle("My new title");
getActionBar().setIcon(R.drawable.my_icon);
And set the values to whatever you please.

Or, in the Android manifest XML file:

<activity android:name=".MyActivity"
android:icon="@drawable/my_icon"
android:label="My new title" />
To enable the back button in your app use:

getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
The code should all be placed in your onCreate so that the label/icon changing is transparent to the user, but in reality it can be called anywhere during the activity's lifecycle.

Yow. Thanks for this. Godbless
 
<android.support.design.widget.AppBarLayout
android:background="your color.."
Or
</android.support.v7.widget.Toolbar>
android:background="your color.."
....
To add icon...


Simply

android:navigationIcon="your icon"
 
<android.support.design.widget.AppBarLayout
android:background="your color.."
Or
</android.support.v7.widget.Toolbar>
android:background="your color.."
....
To add icon...


Simply

android:navigationIcon="your icon"
Saan iadd yan? Sa stylex xml ba or isingit sa isang xml file?
 
Status
Not open for further replies.

About this Thread

  • 33
    Replies
  • 501
    Views
  • 3
    Participants
Last reply from:
Jmrie_

Online now

Members online
1,003
Guests online
735
Total visitors
1,738

Forum statistics

Threads
2,275,614
Posts
28,964,460
Members
1,231,883
Latest member
daemondevera
Back
Top