Results 1 to 5 of 5
  1. #1
    yahpeter is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default Quick beginner question on android:theme

    I'm just beginning to learn to build a simple first app. I'm in the AndroidManifest.xml and trying to change the android:theme under application so that the background is light colored and has no action bar.

    My problem is that I have one alone, but I don't how to include both:
    Java Code:
    android:theme="@android:style/Theme.Light"
    android:theme="@android:style/Theme.NoTitleBar"
    How would I write this so that I can get both a light background theme and no action bar? I've tried searching but to no avail. :[

    Thanks for any help offered in advance.
    Last edited by yahpeter; 01-21-2014 at 11:26 PM.

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Quick beginner question on android:theme

    You could use Theme.Light.NoTitleBar. But be aware that title bar and action bar are different things from different API levels. Discussion here: Android: Theme.Holo.Light.NoActionBar vs Theme.Light.NoTitleBar - Stack Overflow

    Welcome to Android API fragmentation hell.
    Get in the habit of using standard Java naming conventions!

  3. #3
    yahpeter is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default Re: Quick beginner question on android:theme

    Ahh, I see... thank you for letting me know! rep'd.

  4. #4
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    282
    Rep Power
    3

    Default Re: Quick beginner question on android:theme

    Hi!

    When you the apply the Theme consider your API version too,

    in my below code i am using two different theme, in your activity you may call it...,

    Java Code:
    <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
    
            android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen">
            <activity
                android:name="---------------------"
                android:label="@string/app_name"
                android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity
                android:name="dcs.raj.timesheet.MainActivity"
                android:label="@string/title_activity_add__project"
                android:parentActivityName="---------------------"
                android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
            </activity>
    Last edited by raj.mscking@gmail.com; 01-27-2014 at 12:05 PM.
    - Raj

  5. #5
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    282
    Rep Power
    3

    Default Re: Quick beginner question on android:theme

    If you want to use
    background is light colored and has no action bar
    use the second theme..,
    - Raj

Similar Threads

  1. Beginner Java App Reference (Android)
    By ravensp in forum Reviews / Advertising
    Replies: 0
    Last Post: 07-08-2013, 10:19 AM
  2. Java Question [Beginner Question]
    By joker760 in forum New To Java
    Replies: 3
    Last Post: 12-13-2011, 04:01 PM
  3. Quick question
    By Thumper in forum New To Java
    Replies: 10
    Last Post: 11-07-2010, 10:06 PM
  4. Quick Question...
    By FatalSylence in forum New To Java
    Replies: 4
    Last Post: 10-15-2010, 02:38 PM
  5. really quick question for beginner
    By its_crawford in forum NetBeans
    Replies: 4
    Last Post: 06-17-2010, 04:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •