當前位置:首頁 » 安卓系統 » android自帶圖標

android自帶圖標

發布時間: 2023-06-16 19:52:04

1. 如何更改Android 程序的icon快捷方式圖標

在res/drawable-hdpi或res/drawable-ldpi或res/drawable-mdpi目錄下,加下你要顯示的圖片,最好後綴是為.png的,然後修改AndroidManifest.xml文件,裡面有這樣一行代碼<application android:icon="@drawable/icon" android:label="@string/app_name">,把它改為<application android:icon="@drawable/***" android:label="@string/app_name">(「***」表示你放入的圖片的名,比如你放入app.png,那麼就是android:icon="@drawable/app")

2. Android編程問題之R.drawable.icon

Android 自帶圖標庫 android.R.drawable
desandroidstylejavahtmlsrc文件Gocom
在xml文件中調用。
android:title="@string/secure_connect"
android:orderInCategory="100"
android:icon="@android:drawable/ic_menu_search"
android:drawableRight="@android:drawable/arrow_down_float"/>
程序中調用。
setIcon(android.R.drawable.stat_notify_error)
Android 自帶圖標庫 android.R.drawable

3. 如何更改Android系統自帶主題欄中的默認圖標

總而言之,現下還有許多Android用戶存在「美化難」的問題。當然有人說大不了裝個Launcher唄。這確實是Android的強項,什麼都能換,但你又是否真的能舍棄默認桌面,能不去糾結各種內存CPU的佔用問題呢? 如果你是美化控,如果你有圖標風格統一強迫症,跟著我稍稍彌補一下「美化難」的遺憾吧! Step 1:安裝Xposed框架和Icon Themer 這兩個應用是美化的基礎。 Xposed框架是一款可以在不修改APK的情況下影響程序運行(修改系統)的框架服務,基於它可以製作出許多功能強大的模塊,且在功能不沖突的情況下同時運作。 替換原生Launcher圖標的Icon Themer(圖標隨便換)正是基於此框架。安裝完畢,美化工作就可以開始了。 圖標隨便換 什麼是二維碼分類:工具 適用:極客 Android Xposed模塊 什麼是二維碼分類:工具 適用:極客 Android Step 2:安裝第三方主題應用 網上現在有非常多的第三方主題APK,但是大多數都是針對Nova/Apex/ADW等桌面的,對TouchWiz/Sense等幾乎沒有支持,但美化仍然要靠這些主題的幫助。 找一個包含你所喜愛圖標的主題APK(其他美化元素可以無視,因為只支持圖標的替換)或者圖標包,如MIUI X5 HD、Ico. Pack、Portal Pack、iNex、stockUI Icon都是不錯的選擇,完成後安裝即可。 Step 3:使用圖標隨便換更改圖標 主題安裝完成後打開圖標隨便換,展開列表你就可以看到已安裝的主題,選擇你想使用的主題或圖標包,將Use Icon Mask/Shaders打勾,然後點擊Apply Icon Pack,等待圖標應用,待彈出Icon Pack Applied對話框後點擊Got it!即可。 建議第一次使用的時候不要點擊Got it而是點擊Soft Reboot以防出錯,如果點擊Got it!後圖標並未應用成功,也可重復上述步驟後點擊Soft Reboot。 雖然只是更換圖標,美化幅度有限,而且第三方主題大多對國內APP支持並不好,但始終是將美化的「不可能」變成了可能,而且並不會給內存或是CPU帶去更多負擔,那何樂而不為呢。

4. Android 中actionbar 最右邊的三個小點圖標怎麼替換想要替換掉系統自帶的,求知道的給個答案

styles.xml 文件中加上粗體代碼


<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here.-->
<item name="colorPrimary">@color/title</item><!-- actionbar color-->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item><!--登錄編輯框顏色-->

<!-- 更換右側actionbar圖標-->
<item name="android:actionOverflowButtonStyle">@style/OverflowStyle</item>

</style>

<style name="OverflowStyle">
<item name="android:src">@mipmap/setting</item>
</style>

</resources>

5. 安卓手機如何打開.icon文件

Android系統中自帶了很多圖標,下面就是菜單使用系統圖標的例子

myMenuItem.setIcon(android.R.drawable.ic_menu_help);
具體所有圖標見如下網站:
Android™ 1.5 android.R.drawable Icon Resources
http://since2006.com/android/1.5-drawables.php

Android™ 1.6 android.R.drawable Icon Resources
http://since2006.com/android/1.6-drawables.php

Android™ 2.1 android.R.drawable Icon Resources
http://since2006.com/android/2.1-drawables.php

6. android中帶圖標的按鈕(ImageButton)怎麼用

