Hi guys, I have an application with two actions, in the second action I have an action bar with the name of my application displayed without problems. However, in my activity, the launch panels are displayed on the Android studio display, but not in the real application ... Any idea what is happening? Here is my xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".Menu_Activity"> <ListView android:id="@+id/list" android:layout_width="wrap_content" android:layout_height="40dp" android:layout_weight="0.99" android:dividerHeight="2px"> </ListView> <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Download content" android:textColor="#FFFFFF" android:id="@+id/button" android:background="@drawable/buttonshape" /> </LinearLayout>
and here is the xml where the panel is displayed:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center"> <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" /> <ListView android:id="@+id/list" android:layout_width="wrap_content" android:layout_height="match_parent" android:divider="#FF000080" android:dividerHeight="2px"> </ListView> </LinearLayout>
I do nothing regarding the bar in java files, with the exception of the AppCompatActivity extension in both cases.
Here is the stylesheet:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> </resources>
Thank you for your help.
source share