🔒 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.

Similar threads

About this Thread

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

Trending Topics

Online now

Members online
1,054
Guests online
1,688
Total visitors
2,742

Forum statistics

Threads
2,294,689
Posts
29,092,685
Members
1,207,453
Latest member
mantero11
Back
Top