Created
November 9, 2017 03:06
-
-
Save ar-android/c08304e2e9f9e0142c54a2e33ec483e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="24dp" | |
android:height="24dp" | |
android:viewportWidth="24.0" | |
android:viewportHeight="24.0"> | |
<path | |
android:fillColor="#FFFFFFFF" | |
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> | |
</vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void setupToolbar() { | |
Toolbar toolbar = findViewById(R.id.toolbar); | |
setSupportActionBar(toolbar); | |
ActionBar ab = getSupportActionBar(); | |
if (ab != null) { | |
ab.setDisplayHomeAsUpEnabled(true); | |
ab.setHomeAsUpIndicator(R.drawable.ic_arrow_back_white); | |
ab.setTitle(""); | |
} | |
} | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
switch (item.getItemId()) { | |
case android.R.id.home: | |
onBackPressed(); | |
break; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment