I have just started using Android Studio on Mac. The buttons I have created are showing as text on the AVD. Can anyone help me to fix this?
Thank you. It looks correct while rendering in the Design window.
<RelativeLayout 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:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="188dp"
android:layout_marginRight="67dp"
android:onClick="speakText"
android:text="#string/Speak"
android:clickable="true"
/>
<EditText
android:id="#+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/button1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="81dp"
android:ems="10" >
<requestFocus />
</EditText>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="#+id/buttonSpeaker"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/button1"
android:layout_toStartOf="#+id/button1"
android:clickable="true"/>
Similar to the material design. You can inherit you theme in style.xml like this
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
Or overide global button style like this
in AppTheme:
<item name="android:buttonStyle">#style/customButtonStyle</item>`
and in style.xml
<style name="customButtonStyle" parent="#android:style/Widget.Button">
<!-- Customize your button style here. -->
</style>
Related
I am learning android, and one of the challenges in the book said to add the previous button on my own. I did, and asked a friend for help putting the arrow on the left side, and he did, but he couldn’t figure out why drawableStart didn’t work. (drawableLeft did work)
Anyone know why drawableStart didn’t work? Or better yet: how to fix it?
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="#+id/previous_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="#drawable/arrow_left"
android:text="#string/previous_button"
android:drawablePadding="4dp"/>
<Button
android:id="#+id/next_button"
android:layout_width="wrap_content"
android:gravity="center"
android:layout_height="wrap_content"
android:drawableEnd="#drawable/arrow_right"
android:drawablePadding="4dp"
android:text="#string/next_button"/>
</LinearLayout>
The code under themes.xml :
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.GeoQuiz" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">#color/purple_500</item>
<item name="colorPrimaryVariant">#color/purple_700</item>
<item name="colorOnPrimary">#color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">#color/teal_200</item>
<item name="colorSecondaryVariant">#color/teal_700</item>
<item name="colorOnSecondary">#color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
It seems that you're using Material design buttons, so use android:icon instead of android:drawableStart
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="#+id/previous_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:icon="#drawable/arrow_left"
android:text="#string/previous_button"
android:drawablePadding="4dp" />
<Button
android:id="#+id/next_button"
android:layout_width="wrap_content"
android:gravity="center"
android:layout_height="wrap_content"
android:icon="#drawable/arrow_right"
android:drawablePadding="4dp"
android:text="#string/next_button"/>
</LinearLayout>
Update:
Didn't work. Now it doesn't show either arrow. And the program doesn't run in the emulator anymore
Appears to be a compatibility issue with android directive so, change it to app directive instead and added a style of Widget.MaterialComponents.Button.TextButton.Dialog as you use
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="#+id/previous_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:icon="#drawable/arrow_left"
android:text="#string/previous_button"
style="#style/Widget.MaterialComponents.Button.TextButton.Dialog"
android:drawablePadding="4dp" />
<Button
android:id="#+id/next_button"
android:layout_width="wrap_content"
android:gravity="center"
android:layout_height="wrap_content"
app:icon="#drawable/arrow_right"
android:drawablePadding="4dp"
android:text="#string/next_button"/>
style="#style/Widget.MaterialComponents.Button.TextButton.Dialog"
</LinearLayout>
After a whole lot of searching I finally figured out how to make it work
android:drawableStart not working seems to be an issue and here is the link to the issue and fix https://github.com/material-components/material-components-android/issues/1174
Here's the fix
<Button
android:id="#+id/previous_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:icon="#drawable/arrow_left"
app:iconGravity="textStart"
app:iconTint="#android:color/white"
android:text="#string/previous_button"
android:drawablePadding="4dp"/>
Instead of using drawableBottom|Top|Left|... use MaterialButton's attributes app:icon, app:iconGravity and app:iconTint
Note drawableStart seems to be the only one with the issue the others work
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:text="#string/your_text"
android:drawableEnd="#drawable/your_image"/>
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:text="#string/your_text"
android:drawableTop="#drawable/your_image"/>
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:text="#string/your_text"
android:drawableBottom="#drawable/your_image"/>
Then for Left
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:text="#string/your_text"
app:icon="#drawable/arrow_left"
app:iconGravity="textStart"
app:iconTint="#android:color/white"/>
Edit:
The bar I wanted to get rid of was the bar at the top which says testing. The text color I want to change is "testing#gmail.com" text which the user inputs:
Here is my XML for the login activity (I used the default login activity provided by android studio):
<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:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context="com.example.uname.myapp.LoginActivity">
<!-- Login progress -->
<ProgressBar
android:id="#+id/login_progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:visibility="gone" />
<ScrollView
android:id="#+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/email_login_form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="#+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/prompt_email"
android:inputType="textEmailAddress"
android:maxLines="1"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/prompt_password"
android:imeActionId="6"
android:imeActionLabel="#string/action_sign_in_short"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:maxLines="1"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="#+id/email_sign_in_button"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="#string/action_sign_in"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>
I wanted to remove the bar at the top, so the solution shown online was to inherit from Theme.AppComtact.NoActionBar. Here is my style:
<style name="MyTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimary</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:windowBackground">#android:color/white</item>
<item name="android:textColorHint">#android:color/darker_gray</item>
<item name="android:textColor">#android:color/black</item>
</style>
Getting frustrated that I can't find documentation on the TextInputLayout and how to simply just change the font color when typing in the textfield. Tried searching on SO and other sites and couldn't find a solution.
I even tried <item name="android:colorControlNormal">#android:color/black</item> but it requires API level 21 and 15 is min right now.
Coming from a Python / Django background and first time trying to learn android development.
Can anyone point me in the right direction? Is there documentation that shows all the possible styling developers can apply on text?
My androidmanifest file has this in the application:
android:theme="#style/MyTheme"
if you want to remove action bar or titlebar use this style and make necessary true/false depending what you want and not.
<style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="#style/Theme.AppCompat.Light">
<item name="android:windowNoTitle">false</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">#null</item>
</style>
and in your manifest file
<activity
android:name=".activities.FullViewActivity"
android:theme="#style/Theme.AppCompat.Light.NoActionBar.FullScreen"
/>
and for changing font colour
<EditText
android:id="#+id/myEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Your Name"
android:textColor="#FF0000"
</EditText>
If you are looking for only setting TextInputLayout hint color then you should try this
app:hintTextAppearance="#style/text_appearance_color"
<android.support.design.widget.TextInputLayout
android:padding="8dp"
android:id="#+id/tilSample"
app:errorTextAppearance="#style/error_appearance"
app:hintTextAppearance="#style/text_appearance_color"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="#+id/etSample"
android:layout_margin="8dp"
android:padding="8dp"
android:hint="android"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.TextInputLayout>
and for NoActionBar, your code seems to be fine just apply the theme in the manifest at the application level.
Edit:
style
<style name="editTextStyle" parent="#android:style/Widget.EditText">
<item name="android:background">#drawable/someBackground</item>
<item name="android:textColor">#808080</item>
<item name="android:layout_height">45dip</item>
<!--other attibutes goes here-->
</style>
I have created custom tool bar in my android application.In my application,when I see layout is showing correct but when run application then show more margin from left side.I am extend AppCompatActivity in my Activity.
I have use following code for custom toolbar and XML
Code
ActionBar actionBar = getSupportActionBar();
// add the custom view to the action bar
actionBar.setCustomView(R.layout.custom_actionbar);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mainlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/nav_headerbg" >
<ImageButton
android:id="#+id/btnBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:background="#drawable/backbtn"
android:contentDescription="#string/clear" />
<ImageButton
android:id="#+id/btnHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#id/btnBack"
android:background="#drawable/ico_nav"
android:contentDescription="#string/clear" />
<TextView
android:id="#+id/header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Setting"
android:textColor="#fff"
android:textSize="20sp" />
<ImageButton
android:id="#+id/btnDeviceList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="1dp"
android:padding="5dp"
android:background="#drawable/headerdevicelist"
android:contentDescription="#string/clear" />
</RelativeLayout>
Please find attached image.I want to remove left space which is marked by red.How to fixed it and suggest me.
Add custom actionbar style in your app:
<style name="MyActionBar" parent="Widget.AppCompat.ActionBar">
<item name="contentInsetStart">0dp</item>
<item name="contentInsetEnd">0dp</item>
</style>
and set it in your application theme:
<style (your application theme)>
<item name="android:actionBarStyle">#style/MyActionBar</item>
</style>
Here is my layout.xml for splash screen.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#android:color/holo_orange_light"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:layout_height="match_parent"
android:paddingBottom="#dimen/splash_padding_bottom"
android:paddingLeft="#dimen/splash_padding_left"
android:paddingRight="#dimen/splash_padding_right"
android:paddingTop="#dimen/splash_padding_top">
<LinearLayout
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:orientation="vertical"
android:layout_centerVertical="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/title"
android:textSize="#dimen/splash_title"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="#string/app_name"
/>
<TextView
android:textColor="#android:color/white"
android:textSize="#dimen/splash_greetings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Hi\nthere,\ngood\nevening!"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"/>
</LinearLayout>
</RelativeLayout>
and styles.xml (values-v21)
<resources>
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
Now, when I ran the app on kitkat the splash screen was getting displayed properly but when I ran it on Lollipop all the padding I have given to RelativeLayout was gone.
What I am doing wrong?
This is the normal behavior, padding top and padding bottom are overwritten by the android:fitsSystemWindows="true".
You can find more by reading Ian Lake's Medium post on fitsSystemWindows:
https://medium.com/google-developers/why-would-i-want-to-fitssystemwindows-4e26d9ce1eec#.nljqv5yh8
Try adding android:margin instead
In my application I want to use the Theme.NoTitleBar, but on the other hand I also don't want to loose the internal Theme of the Android OS.. I searched on the net and Found the following answer.. I have modified my styles.xml and added the following line of code..
Inside values/styles.xml
<style name="Theme.Default" parent="#android:style/Theme"></style>
<style name="Theme.NoTitle" parent="#android:style/Theme.NoTitleBar"></style>
<style name="Theme.FullScreen" parent="#android:style/Theme.NoTitleBar.Fullscreen"></style>
Inside values-v11/styles.xml
<style name="Theme.Default" parent="#android:style/Theme.Holo"></style>
<style name="Theme.NoTitle" parent="#android:style/Theme.Holo.NoActionBar"></style>
<style name="Theme.FullScreen" parent="#android:style/Theme.Holo.NoActionBar.Fullscreen"></style>
Inside values-v14/styles.xml
<style name="Theme.Default" parent="#android:style/Theme.Holo.Light"></style>
<style name="Theme.NoTitle" parent="#android:style/Theme.Holo.Light.NoActionBar"></style>
<style name="Theme.FullScreen" parent="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"></style>
In the application tag of the Manifest file I have added an attribute of:
android:theme="#style/Theme.NoTitle"
But when I try to run the code The images in my application gets Blurry.. But when I use the following tag:
android:theme="#android:style/Theme.NoTitleBar"
or
android:theme="#android:style/Theme.Light.NoTitleBar"
or
android:theme="#android:style/Theme.Black.NoTitleBar"
The images in the application comes in the correct form... But In this case I lose all the themes on the new Android OS..
Please help me how can I use NoTitleBar Theme without loosing the Images and the Native Theme..
Code for the layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/mainScreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<include
android:id="#+id/main_top_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
layout="#layout/top_bar_title" />
<RelativeLayout
android:id="#+id/container_bar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/main_top_bar"
android:layout_marginTop="-3dp"
android:background="#drawable/tab_nav_bar" >
</RelativeLayout>
<RelativeLayout
android:id="#+id/container_bar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/container_bar1"
android:background="#drawable/location_nav_bar" >
<TableLayout
android:id="#+id/map_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:paddingBottom="5dp"
android:background="#drawable/map_bar_bg" >
<TableRow
android:id="#+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/MapPointer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="#drawable/map_pointer" />
<TextView
android:id="#+id/MapSeperator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:text="|"
android:textColor="#979ca0"
android:textSize="20dp" />
<com.pnf.myevent.CustomTextView
android:id="#+id/DisplayLocation"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:paddingLeft="5dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#adabad"
android:textSize="12dp" />
<Button
android:id="#+id/RefreshBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:background="#drawable/refresh_button" />
</TableRow>
</TableLayout>
<TableLayout
android:id="#+id/calendar_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp" >
<TableRow
android:id="#+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/MonthBtn"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/month_button" />
<Button
android:id="#+id/TodayBtn"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/today_button" />
<Button
android:id="#+id/WeekBtn"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/week_button" />
</TableRow>
</TableLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/container_bar3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/container_bar2"
android:background="#drawable/cal_nav_bar" >
<Button
android:id="#+id/CalPrevious"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="5dp"
android:background="#drawable/left_arrow_button" />
<com.pnf.myevent.CustomTextView
android:id="#+id/CalTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:shadowColor="#ffffff"
android:shadowDx="0"
android:shadowDy="2"
android:shadowRadius="1"
android:text="Title"
android:textColor="#666666"
android:textSize="15dp" />
<Button
android:id="#+id/CalNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="30dp"
android:layout_marginTop="5dp"
android:background="#drawable/right_arrow_button" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/container_bar4"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_below="#+id/container_bar3"
android:background="#c8c9cc" >
<GridView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/gridView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:horizontalSpacing="2dp"
android:listSelector="#00000000"
android:numColumns="7"
android:stretchMode="columnWidth"
android:verticalSpacing="2dp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/footer_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/container_bar4" >
<ListView
android:id="#+id/CalendarList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:listSelector="#00000000"
android:cacheColorHint="#00000000"
android:divider="#dedede"
android:dividerHeight="1dp"
android:drawSelectorOnTop="false" />
</RelativeLayout>
if you want the original style of your Ui to remain and the title bar to be removed with no effect on that, you have to remove the title bar in your activity rather than the manifest. leave the original theme style that you had in the manifest and in each activity that you want no title bar use this.requestWindowFeature(Window.FEATURE_NO_TITLE); in the oncreate() method before setcontentview() like this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_signup);
...
}
To Hide the Action Bar add the below code in Values/Styles
<style name="CustomActivityThemeNoActionBar" parent="#android:style/Theme.Holo.Light">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
Then in your AndroidManifest.xml file add the below code in the required activity
<activity
android:name="com.newbelievers.android.NBMenu"
android:label="#string/title_activity_nbmenu"
android:theme="#style/CustomActivityThemeNoActionBar">
</activity>
In your manifest use:-
android:theme="#style/AppTheme" >
in styles.xml:-
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
Surprisingly this works as yo desire, Using the same parent of AppBaseTheme in AppTheme does not.
Why are you changing android os inbuilt theme.
As per your activity Require You have to implements this way
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
as per #arianoo says you have to used this feature.
I think this is better way to hide titlebar theme.
In your styles.xml, modify style "AppTheme" like
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
use android:theme="#android:style/Theme.NoTitleBar in manifest file's application tag to remove the title bar for whole application or put it in activity tag to remove the title bar from a single activity screen.
this.requestWindowFeature(getWindow().FEATURE_NO_TITLE);