去掉仪表盘风格
This commit is contained in:
@@ -103,12 +103,9 @@ public class BuildingDashboardActivity extends FullscreenActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
// 当用户选择了自动跳转时,直接访问 urlPrefix,这样 url 可以自由设置
|
||||
SharedPreferences pre = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
String urlPrefix = pre.getString("k_url_prefix", "http://172.18.22.211:8002/Dashboard");
|
||||
String urlEndPoint = pre.getString("k_url_end_point", "/").replaceFirst("^/", "");
|
||||
configUrl = urlPrefix + "/data/config.json";
|
||||
mainUrl = urlEndPoint.isEmpty() ? urlPrefix : urlPrefix + "/" + urlEndPoint;
|
||||
mainUrl = pre.getString("k_url_prefix", "http://172.18.22.211:8002/Dashboard");
|
||||
configUrl = mainUrl + "/data/config.json";
|
||||
|
||||
Log.i(TAG, "Main: " + mainUrl);
|
||||
Log.i(TAG, "Config: " + configUrl);
|
||||
@@ -298,6 +295,7 @@ public class BuildingDashboardActivity extends FullscreenActivity {
|
||||
WebSettings webSettings = binding.webview.getSettings();
|
||||
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
// 允许媒体自动播放 (Android 8+ 必须)
|
||||
webSettings.setMediaPlaybackRequiresUserGesture(false);
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
<resources>
|
||||
<string-array name="url_end_point_entries">
|
||||
<item>自动跳转</item>
|
||||
<item>按楼层</item>
|
||||
<item>网格+统计</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@@ -9,16 +9,4 @@
|
||||
<item>reply</item>
|
||||
<item>reply_all</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="url_end_point_entries">
|
||||
<item>Auto Redirect</item>
|
||||
<item>Floor</item>
|
||||
<item>Grid+Statics</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="url_end_point_values">
|
||||
<item>/</item>
|
||||
<item>/dashboards/1</item>
|
||||
<item>/dashboards/2</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -5,13 +5,6 @@
|
||||
app:title="URL 前缀"
|
||||
app:defaultValue="http://172.18.22.211:8002/Dashboard"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
<ListPreference
|
||||
app:title="仪表盘风格"
|
||||
app:key="k_url_end_point"
|
||||
app:useSimpleSummaryProvider="true"
|
||||
app:entries="@array/url_end_point_entries"
|
||||
app:entryValues="@array/url_end_point_values"
|
||||
app:defaultValue="@string/url_end_point_default_value" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="配置物联网关">
|
||||
|
||||
Reference in New Issue
Block a user