🔒 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
  • 527
    Views
  • 3
    Participants
Last reply from:
Jmrie_

Trending Topics

Online now

Members online
1,197
Guests online
2,200
Total visitors
3,397

Forum statistics

Threads
2,315,869
Posts
29,184,379
Members
1,182,728
Latest member
lrnzagno
Back
Top