除了Android系統自帶的Button按鈕以外,還提供了帶圖標的按鈕ImageButton
要製作帶圖標的按鈕,首先要在布局文件中定義ImageButton,然後通過setImageDrawable方法來設置要顯示的圖標。
注意:
我們可以在布局文件中就直接設置按鈕的圖標,如
android:src=」@drawable/icon1″
我們也可以在程序中設置自定義圖標
imgbtn3.setImageDrawable(getResources().getDrawable(R.drawable.icon2));
我們還可以使用系統自帶的圖標
imgbtn4.setImageDrawable(getResources().getDrawable(android.R.drawable.sym_call_incoming));
設置完按鈕的圖標後,需要為按鈕設置監聽setOnClickListener,以此捕獲事件並處理
下面的例子講述的是由4個圖標按鈕組成的布局,其中三個按鈕的圖標是自定義的,第四個按鈕的圖標是系統的,當點擊按鈕1的時候,彈出dialog,當點擊按鈕2的時候,點擊確定後,可以將按鈕2的圖標變成按鈕3的圖標,當點擊按鈕3的時候,按鈕3的圖標變成了系統打電話的圖標,點擊按鈕4,顯示一個提示dialog
ImageButtonTest.java源代碼
package org.loulijun.imagebutton;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

public class ImageButtonTest extends Activity {
/** Called when the activity is first created. */
TextView textview;
ImageButton imgbtn1;
ImageButton imgbtn2;
ImageButton imgbtn3;
ImageButton imgbtn4;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

textview=(TextView)findViewById(R.id.textview);
//分別取得4個ImageButton對象
imgbtn1=(ImageButton)findViewById(R.id.imagebutton1);
imgbtn2=(ImageButton)findViewById(R.id.imagebutton2);
imgbtn3=(ImageButton)findViewById(R.id.imagebutton3);
imgbtn4=(ImageButton)findViewById(R.id.imagebutton4);

//分別為ImageButton設置圖標
//imgbtn1已經在main.xml布局中設置了圖標,所以就不在這里設置了(設置圖標即可在程序中設置,也可在布局文件中設置)
imgbtn2.setImageDrawable(getResources().getDrawable(R.drawable.icon));//在程序中設置圖標
imgbtn3.setImageDrawable(getResources().getDrawable(R.drawable.icon2));
imgbtn4.setImageDrawable(getResources().getDrawable(android.R.drawable.sym_call_incoming));//設置系統圖標

//下面為各個按鈕設置事件監聽
imgbtn1.setOnClickListener(new Button.OnClickListener()
{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Dialog dialog=new AlertDialog.Builder(ImageButtonTest.this)
.setTitle("提示")
.setMessage("我是ImageButton1")
.setPositiveButton("確定",new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
//相應的處理操作
}
}).create();
dialog.show();
}

});

imgbtn2.setOnClickListener(new Button.OnClickListener()
{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Dialog dialog=new AlertDialog.Builder(ImageButtonTest.this)
.setTitle("提示")
.setMessage("我是ImageButton2,我要使用ImageButton3的圖標")
.setPositiveButton("確定",new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
imgbtn2.setImageDrawable(getResources().getDrawable(R.drawable.icon2));
}
}).create();
dialog.show();
}

});

imgbtn3.setOnClickListener(new Button.OnClickListener()
{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Dialog dialog=new AlertDialog.Builder(ImageButtonTest.this)
.setTitle("提示")
.setMessage("我是ImageButton3,我想使用系統打電話的圖標")
.setPositiveButton("確定",new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
imgbtn3.setImageDrawable(getResources().getDrawable(android.R.drawable.sym_action_call));
}
}).create();
dialog.show();
}

});

imgbtn4.setOnClickListener(new Button.OnClickListener()
{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Dialog dialog=new AlertDialog.Builder(ImageButtonTest.this)
.setTitle("提示")
.setMessage("我是使用的系統圖標")
.setPositiveButton("確定",new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
//相應的處理操作
}
}).create();
dialog.show();
}

});
}
}

布局文件main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="ImageButton測試案例"
/>
<ImageButton
android:id="@+id/imagebutton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon1"
/>
<ImageButton
android:id="@+id/imagebutton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageButton
android:id="@+id/imagebutton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageButton
android:id="@+id/imagebutton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>

熱點內容
紅帆oa伺服器地址查詢 發布:2025-02-07 14:31:41 瀏覽:657
文本框腳本圖片 發布:2025-02-07 14:23:28 瀏覽:231
少兒編程c語言 發布:2025-02-07 14:22:50 瀏覽:218
一階低通濾波器c語言 發布:2025-02-07 14:22:37 瀏覽:852
電腦的東西為什麼粘貼不到伺服器 發布:2025-02-07 14:21:04 瀏覽:197
手機脫模解壓視頻 發布:2025-02-07 14:20:18 瀏覽:473
密碼多少密碼多少密碼多少密碼 發布:2025-02-07 14:07:30 瀏覽:857
我的世界啟動器電腦伺服器 發布:2025-02-07 14:07:27 瀏覽:484
愛加密深圳科技有限 發布:2025-02-07 14:07:26 瀏覽:87
c語言密碼星號 發布:2025-02-07 14:07:24 瀏覽:801