Skip to content

Commit 6f38b88

Browse files
committed
1、BaseUiHelper中增加跳转到拨号界面
1 parent 9cd66e9 commit 6f38b88

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

src/main/java/common/base/utils/BaseUiHelper.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Activity;
44
import android.content.Context;
55
import android.content.Intent;
6+
import android.net.Uri;
67
import android.provider.Settings;
78
import android.view.View;
89
import android.view.inputmethod.InputMethodManager;
@@ -69,8 +70,39 @@ public static void hideInputMethod(Activity activity){
6970
}
7071
}
7172

73+
/**
74+
* 跳转到系统设置界面
75+
* @param context
76+
*/
7277
public static void jumpToSystemSetting(Context context) {
7378
Intent toSettingActionIntent = new Intent(Settings.ACTION_SETTINGS);
7479
jumpToActivity(context,toSettingActionIntent,0,false);
7580
}
81+
82+
/**
83+
* 跳转到系统拨号界面
84+
* @param context
85+
* @param toDialTelNo
86+
*/
87+
public static void jumpToSystemDialUi(Context context, String toDialTelNo) {
88+
Intent startIntent = new Intent(Intent.ACTION_DIAL);
89+
if (!Util.isEmpty(toDialTelNo)) {
90+
startIntent.setData(Uri.parse("tel:" + toDialTelNo));
91+
}
92+
jumpToActivity(context, startIntent, 0, false);
93+
}
94+
95+
/**
96+
* 跳转到APN设置
97+
* @param context
98+
*/
99+
public static void jumpToApnSetting(Context context) {
100+
Intent intent = new Intent(Settings.ACTION_APN_SETTINGS);
101+
context.startActivity(intent);
102+
}
103+
104+
public static void jumpToMobilDataSetting(Context context) {
105+
Intent intent = new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
106+
context.startActivity(intent);
107+
}
76108
}

src/main/java/common/base/views/CommonRecyclerViewEmptyView.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ public void run() {
137137
});
138138
}
139139

140+
/**
141+
* 触发自动刷新
142+
*/
143+
public void triggerAutoRefresh() {
144+
autoLoadingData();
145+
}
140146
public void hintNoData(String noDataCase) {
141147
emptyLayout.setNoDataContent(noDataCase);
142148
emptyLayout.setErrorType(EmptyLayout.NODATA);

0 commit comments

Comments
 (0)