自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

一鍵換膚

移動(dòng)開發(fā)
APP一鍵換膚的實(shí)現(xiàn)

源碼簡(jiǎn)介

APP一鍵換膚的實(shí)現(xiàn)
源碼運(yùn)行截圖

 

源碼片段:

  1. public final static String SHARED_PREFERENCES_NAME = "andnav_preferences"
  2.   
  3.     public final static String PREF_THEME_RESID_ID = "theme_resid"
  4.       
  5.     public final static String TITLE_ID ="title_id"
  6.       
  7.     public static void setTitle(Activity act) 
  8.     { 
  9.           SharedPreferences sPref = act.getSharedPreferences(SHARED_PREFERENCES_NAME, 0); 
  10.         TextView title = (TextView) act.findViewById(R.id.titleTv); 
  11.         int title_resid = sPref.getInt(TITLE_ID, R.drawable.color1); 
  12.         title.setBackgroundResource(title_resid); 
  13.     } 
  14.     public static void setValue(Activity act,int theme_resid,int title_resid) 
  15.     { 
  16.          SharedPreferences sPref = act.getSharedPreferences(SHARED_PREFERENCES_NAME, 0); 
  17.          Editor editor = sPref.edit(); 
  18.          editor.putInt(PREF_THEME_RESID_ID, theme_resid); 
  19.          editor.putInt(TITLE_ID, title_resid); 
  20.          editor.commit(); 
  21.     } 

源碼下載:http://down.51cto.com/data/1982408

責(zé)任編輯:chenqingxiang 來源: 網(wǎng)絡(luò)整理
相關(guān)推薦

2021-04-23 10:38:52

Spring BootSpringMVC源碼

2022-04-07 13:56:13

前端一鍵換膚

2015-11-03 15:29:49

ONOS開放網(wǎng)絡(luò)操作系統(tǒng)SDN

2023-06-15 10:00:00

Jenkins任務(wù)操作

2025-04-17 04:00:00

2012-03-01 14:00:08

2018-03-20 12:30:44

iOSPush抓包

2020-11-24 11:00:24

前端

2021-12-02 07:50:29

分支服務(wù)git worktre

2024-10-17 11:09:46

2023-05-29 09:08:27

SQL日志數(shù)據(jù)

2025-04-02 09:10:00

LinuxShell腳本

2022-01-09 23:09:08

Windows 10Windows微軟

2011-01-27 10:40:08

2012-11-26 17:09:42

Windows 8

2018-08-29 08:19:43

iPhone求救手機(jī)

2011-09-15 19:05:49

windows 7一鍵關(guān)機(jī)

2024-07-15 12:27:08

2020-03-31 15:03:56

Spring Boot代碼Java

2024-01-30 00:32:49

Linux網(wǎng)卡
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)