0
I removed the action bar from a single acitivity. But in my Action bar has the back button. If I remove the action bar logically the button comes out together. But I would like the button come back, stayed there. Is there a Toolbar or something where the back button is transparent and remains ?. I’m drawing a detail screen of a client’s record. Follow the images for better understanding.
XML code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary" />
Are you using Toolbar or even Actionbar? If you are using Toolbar you can set its background as transparent. Already if you are using Actionbar even I advise you to change to Toolbar because it is much easier to customize it.
– Bruno Romualdo
Eai @Bruno. I am using action bar. I will redo all my code then and in place of Action I will use the Toolbar. Thank you.
– Artur Mafezzoli Júnior
Study the immersive modes: https://developer.android.com/training/system-ui/immersive.html I think it will bring more usability to what you want to do.
– Mateus
@Matthew, I’ll take a look here. Thanks for your help.
– Artur Mafezzoli Júnior
@Bruno, I implanted Toolbar in my project. But when it comes to the Listview part, it surpasses Toolbar. Is there a command to fix Toolbar ?
– Artur Mafezzoli Júnior
By 'overtake' Voce means that Listview is behind Toolbar?
– Bruno Romualdo
@Bruno, that’s right. I was able to solve it. I just took the Toolbar code and put it in after the Listview code. It worked. But it got really weird. No shading on Toolbar. And the list now exceeds Toolbar, but is not in front. I put the image in my question above.
– Artur Mafezzoli Júnior
I don’t understand exactly what you want. Do you want only the button? If so, make Toolbar transparent with android:Theme="@style/Apptheme.ActionBar.Transparent"
– Leonardo Assunção
@Leonardoassunção I understood your argument. But I can make Toolbar transparent only on this screen ? I created a file called Toolbar and reuse it on another screen with the <include command. It will work ?
– Artur Mafezzoli Júnior
Putting this theme, only the Toolbar of this layout will be transparent
– Leonardo Assunção