0
votes

I'm actually on Android Studio 1.0.2. I'm trying implement Material design on tablets with 4.1.2 Android version

I want do that: tabletsToolbar

okay, I'm reading the nexts blogs:

Problems:

I have on values/themes.xml the next code:

<style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
    <!-- Here we setting appcompat’s actionBarStyle -->
    <item name="actionBarStyle">@style/MyActionBarStyle</item>

    <!-- ...and here we setting appcompat’s color theming attrs -->
    <item name="colorPrimary">@color/my_awesome_red</item>
    <item name="colorPrimaryDark">@color/my_awesome_darker_red</item>

    <!-- The rest of your attributes -->
</style>

It report an error like that:

error on android

(first problem) What is the problem?

(Second problem) How can implement Material design on pre-lollipop tablets? How can I do a similar design? (First blue toolbar and inside content with another toolbar)

Really, I've tried before asking...

Thanks

1
I think by "Android 5.0" you mean "Material Design". Android 5.0 is Lollipop, so talking about implementing Android 5.0 without Lollipop is a non-sequitur. - Jon Skeet
you're right, edited - Aspicas
There's no need for "(Android 5.0)" everywhere. You're just trying to implement the Material Design look and feel, right? If so, that's all you need to say. - Jon Skeet
Right, It is the first contact I have with the material design... - Aspicas

1 Answers

1
votes

First Problem: It looks like your themes.xml file isn't properly written. Your top level element should be <resources>. Try instead...

<resources>
    <style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
        <!-- Here we setting appcompat’s actionBarStyle -->
        <item name="actionBarStyle">@style/MyActionBarStyle</item>

        <!-- ...and here we setting appcompat’s color theming attrs -->
        <item name="colorPrimary">@color/my_awesome_red</item>
        <item name="colorPrimaryDark">@color/my_awesome_darker_red</item>

        <!-- The rest of your attributes -->
    </style>
</resources>

Second Problem: You may need to provide some code showing what you've done to this point so it's not a matter of someone writing the entire thing for you.