can please me issue.i want activity full screen , want remove title screen.i have tried several ways not able remove it.
activity code :
public class welcomepage extends activity { private button btn; edittext username,password; databasehandler dbhandler; context ctx =this; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); //remove title bar this.requestwindowfeature(window.feature_no_title); setcontentview(r.layout.activity_welcomepage); } }
and activity.xml
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" 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" android:background="@drawable/pic1" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="com.edkul.vimal.edkul.welcomepage"> </relativelayout>
i want remove title bar displayed in blue color .please find image reference :
androidmanifest.xml
<application android:minsdkversion="3" android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsrtl="true" android:theme="@style/theme.appcompat.noactionbar"> <activity android:name=".welcomepage" android:label="@string/app_name" android:theme="@style/theme.appcompat.noactionbar"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application>
you add style in style folder
<style name="apptheme.noactionbar" parent="theme.appcompat.light.darkactionbar"> <item name="windowactionbar">false</item> <item name="windownotitle">true</item> <item name="android:windowfullscreen">true</item> </style>
set style activity class in androidmanifest.xml file
android:theme="@style/apptheme.noactionbar"
i hope you
Comments
Post a Comment