Hey guys i have an app with two activities, in the second activity i have an action bar with the title of my app displayed without problem. However in my launcher activity the bar is shown in android studio display but not in the actual app... Any idea whats 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 bar 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>
Im not doing anything concerning the bar in the java files except extending AppCompatActivity in both cases.
Here is the styles file :
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<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.