當前位置:首頁 » 安卓系統 » android怎麼去掉

android怎麼去掉

發布時間: 2022-12-16 23:43:48

⑴ Android中怎麼樣把界面上應用的名字給去掉啊

去掉運用的標題,如下圖所示

java">//父主題
<stylename="AppTheme"parent="Theme.AppCompat.Light.DarkActionBar">
<!--Customizeyourthemehere.-->
<itemname="colorPrimary">@color/colorPrimary</item>
<itemname="colorPrimaryDark">@color/background_color</item>
<itemname="colorAccent">@color/colorAccent</item>
</style>

//去除狀態欄
<stylename="AppTheme.NoActionBar">
<itemname="windowActionBar">false</item>
<itemname="windowNoTitle">true</item>
</style>

【最後】

推薦方法二,方法三,修改方便。

⑵ android如何去掉標題欄

在android中去掉標題欄有三種方法,它們也有各自的特點。

1.在代碼里實現

[java]view plain

this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉標題欄

記住:這句代碼要寫在setContentView()前面。


2.在清單文件(manifest.xml)裡面實現


[java]view plain

<applicationandroid:icon="@drawable/icon"

android:label="@string/app_name"

android:theme="@android:style/Theme.NoTitleBar">

這樣用可以將整個應用設置成無標題欄,如果只需要在一個Activity設置成一個無標題欄的形式,只要把上面的第三行代碼寫到某一個Activity裡面就可以了。


3.在style.xml文件里定義


[html]view plain

<?xmlversion="1.0"encoding="UTF-8"?>

<resources>

<stylename="notitle">

<itemname="android:windowNoTitle">true</item>

</style>

</resources>

然後面manifest.xml中引用就可以了,這種方法稍麻煩了些。



[html]view plain

<applicationandroid:icon="@drawable/icon"

android:label="@string/app_name"

android:theme="@style/notitle">



其實可以看得出來,第二種方法和第三種方法實質是一樣的,只不過第二種方法調用的是系統定義好的style.xml文件,而第三種方法則是在自己的應用里定義style.xml,然後再自己再調用,其實道理是一樣的,第三種方法做起來更有成就感。


⑶ Android去除狀態欄的方法匯總

一、隱藏標題欄

//隱藏標題欄

this.requestWindowFeature(Window.FEATURE_NO_TITLE);

二、隱藏狀態欄

//隱藏狀態欄

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

三、去掉所有Activity界面的標題欄

修改AndroidManifest.xml

在application 標簽中添加android:theme="@android:style/Theme.NoTitleBar"

四、去掉所有Activity界面的TitleBar 和StatusBar

修改AndroidManifest.xml

在application 標簽中添加

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

⑷ android怎麼去掉android手機上的狀態欄

在開發中經常需要把應用設置為全屏,這需要去掉標題欄和狀態欄;一般有兩種方法,一是在代碼中設置,另一種方法是在配置文件里設置。

一、在代碼中設置:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//去除title
requestWindowFeature(Window.FEATURE_NO_TITLE);
//去掉Activity上面的狀態欄
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN , WindowManager.LayoutParams. FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
其中起主要作用的兩個語句:
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//隱去電池等圖標和一切修飾部分(狀態欄部分)
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//隱去標題欄(程序的名字)

在這里要強調一點,設置全屏的倆段代碼必須在setContentView(R.layout.main)之前,不然會報錯.

二、在配置文件里設置

(關鍵代碼:android:theme="@android:style/Theme.NoTitleBar.Fullscreen",如果想只是去除標題欄就後面不用加Fullscreen了,另外,如果想要整個應用都去除標題欄和狀態欄,就把這句代碼加到<application..標簽裡面,如果只是想某個activity起作用,這句代碼就加到相應的activity上):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.demo"
android:versionCode="1"
android:versionName="1.0">
<application android:
icon="@drawable/icon"
android:label="@string/app_name">
<activity android:name=".OpenGl_Lesson1"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
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>
</manifest>

這里主要用到的Theme如下:
android:theme="@android:style/Theme.NoTitleBar" 隱去標題欄
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 隱去狀態欄

⑸ android如何去掉actionbar

當使用Android中的ActionBar控制項時,如果想要隱藏上面的ActionBar,可以使用如下的代碼:
getSupportActionBar().hide();//隱藏掉整個ActionBar,包括下面的Tabs
上面的代碼會將整個ActionBar都隱藏掉,包括ActionBar中的Tab分頁標簽,如果想要保留分頁標簽的話,可以使用如下的代碼:
ActionBar actionBar = getSupportActionBar();//高版本可以換成 ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayShowHomeEnabled(false);
//會保留tab標簽

另外還有一種更簡單的方式來移除ActionBar,在setContent之前調用下面這句,保證沒有ActionBar
requestWindowFeature(Window.FEATURE_NO_TITLE);

⑹ android 怎樣去掉下拉通知欄

安卓手機下拉通知欄嘗試路徑:【桌面設置】-【外觀設置】-【隱藏通知欄】,去掉對勾,還有就是安全管家之類的安全軟體也有隱藏下拉菜單的功能。還有就是下載了什麼類似wp8桌面之類的桌面美化類APP,刪掉或設置一下。還有可能是系統升級或刷機後固件有問題導致的,建議重新刷機或升級至官方版本。

熱點內容
向量計算程序編譯器 發布:2025-03-25 07:44:17 瀏覽:534
ftp命令檢索文件個數 發布:2025-03-25 07:37:44 瀏覽:178
如何配置濃度的溶液 發布:2025-03-25 07:37:35 瀏覽:199
編譯器id 發布:2025-03-25 07:28:49 瀏覽:622
在伺服器里如何製作炫酷名稱 發布:2025-03-25 07:28:41 瀏覽:359
vs2008加qt編譯很慢 發布:2025-03-25 07:23:56 瀏覽:859
androidcanvas圖片 發布:2025-03-25 07:20:10 瀏覽:535
編程u盤 發布:2025-03-25 07:19:35 瀏覽:717
電腦怎麼連接伺服器硬碟 發布:2025-03-25 07:08:40 瀏覽:481
牙齒設計軟體要什麼電腦配置 發布:2025-03-25 07:07:12 瀏覽:460