Android9.0 SystemUI 網(wǎng)絡(luò)信號(hào)欄定制修改的流程解析
前情提要
Android 8.1平臺(tái)SystemUI 導(dǎo)航欄加載流程解析
9.0 改動(dòng)點(diǎn)簡(jiǎn)要說(shuō)明
1、新增 StatusBarMobileView 替代 SignalClusterView,用以控制信號(hào)欄顯示
同時(shí)增加的還有 StatusBarIconView、StatusBarWifiView
2、整體流程和 8.1 類似
效果圖

整體流程圖

上代碼

先來(lái)看初始賦值的地方 MobileSignalController.java,在 notifyListeners() 方法中進(jìn)行我們對(duì)應(yīng)的定制,
最后通過(guò) callback.setMobileDataIndicators() 將狀態(tài)值傳遞到 StatusBarSignalPolicy.java 解析顯示
vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\policy\MobileSignalController.java
@Override
public void notifyListeners(SignalCallback callback) {
MobileIconGroup icons = getIcons();
String contentDescription = getStringIfExists(getContentDescription());
String dataContentDescription = getStringIfExists(icons.mDataContentDescription);
if (mCurrentState.inetCondition == 0) {
dataContentDescription = mContext.getString(R.string.data_connection_no_internet);
}
final boolean dataDisabled = mCurrentState.iconGroup == TelephonyIcons.DATA_DISABLED
&& mCurrentState.userSetup;
/// M: Customize the signal strength icon id. @ {
int iconId = getCurrentIconId();
iconId = mStatusBarExt.getCustomizeSignalStrengthIcon(
mSubscriptionInfo.getSubscriptionId(),
iconId,
mSignalStrength,
mDataNetType,
mServiceState);
/// @ }
if (mSignalStrength != null) {
/*int dbm = mSignalStrength.getDbm();
int asu = mSignalStrength.getAsuLevel();
Log.i("ccz","dbm="+dbm + " asu="+asu);*/
Log.e("ccz", "isGSM=="+mSignalStrength.isGsm()
+ " connected=="+mCurrentState.connected+" dataConnected=="+mCurrentState.dataConnected);
}
if (mCurrentState.connected) {
//cczheng add get signal icon [S]
//通過(guò) getSignalStrengthIcon 方法,根據(jù)自定義規(guī)則,返回要顯示對(duì)應(yīng)資源id
iconId = TelephonyIcons.getSignalStrengthIcon(mSignalStrength != null ? mSignalStrength.getDbm() : -120,
mSignalStrength != null ? mSignalStrength.getAsuLevel() : 0);
//iconId = TelephonyIcons.getSignalStrengthIcon(mCurrentState.level);
//cczheng add get signal icon [E]
}else{//未連接成功時(shí)顯示 X
iconId = R.drawable.stat_sys_signal_disable;
}
// Show icon in QS when we are connected or data is disabled.
boolean showDataIcon = mCurrentState.dataConnected || dataDisabled;
Log.i("ccz","dataDisabled="+dataDisabled + " showDataIcon="+showDataIcon);
IconState statusIcon = new IconState(mCurrentState.enabled && !mCurrentState.airplaneMode,
iconId, contentDescription);
int qsTypeIcon = 0;
IconState qsIcon = null;
String description = null;
// Only send data sim callbacks to QS.
if (mCurrentState.dataSim) {
qsTypeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.mQsDataType : 0;
qsIcon = new IconState(mCurrentState.enabled
&& !mCurrentState.isEmergency, getQsCurrentIconId(), contentDescription);
description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
}
boolean activityIn = mCurrentState.dataConnected
&& !mCurrentState.carrierNetworkChangeMode
&& mCurrentState.activityIn;
boolean activityOut = mCurrentState.dataConnected
&& !mCurrentState.carrierNetworkChangeMode
&& mCurrentState.activityOut;
showDataIcon &= mCurrentState.isDefault || dataDisabled;
int typeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.mDataType : 0;
/// M: Add for lwa.
typeIcon = mCurrentState.lwaRegState == NetworkTypeUtils.LWA_STATE_CONNCTED
&& showDataIcon ? NetworkTypeUtils.LWA_ICON : typeIcon;
/** M: Support [Network Type on StatusBar], change the implement methods.
* Get the network icon base on service state.
* Add one more parameter for network type.
* @ { **/
int networkIcon = mCurrentState.networkIcon;
/// M: Support volte icon.Bug fix when airplane mode is on go to hide volte icon
int volteIcon = mCurrentState.airplaneMode && !isImsOverWfc()
? 0 : mCurrentState.volteIcon;
/// M: when data disabled, common show data icon as x, but op do not need show it @ {
mStatusBarExt.isDataDisabled(mSubscriptionInfo.getSubscriptionId(), dataDisabled);
/// @ }
/// M: Customize the data type icon id. @ {
typeIcon = mStatusBarExt.getDataTypeIcon(
mSubscriptionInfo.getSubscriptionId(),
typeIcon,
mDataNetType,
mCurrentState.dataConnected ? TelephonyManager.DATA_CONNECTED :
TelephonyManager.DATA_DISCONNECTED,
mServiceState);
/// @ }
/// M: Customize the network type icon id. @ {
networkIcon = mStatusBarExt.getNetworkTypeIcon(
mSubscriptionInfo.getSubscriptionId(),
networkIcon,
mDataNetType,
mServiceState);
/// for operator
//通過(guò) description 傳遞運(yùn)營(yíng)商信息
description = mCurrentState.operator;
// for qsdatetype
qsTypeIcon = mCurrentState.mQsDataType;
/// @ }
//cczheng add for when datadisable set mMobileDataActivity GONE [S]
//數(shù)據(jù)網(wǎng)絡(luò)關(guān)閉時(shí),id 置為0,不顯示上下行小箭頭
if (isDataDisabled()) {
typeIcon = 0;
}
Log.d("ccz", "qsTypeIcon="+qsTypeIcon);
//cczheng add for when datadisable set mMobileDataActivity GONE [E]
Log.e("ccz", " showDataIcon="+showDataIcon+" activityIn="+activityIn
+" activityOut="+activityOut);
Log.i("ccz", "networkName="+mCurrentState.networkName + " description="+description);
callback.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, networkIcon, volteIcon,
qsTypeIcon,activityIn, activityOut, dataContentDescription, description,
icons.mIsWide, mSubscriptionInfo.getSubscriptionId(), mCurrentState.roaming,
mCurrentState.isDefaultData, mCurrentState.customizedState);
/// M: update plmn label @{
mNetworkController.refreshPlmnCarrierLabel();
/// @}
}
private final void updateTelephony() {
.....
/// M: For network type big icon.
mCurrentState.networkIcon =
NetworkTypeUtils.getNetworkTypeIcon(mServiceState, mConfig, hasService());
/// M: For volte type icon.
mCurrentState.volteIcon = getVolteIcon();
//cczheng add for qsdatetype
mCurrentState.mQsDataType = ((MobileIconGroup)mCurrentState.iconGroup).mQsDataType;
//cczheng add for operator
mCurrentState.operator = getOperatorType();
notifyListenersIfNecessary();
}
private String getOperatorType(){
if (!hasService()) {
// Not in service, don't show operator
return "0";
}
int operatorType = NetworkTypeUtils.getOperatorType(mPhone);
if (operatorType == 0)
return "0";
else
return mContext.getResources().getString(operatorType);
}
根據(jù)通用標(biāo)準(zhǔn)自定義顯示規(guī)則
dbm >= -107 4格
-107 > dbm >= -111 3格
-111 > dbm >= -114 2格
-114 > dbm >= -117 1格
vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\policy\TelephonyIcons.java
static final int[] TELEPHONY_SIGNAL_STRENGTH_FULL = {
R.drawable.stat_sys_signal_0_fully,
R.drawable.stat_sys_signal_1_fully,
R.drawable.stat_sys_signal_2_fully,
R.drawable.stat_sys_signal_3_fully,
R.drawable.stat_sys_signal_4_fully,
};
/**
* Customize Signal strength icon.
* @param level telephony signal strength leve.
* @return Signal strength icon id.
*/
static final int getSignalStrengthIcon(int level) {
android.util.Log.e("ccz", "getSignalStrengthIcon() level=="+level);
if (level >= 0 && level < TELEPHONY_SIGNAL_STRENGTH_FULL.length) {
return TELEPHONY_SIGNAL_STRENGTH_FULL[level];
}
return 0;
}
static final int getSignalStrengthIcon(int dbm, int asu) {
int level = 0;
if(dbm >= -107) level = 4;
else if (dbm >= -111) level = 3;
else if (dbm >= -114) level = 2;
else if (dbm >= -117) level = 1;
android.util.Log.e("ccz", "getSignalStrengthIcon() dbm=="+dbm + " asu=="+asu + " level=="+level);
return TELEPHONY_SIGNAL_STRENGTH_FULL[level];
}
舍棄原來(lái)的網(wǎng)絡(luò)大圖標(biāo),新增網(wǎng)絡(luò)小圖標(biāo),這樣可以在下方顯示網(wǎng)絡(luò)數(shù)據(jù)圖標(biāo)
vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\mediatek\systemui\statusbar\networktype\NetworkTypeUtils.java
//cczheng add show small networkType
static final Map<Integer, Integer> sNetworkTypeSmallIcons = new HashMap<Integer, Integer>() {
{
// For CDMA 3G
put(TelephonyManager.NETWORK_TYPE_EVDO_0, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_EVDO_A, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_EVDO_B, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_EHRPD, R.drawable.stat_sys_data_fully_connected_3g);
// For CDMA 1x
put(TelephonyManager.NETWORK_TYPE_CDMA, R.drawable.stat_sys_data_fully_connected_1x);
put(TelephonyManager.NETWORK_TYPE_1xRTT, R.drawable.stat_sys_data_fully_connected_1x);
// Edge
put(TelephonyManager.NETWORK_TYPE_EDGE, R.drawable.stat_sys_data_fully_connected_e);
// 3G
put(TelephonyManager.NETWORK_TYPE_UMTS, R.drawable.stat_sys_data_fully_connected_3g);
// For 4G
put(TelephonyManager.NETWORK_TYPE_LTE, R.drawable.stat_sys_data_fully_connected_4g);
// 3G
put(TelephonyManager.NETWORK_TYPE_HSDPA, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_HSUPA, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_HSPA, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_HSPAP, R.drawable.stat_sys_data_fully_connected_3g);
put(TelephonyManager.NETWORK_TYPE_IWLAN, 0);
}
};
public static int getNetworkTypeIcon(ServiceState serviceState, Config config,
boolean hasService) {
if (!hasService) {
// Not in service, no network type.
return 0;
}
int tempNetworkType = getNetworkType(serviceState);
//cczheng change sNetworkTypeIcons to sNetworkTypeSmallIcons, show small networkType
//Integer iconId = sNetworkTypeIcons.get(tempNetworkType);
Integer iconId = sNetworkTypeSmallIcons.get(tempNetworkType);//add
if (iconId == null) {
iconId = tempNetworkType == TelephonyManager.NETWORK_TYPE_UNKNOWN ? 0 :
config.showAtLeast3G ? R.drawable.stat_sys_network_type_3g :
R.drawable.stat_sys_network_type_g;
}
Log.i("ccz", "Operator=="+ serviceState.getOperatorAlphaLong());
return iconId.intValue();
}
//cczheng add for operatortype
static final int[] OPERATOR_TYPE = {
R.string.operator_cmcc,//CHINA_MOBILE
R.string.operator_cucc,//CHINA_UNICOM
R.string.operator_ctcc//CHINA_TELECOM
};
public static int getOperatorType(TelephonyManager telephonyManager) {
int type = 0;
String operator = telephonyManager.getSimOperator();
switch (operator) {
case "46000":
case "46002":
case "46007":
case "41004":
type = OPERATOR_TYPE[0];
break;
case "46001":
case "46006":
type = OPERATOR_TYPE[1];
break;
case "46003":
case "46011":
type = OPERATOR_TYPE[2];
break;
default:
break;
}
return type;
}
StatusBarSignalPolicy 通過(guò) description 傳遞運(yùn)營(yíng)商類型
vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\phone\StatusBarSignalPolicy.java
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
int networkType, int volteIcon, int qsType, boolean activityIn, boolean activityOut,
String typeContentDescription, String description, boolean isWide, int subId,
boolean roaming, boolean isDefaultData, int customizedState) {
Log.i("ccz","StatusBarSignalPolicy setMobileDataIndicators()");
MobileIconState state = getState(subId);
if (state == null) {
return;
}
.....
//cczheng add for operator because description is unless
state.mOperator = description;
Log.e("ccz","mMobileStrengthId="+statusIcon.icon);
// Always send a copy to maintain value type semantics
mIconController.setMobileIcons(mSlotMobile, MobileIconState.copyStates(mMobileStates));
}
StatusBarMobileView 獲取傳遞的資源id值顯示對(duì)應(yīng)的圖標(biāo)
vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\StatusBarMobileView.java
public class StatusBarMobileView extends FrameLayout implements DarkReceiver,
StatusIconDisplayable {
private static final String TAG = "StatusBarMobileView";
....
//cczheng add
private ImageView mMobileDataActivity;
private TextView mOperatorType;
private void init() {
....
mNetworkType = findViewById(R.id.network_type);
mVolteType = findViewById(R.id.volte_indicator_ext);
/// @}
mMobileDataActivity = findViewById(R.id.data_inout);
mOperatorType = findViewById(R.id.tv_operator);
mMobileDrawable = new SignalDrawable(getContext());
//cczheng annotaion don't use system full style
//mMobile.setImageDrawable(mMobileDrawable);
initDotView();
mIsWfcEnable = SystemProperties.get("persist.vendor.mtk_wfc_support").equals("1");
/// M: Add for Plugin feature @ {
mStatusBarExt = OpSystemUICustomizationFactoryBase.getOpFactory(mContext)
.makeSystemUIStatusBar(mContext);
/// @ }
}
private void initViewState() {
setContentDescription(mState.contentDescription);
if (!mState.visible) {
mMobileGroup.setVisibility(View.GONE);
} else {
mMobileGroup.setVisibility(View.VISIBLE);
}
//cczheng don't use system style change empty line style 注釋原來(lái)的實(shí)心信號(hào)格
//mMobileDrawable.setLevel(mState.strengthId);
mMobile.setImageResource(mState.strengthId);
//show date in out icon 數(shù)據(jù)流量小箭頭
mMobileDataActivity.setImageResource(getDataActivityIcon(mState.activityIn, mState.activityOut));
if (mState.typeId > 0) {
if (!mStatusBarExt.disableHostFunction()) {
mMobileType.setContentDescription(mState.typeContentDescription);
mMobileType.setImageResource(mState.typeId);
}
//cczheng hide small datatype icon x or 4G
mMobileType.setVisibility(View.GONE /*View.VISIBLE*/);
} else {
mMobileType.setVisibility(View.GONE);
}
mMobileRoaming.setVisibility(mState.roaming ? View.VISIBLE : View.GONE);
mIn.setVisibility(mState.activityIn ? View.VISIBLE : View.GONE);
mOut.setVisibility(mState.activityIn ? View.VISIBLE : View.GONE);
//mInoutContainer.setVisibility((mState.activityIn || mState.activityOut)
// ? View.VISIBLE : View.GONE);
mMobileDataActivity.setVisibility(mState.typeId != 0 ? View.VISIBLE : View.GONE);
/// M: Add for [Network Type and volte on Statusbar] @{
setCustomizeViewProperty();
/// @}
showWfcIfAirplaneMode();
/// M: Add data group for plugin feature. @ {
mStatusBarExt.addCustomizedView(mState.subId, mContext, mMobileGroup);
setCustomizedOpViews();
/// @ }
}
private void updateState(MobileIconState state) {
setContentDescription(state.contentDescription);
if (mState.visible != state.visible) {
mMobileGroup.setVisibility(state.visible ? View.VISIBLE : View.GONE);
// To avoid StatusBarMobileView will not show in extreme case,
// force request layout once if visible state changed.
requestLayout();
}
if (mState.strengthId != state.strengthId) {
//cczheng don't use system style change empty line style
//mMobileDrawable.setLevel(state.strengthId);
mMobile.setImageResource(state.strengthId);
}
//show date in out icon
mMobileDataActivity.setImageResource(getDataActivityIcon(state.activityIn, state.activityOut));
if (mState.typeId != state.typeId) {
if (state.typeId != 0) {
if (!mStatusBarExt.disableHostFunction()) {
mMobileType.setContentDescription(state.typeContentDescription);
mMobileType.setImageResource(state.typeId);
}
//cczheng hide small datatype icon x or 4G
//數(shù)據(jù)流量標(biāo)識(shí) mMobileDataActivity 替代 mMobileType
mMobileType.setVisibility(View.GONE /*View.VISIBLE*/);
} else {
mMobileType.setVisibility(View.GONE);
}
}
mMobileRoaming.setVisibility(state.roaming ? View.VISIBLE : View.GONE);
mIn.setVisibility(state.activityIn ? View.VISIBLE : View.GONE);
mOut.setVisibility(state.activityIn ? View.VISIBLE : View.GONE);
//mInoutContainer.setVisibility((state.activityIn || state.activityOut)
// ? View.VISIBLE : View.GONE);
mMobileDataActivity.setVisibility(state.typeId != 0 ? View.VISIBLE : View.GONE);
/// M: Add for [Network Type and volte on Statusbar] @{
if (mState.networkIcon != state.networkIcon) {
setNetworkIcon(state.networkIcon);
}
if (mState.volteIcon != state.volteIcon) {
setVolteIcon(state.volteIcon);
}
if (mState.mOperator != state.mOperator) {
setOperatorText(state.mOperator);
}
if (mState.mCustomizedState != state.mCustomizedState
|| mState.networkIcon != state.networkIcon) {
// if cs reg state has changed or network icon change to LTE,need to update.
mStatusBarExt.setDisVolteView(mState.subId, state.volteIcon, mVolteType);
}
/// @}
mState = state;
// should added after set mState
showWfcIfAirplaneMode();
setCustomizedOpViews();
}
//cczheng add for data in out icon [S]
final int DATA_ACTIVITY_NONE = R.drawable.ct_stat_sys_signal_not_inout;
final int DATA_ACTIVITY_IN = R.drawable.ct_stat_sys_signal_in;
final int DATA_ACTIVITY_OUT = R.drawable.ct_stat_sys_signal_out;
final int DATA_ACTIVITY_INOUT = R.drawable.ct_stat_sys_signal_inout;
/**
* M: getDataActivityIcon: Get DataActivity icon by dataActivity type.
* @param activityIn : dataActivity Type
* @param activityOut : dataActivity Type
* @return dataActivity icon ID
*/
public int getDataActivityIcon(boolean activityIn, boolean activityOut) {
Log.i("ccz", "mActivityIn="+activityIn+" mActivityOut="+activityOut);
int icon = DATA_ACTIVITY_NONE;
if (activityIn && activityOut) {
icon = DATA_ACTIVITY_INOUT;
}else if (activityIn) {
icon = DATA_ACTIVITY_IN;
}else if (activityOut) {
icon = DATA_ACTIVITY_OUT;
}
return icon;
}
//cczheng add for data in out icon [S]
private void setOperatorText(String mOperator){
if ("0".equals(mOperator)) {
mOperatorType.setVisibility(View.GONE);
} else {
mOperatorType.setText(mOperator);
mOperatorType.setVisibility(View.VISIBLE);
}
}
StatusBarMobileView 對(duì)應(yīng)布局文件 status_bar_mobile_signal_group 修改
vendor\mediatek\proprietary\packages\apps\SystemUI\res\layout\status_bar_mobile_signal_group.xml
<com.android.systemui.statusbar.StatusBarMobileView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" android:id="@+id/mobile_combo" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" > <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/mobile_group" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" android:orientation="horizontal" > <ImageView android:id="@+id/volte_indicator_ext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:visibility="gone" /> <!-- <ImageView android:id="@+id/network_type" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_vertical" android:visibility="gone" /> --> <!-- cczheng annotaion network_type and add data in out view--> <FrameLayout android:layout_height="17dp" android:layout_width="wrap_content"> <ImageView android:id="@+id/network_type" android:layout_height="wrap_content" android:layout_width="wrap_content" android:paddingEnd="2dp" android:visibility="gone"/> <ImageView android:id="@+id/data_inout" android:layout_height="wrap_content" android:layout_width="wrap_content" android:paddingEnd="2dp" android:visibility="gone"/> </FrameLayout> <!-- end --> ....... <ImageView android:id="@+id/mobile_roaming" android:layout_width="wrap_content" android:layout_height="17dp" android:paddingStart="1dp" android:paddingTop="1.5dp" android:paddingBottom="3dp" android:paddingEnd="1dp" android:scaleType="fitCenter" android:src="@drawable/stat_sys_roaming_ext" android:contentDescription="@string/data_connection_roaming" android:visibility="gone" /> <!-- cczheng add for sim operator --> <TextView android:id="@+id/tv_operator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> </com.android.keyguard.AlphaOptimizedLinearLayout> </com.android.systemui.statusbar.StatusBarMobileView>
總結(jié)
以上所述是小編給大家介紹的Android9.0 SystemUI 網(wǎng)絡(luò)信號(hào)欄定制修改,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
如果你覺得本文對(duì)你有幫助,歡迎轉(zhuǎn)載,煩請(qǐng)注明出處,謝謝!
相關(guān)文章
Android中Splash應(yīng)用啟動(dòng)白屏問(wèn)題的解決方法
這篇文章主要為大家詳細(xì)介紹了Android中Splash應(yīng)用啟動(dòng)白屏問(wèn)題的兩種解決方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-02-02
Android ProgressBar實(shí)現(xiàn)進(jìn)度條效果
這篇文章主要為大家詳細(xì)介紹了Android ProgressBar實(shí)現(xiàn)進(jìn)度條效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-04-04
Android自定義View Flyme6的Viewpager指示器
這篇文章主要為大家詳細(xì)介紹了Android自定義View Flyme6的Viewpager指示器,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-01-01
Android實(shí)現(xiàn)點(diǎn)擊圖片上傳SQLite數(shù)據(jù)庫(kù)
這篇文章主要為大家詳細(xì)介紹了Android實(shí)現(xiàn)點(diǎn)擊圖片上傳SQLite數(shù)據(jù)庫(kù),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-08-08
Android自定義View葉子旋轉(zhuǎn)完整版(六)
這篇文章主要為大家詳細(xì)介紹了Android自定義View葉子旋轉(zhuǎn)完整版,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-03-03
Flutter實(shí)現(xiàn)自定義搜索框AppBar的示例代碼
開發(fā)中,頁(yè)面頭部為搜索樣式的設(shè)計(jì)非常常見,為了可以像系統(tǒng)AppBar那樣使用,本文將利用Flutter自定義一個(gè)搜索框,感興趣的可以了解一下2022-04-04
Android 圖片處理避免出現(xiàn)oom的方法詳解
本篇文章主要介紹了Android 圖片處理避免出現(xiàn)oom的方法詳解,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-09-09
Android SDK Manager國(guó)內(nèi)無(wú)法更新的解決方案
本文主要介紹Android SDK Manager國(guó)內(nèi)無(wú)法更新的解決方案,這里提供了解決方法,及簡(jiǎn)單說(shuō)明實(shí)現(xiàn)流程,有興趣的小伙伴可以參考下2016-09-09
Android 數(shù)據(jù)庫(kù)打包隨APK發(fā)布的實(shí)例代碼
有些時(shí)候我們的軟件用到SQLite數(shù)據(jù)庫(kù),這個(gè)時(shí)候怎么把一個(gè)做好的數(shù)據(jù)庫(kù)打包進(jìn)我們的APK呢2013-10-10
Android逆向之dex2oat的實(shí)現(xiàn)解析
虛擬機(jī)的發(fā)生展經(jīng)歷了從初期的dalvik,到中期的dalvik,以及后期的ART。但是市面上的APK文件早已已經(jīng)全球流行。為了能夠讓這些APK不加改動(dòng)的在所有虛擬機(jī)上面運(yùn)行,google采用了類似適配器模式。即在讓虛擬運(yùn)行之前多一道工序。就是dexopt2021-10-10

