Skip to content

Commit 6adc2cd

Browse files
committed
Move hardcoded string to strings.xml
1 parent 4d0e642 commit 6adc2cd

11 files changed

Lines changed: 54 additions & 32 deletions

app/src/main/res/layout/activity_about.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
android:layout_width="wrap_content"
4949
android:layout_height="wrap_content"
5050
android:layout_gravity="center_horizontal"
51-
android:text="Version 2.0"
51+
android:text="@string/space"
5252
android:textAppearance="?android:attr/textAppearanceSmall"
5353
android:textSize="15sp" />
5454

@@ -57,7 +57,7 @@
5757
android:layout_width="wrap_content"
5858
android:layout_height="wrap_content"
5959
android:layout_gravity="center_horizontal"
60-
android:text="\@niranjan94"
60+
android:text="@string/niranjan94"
6161
android:textAppearance="?android:attr/textAppearanceMedium" />
6262

6363
</LinearLayout>
@@ -79,7 +79,7 @@
7979
android:layout_alignLeft="@+id/divider"
8080
android:layout_below="@+id/divider"
8181
android:layout_marginTop="5dp"
82-
android:text="3rd Party Softwares"
82+
android:text="@string/third_party_title"
8383
android:textAppearance="?android:attr/textAppearanceLarge" />
8484

8585
<ScrollView
@@ -100,7 +100,7 @@
100100
android:id="@+id/ThirdPartySoftwaresList"
101101
android:layout_width="wrap_content"
102102
android:layout_height="wrap_content"
103-
android:text="• dex2jar\n• dexlib2\n• baksmali\n• smali\n• apache-commons-cli 1.3\n• apache-commons-io 2.4\n• guava 18.0\n• cfr 0.108\n• ANTLR 3.5.2\n• JSR-305 1.3.9"
103+
android:text="@string/third_party_list"
104104
android:textAppearance="?android:attr/textAppearanceSmall" />
105105

106106
</LinearLayout>

app/src/main/res/layout/activity_error.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@
2727
android:layout_width="wrap_content"
2828
android:layout_height="wrap_content"
2929
android:textAppearance="?android:attr/textAppearanceMedium"
30-
android:text="An error has occurred"
30+
android:text="@string/an_error_occured"
3131
android:layout_marginTop="16dp"
3232
android:layout_gravity="center_horizontal"/>
3333

3434
<TextView
3535
android:layout_width="wrap_content"
3636
android:layout_height="wrap_content"
3737
android:textAppearance="?android:attr/textAppearanceSmall"
38-
android:text="Goto to Application settings"
38+
android:text="@string/goto_app_settings"
3939
android:layout_marginTop="8dp"
4040
android:layout_gravity="center_horizontal"/>
4141

4242
<TextView
4343
android:layout_width="wrap_content"
4444
android:layout_height="wrap_content"
4545
android:textAppearance="?android:attr/textAppearanceSmall"
46-
android:text="Clear cache and data to fix"
46+
android:text="@string/clear_cache_data"
4747
android:layout_marginTop="2dp"
4848
android:layout_gravity="center_horizontal"/>
4949

5050
<android.support.v7.widget.AppCompatButton
5151
android:layout_width="wrap_content"
5252
android:layout_height="wrap_content"
53-
android:text="Open application settings"
53+
android:text="@string/open_app_settings"
5454
android:layout_marginTop="12dp"
5555
android:onClick="openAppInfoPage"
5656
android:layout_gravity="center_horizontal"/>

app/src/main/res/layout/activity_landing.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
android:layout_width="wrap_content"
5050
android:layout_height="wrap_content"
5151
android:layout_gravity="center_horizontal"
52-
android:text="Welcome"
52+
android:text="@string/welcome"
5353
android:textAppearance="?android:attr/textAppearanceLarge"
5454
android:textColor="@color/grey_700"
5555
android:textSize="35sp" />
@@ -59,7 +59,7 @@
5959
android:layout_height="wrap_content"
6060
android:layout_gravity="center_horizontal"
6161
android:layout_marginBottom="7dp"
62-
android:text="tap the plus button to begin"
62+
android:text="@string/tap_plus"
6363
android:textAppearance="?android:attr/textAppearanceMedium"
6464
android:textColor="@color/grey_700" />
6565

app/src/main/res/layout/activity_progress.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
android:layout_width="wrap_content"
2020
android:layout_height="wrap_content"
2121
android:layout_gravity="center_horizontal"
22-
android:text="Waiting for App"
22+
android:text="@string/waiting_for_app"
2323
android:textAppearance="?android:attr/textAppearanceLarge"
2424
android:textColor="@color/grey_400" />
2525

@@ -28,7 +28,7 @@
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
3030
android:layout_gravity="center_horizontal"
31-
android:text="Processing"
31+
android:text="@string/processing"
3232
android:textAllCaps="false"
3333
android:textAppearance="?android:attr/textAppearanceMedium"
3434
android:textColor="@color/grey_400" />
@@ -40,7 +40,7 @@
4040
android:layout_gravity="center_horizontal"
4141
android:ellipsize="none"
4242
android:singleLine="false"
43-
android:text="Getting Ready"
43+
android:text="@string/getting_ready"
4444
android:textAllCaps="false"
4545
android:textAppearance="?android:attr/textAppearanceSmall"
4646
android:textColor="@color/grey_400" />

