Answer the question
In order to leave comments, you need to log in
How to make TextView and ExpandableListView with transparent NavBar?
I want to make such an application with a transparent NavBar.
But if the parameter windowTranslucentNavigation = true , then the TextView crawls up.
Markup code:
main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<fragment
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/elvMainFragment"
android:name="com.example.ExpListView_Events.FragmentExpListView"
tools:layout="@layout/elv_fragment" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="30dp"
android:id="@+id/tvMainText"
android:background="@android:color/holo_orange_dark"
android:textColor="@android:color/white"
android:textSize="18dp"
android:text="Hello!"
android:gravity="center" />
<ExpandableListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@android:id/list"
android:fitsSystemWindows="true"
android:clipToPadding="false" />
</LinearLayout>
<resources>
<style name="MyTheme" parent="android:Theme.Holo">
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:actionBarStyle">@style/ActionTheme</item>
</style>
<style name="ActionTheme" parent="android:style/Widget.Holo.ActionBar">
<item name="android:background">@android:color/holo_green_dark</item>
</style>
</resources>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question