添加翻译,完成了布局
authorTrillGates <williamtrillgates@gmail.com>
Fri, 22 Oct 2021 08:14:27 +0000 (16:14 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Fri, 22 Oct 2021 08:14:27 +0000 (16:14 +0800)
13 files changed:
app/src/main/java/com/ic/sos/MainActivity.java
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/include_calling.xml
app/src/main/res/layout/include_error.xml
app/src/main/res/layout/include_init.xml [new file with mode: 0644]
app/src/main/res/layout/include_no_sim.xml
app/src/main/res/layout/include_no_sos_number.xml
app/src/main/res/values-en/dimens.xml [new file with mode: 0644]
app/src/main/res/values-en/strings.xml
app/src/main/res/values-ja/dimens.xml [new file with mode: 0644]
app/src/main/res/values-ja/strings.xml
app/src/main/res/values/dimens.xml [new file with mode: 0644]
app/src/main/res/values/strings.xml

index 058a9f8..d87e437 100644 (file)
@@ -25,11 +25,16 @@ public class MainActivity extends AppCompatActivity {
     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();
index 0b79811..052b950 100644 (file)
@@ -8,6 +8,13 @@
 
 
     <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
index d57e231..8cd6692 100644 (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>
 
index 17c498e..2d7c97d 100644 (file)
             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
diff --git a/app/src/main/res/layout/include_init.xml b/app/src/main/res/layout/include_init.xml
new file mode 100644 (file)
index 0000000..fbdb5ac
--- /dev/null
@@ -0,0 +1,23 @@
+<?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
index 2bc14e0..f064c20 100644 (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>
 
index 5ac7ceb..b9b4c98 100644 (file)
             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>
 
diff --git a/app/src/main/res/values-en/dimens.xml b/app/src/main/res/values-en/dimens.xml
new file mode 100644 (file)
index 0000000..1f5d701
--- /dev/null
@@ -0,0 +1,5 @@
+<?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
index a389ac7..fa21ffb 100644 (file)
@@ -1,9 +1,10 @@
 <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
diff --git a/app/src/main/res/values-ja/dimens.xml b/app/src/main/res/values-ja/dimens.xml
new file mode 100644 (file)
index 0000000..a7b547f
--- /dev/null
@@ -0,0 +1,5 @@
+<?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
index e903e83..784ca95 100644 (file)
@@ -6,4 +6,5 @@
     <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
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644 (file)
index 0000000..e0d6c4b
--- /dev/null
@@ -0,0 +1,5 @@
+<?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
index 930aad6..653bc4c 100644 (file)
@@ -7,4 +7,5 @@
     <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