0

I can't get my project to compile after adding the Item name="android:windowTranslucentStatus" to my theme, just adding it to my theme gives me an error telling me I need to target SDK version 19.

That's is perfectly OK however if I move my style to my values-v19 folder I get an error saying that android:windowTranslucentStatus can be found.

I'm not that experienced with android but isn't this the correct way to do it?

values/styles.xml error:
android:windowTranslucentStatus requires API level 19 (current min 14)  


values-v19/styles.xml error
Error: No resource found that matches the given name: attr 'android:windowTranslucentStatus'.

The parent for my theme is android:Theme.Holo.Light if that matters.

Jonathan Andersson
  • 1,057
  • 1
  • 10
  • 19

2 Answers2

4

So I solved my problem, the problem wasn't with the code itself apparently i had the Module SDK (in Project Settings > Modules > Dependencies > My project in Android Studio) set to API 18.

Changing that to API 19 solved everything.

Jonathan Andersson
  • 1,057
  • 1
  • 10
  • 19
0

so far I am concern this theming should be done within your androidMenifest file. Under each activity you can define the theme or if every activity shares the same theme then adding this under the application tag should be ok. However below is the code and this is how I get my work done.

 <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" >
    <activity
        android:name="com.aminoit.blogspot.notifyme.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
androCoder-BD
  • 498
  • 7
  • 13
  • you see **android:teme= "@android:style/Theme.Translucent.NoTitleBar.FullScreen"**? this is what makes my theme. However, referring the base theme you can customize it as you want though! – androCoder-BD Jan 05 '14 at 15:11
  • I was actually following this http://stackoverflow.com/questions/20167755/transparent-status-bar-system-ui-on-4-4-kit-kat using my custom theme – Jonathan Andersson Jan 05 '14 at 15:16
  • well then, you should do this correction by changing the targeted sdk by going to your **project build properties** however, hard-coding might not help. And before you do anything else, just do one thing. Create a new project and set the **tartget Sdk Versioin** to 17. and do your customization over the new project. This should fix your problem Insha-Allah. :) – androCoder-BD Jan 05 '14 at 15:26
  • Yes i see, but you that doesn't work with action bar does it? – Jonathan Andersson Jan 05 '14 at 15:26