Blottt
Blottt

Reputation: 119

android menu not showing text

Android menu is not showing text, but when I click on the menu it does execute the intended action. I believe maybe something wrong with the text color? But I did not change the color anywhere in the code.

enter image description here

Being run is a fragment Activity with the following 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:background="@color/white"
    android:orientation="vertical"
    android:layout_weight="2"
    >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="45dip"
        android:background="@color/main_app_color"
        android:gravity="center"
        android:text="@string/header_app_name"
        android:textAlignment="center"
        android:textColor="@color/white"
        android:textSize="22sp"
        android:textStyle="bold"
        >
    </TextView>

    <FrameLayout android:id="@+id/main_fragment_container"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:layout_marginBottom="5dip"
        >
    </FrameLayout>

    <ImageView android:id="@+id/some_image"
        android:layout_width="fill_parent"
        android:layout_height="75dip"
        android:scaleType="fitCenter"
        android:src="@drawable/adsyh"
        />

</LinearLayout>

Update

Apptheme:

<style name="AppBaseTheme" parent="android:Theme.Holo.NoActionBar.Fullscreen">
</style>

<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:windowNoTitle">true</item>
</style>

Upvotes: 1

Views: 766

Answers (1)

Blottt
Blottt

Reputation: 119

I have no idea why this worked, but I just replaced the contents of the menu/main.xml with the following and it started to show the text again in black color.

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/action_settings"
        android:title="@string/action_settings"
        android:orderInCategory="100"
        android:showAsAction="never" />
</menu>

Upvotes: 1

Related Questions