How to achieve the same result as in standard android messaging application, where the back button is united with the title:
Asked
Active
Viewed 113 times
1

Dmitrii G.
- 895
- 1
- 7
- 21
-
Would you consider using a custom toolbar view? – Ashkan Ghodrat Dec 18 '15 at 00:42
2 Answers
0
Simply set the button to go back to the previous activity/intent. If this isn't what you wanted, I'm not sure I understood your question properly.
Use Android: Go back to previous activity if that's what you wanted.
-
the question is how to make the back button have both image and title. – Dmitrii G. Dec 18 '15 at 00:29
-
Well, I'm not an android expert yet, so I am not sure if the first suggestion will be possible; but it seems that there are two options. 1: put an image and text inside the button or 2: Make two buttons (one with the image and one with the text you want) and put them right next to each other using a linear layout or possibly even overlap them (maybe absolute layout?) – Theyna Dec 18 '15 at 00:38
0
<Button
android:id="@+id/back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:text="set_your_title"
android:drawableLeft="@android:drawable/back"
android:textSize="24sp"/>
You can set the layout width according to your layout requirements.

Abhishek
- 1,654
- 2
- 18
- 31