protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
+ initView();
//sosPresenter = new SOSPresenter(this);
//监听状态变化
//initObserver();
}
+ private void initView() {
+
+ }
+
@Override
protected void onResume() {
super.onResume();
<include
+ android:id="@+id/init_page"
+ layout="@layout/include_init"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <include
+ android:id="@+id/calling_page"
layout="@layout/include_calling"
android:layout_width="match_parent"
android:layout_height="match_parent"
<include
+ android:id="@+id/error_page"
layout="@layout/include_error"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<include
+ android:id="@+id/no_number_page"
layout="@layout/include_no_sos_number"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:visibility="gone" />
+
+ <include
+ android:id="@+id/no_sim_page"
+ layout="@layout/include_no_sim"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone" />
</FrameLayout>
\ No newline at end of file
android:layout_marginBottom="10dp"
android:text="@string/calling_text"
android:textColor="#EA9A45"
- android:textSize="28sp" />
+ android:textSize="@dimen/second_title_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/urgent_text"
android:textColor="@color/white"
- android:textSize="36sp" />
+ android:textSize="@dimen/main_title_text_size" />
</LinearLayout>
android:layout_marginBottom="10dp"
android:text="@string/call_error_text"
android:textColor="#EC2E35"
- android:textSize="28sp" />
+ android:textSize="@dimen/second_title_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/urgent_text"
android:textColor="@color/white"
- android:textSize="36sp" />
+ android:textSize="@dimen/main_title_text_size" />
<ImageView
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/init_text"
+ android:textColor="@color/white"
+ android:textSize="@dimen/main_title_text_size" />
+
+ </LinearLayout>
+
+</FrameLayout>
\ No newline at end of file
android:layout_height="wrap_content"
android:text="@string/no_sim_text"
android:textColor="@color/white"
- android:textSize="36sp" />
+ android:textSize="@dimen/main_title_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_up_sim_text"
android:textColor="@color/white"
- android:textSize="36sp" />
+ android:textSize="@dimen/main_title_text_size" />
</LinearLayout>
android:layout_height="wrap_content"
android:text="@string/no_urgent_number_text"
android:textColor="@color/white"
- android:textSize="36sp" />
+ android:textSize="@dimen/second_title_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_up_sos_number_text"
android:textColor="@color/white"
- android:textSize="36sp" />
+ android:textSize="@dimen/main_title_text_size" />
</LinearLayout>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="main_title_text_size">34sp</dimen>
+ <dimen name="second_title_text_size">28sp</dimen>
+</resources>
\ No newline at end of file
<resources>
<string name="app_name">ICSOS</string>
<string name="calling_text">Calling…</string>
- <string name="call_error_text">呼叫失败</string>
- <string name="no_sim_text">当前没有SIM卡</string>
- <string name="set_up_sim_text">请立即安装</string>
- <string name="no_urgent_number_text">当前没有紧急联系人</string>
- <string name="set_up_sos_number_text">请立即设置</string>
+ <string name="call_error_text">Call Failed</string>
+ <string name="no_sim_text">No sim card</string>
+ <string name="set_up_sim_text">Setup now</string>
+ <string name="no_urgent_number_text">No sos number</string>
+ <string name="set_up_sos_number_text">Setup now</string>
+ <string name="init_text">Initializing…</string>
</resources>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="main_title_text_size">30sp</dimen>
+ <dimen name="second_title_text_size">24sp</dimen>
+</resources>
\ No newline at end of file
<string name="set_up_sim_text">すぐに取り付けてください</string>
<string name="no_urgent_number_text">緊急連絡先がありません。</string>
<string name="set_up_sos_number_text">すぐに設定してください</string>
+ <string name="init_text">初期化している…</string>
</resources>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="main_title_text_size">36sp</dimen>
+ <dimen name="second_title_text_size">28sp</dimen>
+</resources>
\ No newline at end of file
<string name="set_up_sim_text">请立即安装</string>
<string name="no_urgent_number_text">当前没有紧急联系人</string>
<string name="set_up_sos_number_text">请立即设置</string>
+ <string name="init_text">正在初始化...</string>
</resources>
\ No newline at end of file