app/src/main/res/layout/activity_purchase.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,30 @@
3838
android:layout_width="wrap_content"
3939
android:layout_height="wrap_content"
4040
android:textAppearance="?android:attr/textAppearanceMedium"
41-
android:text="Get Show Java Pro"
41+
android:text="@string/get_pro"
4242
android:layout_marginTop="16dp"
4343
android:layout_gravity="center_horizontal"/>
4444

4545
<TextView
4646
android:layout_width="wrap_content"
4747
android:layout_height="wrap_content"
4848
android:textAppearance="?android:attr/textAppearanceSmall"
49-
android:text="No Advertisements"
49+
android:text="@string/no_ads"
5050
android:layout_marginTop="8dp"
5151
android:layout_gravity="center_horizontal"/>
5252

5353
<TextView
5454
android:layout_width="wrap_content"
5555
android:layout_height="wrap_content"
5656
android:textAppearance="?android:attr/textAppearanceSmall"
57-
android:text="Early access to new features"
57+
android:text="@string/early_access"
5858
android:layout_marginTop="2dp"
5959
android:layout_gravity="center_horizontal"/>
6060

6161
<android.support.v7.widget.AppCompatButton
6262
android:layout_width="wrap_content"
6363
android:layout_height="wrap_content"
64-
android:text="Buy Now via Google Play"
64+
android:text="@string/buy_now"
6565
android:layout_marginTop="12dp"
6666
android:onClick="initiateBuy"
6767
android:layout_gravity="center_horizontal"/>

app/src/main/res/layout/history_header_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
android:layout_height="wrap_content"
1212
android:layout_marginBottom="3dp"
1313
android:layout_marginTop="6dp"
14-
android:text="Pick an app to explore"
14+
android:text="@string/pick_app_to_explore"
1515
android:textAppearance="?android:attr/textAppearanceLarge" />
1616
</LinearLayout>

app/src/main/res/layout/history_list_item.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
android:id="@+id/history_item_label"
3939
android:layout_width="wrap_content"
4040
android:layout_height="wrap_content"
41-
android:text="Large Text"
41+
android:text="@string/space"
4242
android:textAppearance="?android:attr/textAppearanceMedium" />
4343

4444
<TextView
4545
android:id="@+id/history_item_package"
4646
android:layout_width="wrap_content"
4747
android:layout_height="wrap_content"
48-
android:text="Subtext"
48+
android:text="@string/space"
4949
android:textAppearance="?android:attr/textAppearanceSmall" />
5050

5151
</LinearLayout>

app/src/main/res/layout/java_explorer_list_item.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
android:layout_width="wrap_content"
3131
android:layout_height="wrap_content"
3232
android:singleLine="true"
33-
android:text="Name"
33+
android:text="@string/space"
3434
android:textSize="17sp"
3535
android:textStyle="bold" />
3636

@@ -39,7 +39,7 @@
3939
android:layout_width="wrap_content"
4040
android:layout_height="wrap_content"
4141
android:layout_marginTop="5dp"
42-
android:text="123 kb" />
42+
android:text="@string/space" />
4343

4444
</LinearLayout>
4545

app/src/main/res/layout/package_list_item.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
android:id="@+id/pkg_id"
1616
android:layout_width="wrap_content"
1717
android:layout_height="wrap_content"
18-
android:text=" "
18+
android:text="@string/space"
1919
android:visibility="gone" />
2020

2121
<TextView
2222
android:id="@+id/pkg_dir"
2323
android:layout_width="wrap_content"
2424
android:layout_height="wrap_content"
25-
android:text=" "
25+
android:text="@string/space"
2626
android:visibility="gone" />
2727

2828

@@ -39,15 +39,15 @@
3939
android:id="@+id/pkg_name"
4040
android:layout_width="fill_parent"
4141
android:layout_height="wrap_content"
42-
android:text="Amrita Info Desk v2"
42+
android:text="@string/space"
4343
android:textAppearance="?android:attr/textAppearanceMedium" />
4444

4545
<TextView
4646
android:id="@+id/pkg_version"
4747
android:layout_width="fill_parent"
4848
android:layout_height="wrap_content"
4949
android:paddingTop="2dp"
50-
android:text="Version 1.2b"
50+
android:text="@string/space"
5151
android:textAppearance="?android:attr/textAppearanceSmall" />
5252

5353
</LinearLayout>

app/src/main/res/menu/explorer.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
android:id="@+id/action_share"
66
android:icon="@drawable/ic_action_share"
77
android:orderInCategory="0"
8-
android:title="Zip and share"
8+
android:title="@string/zip_and_share"
99
app:showAsAction="always" />
1010

1111
<item
1212
android:id="@+id/action_delete"
1313
android:icon="@drawable/ic_action_delete"
1414
android:orderInCategory="1"
15-
android:title="Delete Source"
15+
android:title="@string/delete_source"
1616
app:showAsAction="always" />
1717

1818
</menu>

0 commit comments

Comments
 (0)