㈠ android 怎麼在點擊按鈕後更改背景
只需要給Button配置一個Selector背景選擇器即可實現。
1.創建mylist_view.xml文件
首先在res目錄下新建drawable文件夾,再在新建的drawable文件夾中新建mylist_view.xml,其目錄結構為:res/drawable/mylist_view.xml。
2.根據具體需求編輯mylist_view.xml文件
新建mylist_view.xml文件後,在沒有添加任何屬性時其內部代碼結構為:
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
</selector>
3.下面就可以根據項目需求,在其內部定義為自己想要的樣式了,主要屬性如下:
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 默認時的背景圖片-->
<item android:drawable="@drawable/pic1" />
<!-- 沒有焦點時的背景圖片 -->
<item android:state_window_focused="false" android:drawable="@drawable/pic1" />
<!-- 非觸摸模式下獲得焦點並單擊時的背景圖片 -->
<item android:state_focused="true" android:state_pressed="true" android:drawable= "@drawable/pic2" />
<!-- 觸摸模式下單擊時的背景圖片-->
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/pic3" />
<!--選中時的圖片背景-->
<item android:state_selected="true" android:drawable="@drawable/pic4" />
<!--獲得焦點時的圖片背景-->
<item android:state_focused="true" android:drawable="@drawable/pic5" />
</selector>
4.引用mylist_view.xml文件
android:background="@drawable/mylist_view"
㈡ 怎麼通過修改Android系統文件,來改變安卓程序的背景圖片和系統設置的背景圖
首先,取得root許可權,然後用re文件管理器進入system\framework,復制framework—res,apk到sd卡,然後把它移動到電腦上,不解壓,乜不用改後綴名,直接右鍵,然後點打開方式,選擇winrar,打開後在打開res,在打開drawable—mdpi,這時再把要改成設置菜單背景的圖片(尺寸為320-480,圖片格式為png)重新命名為gbg後直接用滑鼠拖進剛才打開的drawable—mdpi裡面的任何一個空白區,注意了,這個時候壓縮方式一定要選成儲存。然後確定,就可以關掉,把framework—res,apk移動回sd卡,然後再放到system裡面,更改許可權後(第一列全勾,第二列勾第一個,其他的不管)再移動到framework裡面替換,就已經替換好了,不用重新開機, 我已經成功了
㈢ 安卓開發軟體主界面背景怎麼加
有兩種方式
1、引用style:定義好一個style設置
<style name="MyWinStyle">
<item name="android:background">你的背景</item>
</style>然後在Manifest裡面的Activity上加上
android:theme="@style/MyWinStyle"2、直接在activity綁定的layout裡面的最外層加上
android:background="你的背景"
㈣ 安卓開發怎樣實現點擊按鈕更換所有界面的背景圖
button.setBackgroundResource(R.drawable.beijing1); 上面是改變按鈕背景的代碼 可以做兩組圖片,分別為button1的選中和為選擇狀態、button2的選中和為選擇狀態,讓後再button1和button2的點擊事件中,對兩個按鈕的背景進行改變,就可以了
㈤ androidstudio怎麼修改軟體背景顏色
打開設置>Editor>Colors&Fonts>General>
保存自己的一個主題,原來的主題是不能修改的,只能另存,再進行修改,隨便起個名字
選中 default text,右側 勾選background,在background後面就可以選擇顏色
選完顏色,點擊choose就可看到下方的預覽窗口的效果了,點擊確定就可以看到代碼窗口背景顏色已經設置好了
㈥ android開發中 改變背景的代碼是什麼
在java代碼中設置
背景資源如果在res drawable下面:
view.setBackgroundResource(R.drawable.img);
背景資源如果是顏色值:
view.setBackgroundColor(R.color.white);
背景資源如果是drawable對象:
view.setBackground(drawable);
在xml中設置
android:backgroud="@drawable/img"
或
android:backgroud="@color/white"
㈦ android系統如何替換背景圖片
右擊桌面~屬性~桌面~背景可先任意一個主題。
如果你需個性主題你可點游覽到你文檔上傳即可。
㈧ 怎樣修改安卓系統背景和簡訊背景懸賞
Android手機系統背景更換,簡訊界面透明。
工具/原料
re瀏覽器
電腦端壓縮軟體(好壓orWinRaR)
方法/步驟
下面系統背景更換教程步驟十分簡單。當然,前提是手機已經root。下面是詳細的步驟,只要認識下面的字都會操作)
1、用re瀏覽器打開; system/framework,復制SemcGenericUxpRes.apk到SD卡2、將文件放到電腦桌面,最好能備份一份,將後綴.apk改為.zip!3、打開壓縮包,將res文件夾拉出來4、系統背景圖就在res/drawable-hdpi中5、找到圖片semc_ bg.png,這個就是我們需要更換的圖片了這步就是機油自由發揮的時候了,隨便更改美化,然後再將圖片替換上就是了7、將原壓縮包的res文件夾刪除,將換好圖的res重新放入8、將.zip重新改為.apk然後放回SD卡9、用RE瀏覽器將已修改的xx.apk放到system中,先修改權;限。(原來的許可權!)這一步很重要,不要和第十步順序搞錯了!!10、修改完許可權後再將xx.apk移到到framework覆蓋原文件11、重啟~~OK!!注意:第9和第10步一定要注意!!切勿掉亂順序
下面簡訊界面透明教程先從原ROM里提取出未編譯過的mms.apk
一、反編譯Mms.apk二、路徑res/drawable/conversation_item_background_read.xml 打開,找到;<item android:state_selected="false"android:drawable="@color/read_bgcolor" />修改為:<item android:state_selected="false"android:drawable="@android:color/transparent" />保存,退出!!!三、路徑res/drawable/conversation_item_background_unread.xml 打開,找到<item android:state_selected="false"android:drawable="@color/unread_bgcolor" />修改為:<item android:state_selected="false"android:drawable="@android:color/transparent" />保存,退出四、路徑res/layout/compose_message_activity.xml 打開,找到<EditText android:textSize="16.0sp"android:textColorHint="#ff858585"android:id="@id/subject"android:visibility="gone"android:layout_width="fill_parent"android:layout_height="wrap_content" android:layout_marginLeft="3.2999878dip"android:layout_marginTop="5.299988dip"android:layout_marginRight="3.2999878dip" android:hint="@string/subject_hint"android:singleLine="true"android:maxLength="40"android:capitalize="sentences"android:autoText="true" />修改裡面android:textColorHint="#ff858585"為:android:textColorHint="#00000000"再找到:<EditText android:textSize="18.0sp"android:textColor="@touchwiz:color/tw_color002"android:textColorHint="#ff858585"android:gravity="top"android:id="@id/embedded_text_editor"android:background="#ffffffff"android:nextFocusRight="@id/send_button"android:layout_width="wrap_content" android:layout_height="fill_parent"android:layout_marginLeft="10.0dip"android:layout_marginTop="12.0dip"android:hint="@string/type_to_compose_text_enter_to_send" android:capitalize="sentences"android:autoText="true"android:layout_toLeftOf="@id/sendbuttons"android:layout_alignParentLeft="true" android:inputType="textCapSentences|textAutoCorrect|textMultiLine"android:imeOptions="actionSend|flagNoEnterAction" />修改裡面兩段代碼:android:textColorHint="#ff858585"修改為android:textColorHint="#00000000"
END
注意事項
手機要root
經驗內容僅供參考,
㈨ android studio 怎麼設置背景
方法/步驟
1,首先打開軟體,看看現在的背景是什麼樣子,,
2,在菜單欄中的file欄下選擇「settings」,並找到外觀「appearance」。
3,修改主題「theme」,軟體自帶三種可選主題。
4,主題一:Darcula,就是當今最流行的背景主題,
5,主題二:Intellij,灰白系列,相比第三個windows主題更好看一些,但個人還是覺得Darcula最好。
6,確定好主題後,選擇「restart」重啟軟體。就可以看到的背景,頓時覺得高大上了有木有。
END
注意事項
大家如果覺得這三款主題都不喜歡,可以去網上搜索別人製作的背景主題,然後安裝插件修改主題