Sebastian Schneider
Sebastian Schneider

Reputation: 5532

Changing names of android styles but app crashes

my files:

styles.xml:

<style name="AppTheme.NoActionBar">
    <item name="colorPrimary">@color/red</item>
    <item name="colorAccent">@color/blue</item>
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

AndroidManifest.xml (part):

<activity android:name=".actionbar.ActionBarSlider"
        android:theme="@style/AppTheme.NoActionBar"
        android:parentActivityName=".Home">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="de.*****.testapp.Home" />
    </activity>


After i change

<style name="AppTheme.NoActionBar"> to <style name="ActionBarSlider" parent="AppTheme.NoActionBar">

and

android:theme="@style/AppTheme.NoActionBar" to android:theme="@style/ActionBarSlider"

the app crashes on Launch. What is my mistake?

Upvotes: -1

Views: 92

Answers (1)

zkminusck
zkminusck

Reputation: 1240

10-06 22:00:33.730 717-731/? W/WindowManager: java.lang.RuntimeException: Binary XML file line #31: You must supply a layout_height attribute.

In your main activitys layout resource file (in line 31) you got a LinearLayout element which doesn't have a android:layout_height="" attribute.

Upvotes: 0

Related Questions