Skip to content

Commit eb4d2d9

Browse files
committed
more test
1 parent e34ff2c commit eb4d2d9

File tree

6 files changed

+192
-34
lines changed

6 files changed

+192
-34
lines changed

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ android {
2020
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2121
}
2222
}
23+
24+
sourceSets {
25+
main.res.srcDirs = ['src/main/res', 'src/other_source/res']
26+
}
2327
}
2428

2529
dependencies {

app/src/main/java/com/stringcare/sample/MainActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ class MainActivity : AppCompatActivity() {
1313
SC.init(applicationContext)
1414

1515
kenobi.text = SC.reveal(R.string.kenobi)
16+
r2d2.text = SC.reveal(R.string.r2d2)
17+
c3po.text = SC.reveal(R.string.c3po)
1618
}
1719
}

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

Lines changed: 69 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,75 @@
77
android:layout_gravity="center"
88
tools:context=".MainActivity">
99

10-
<com.stringcare.library.SCTextView
11-
android:id="@+id/kenobi"
12-
style="@style/TextAppearance.AppCompat.Body1"
13-
android:layout_width="wrap_content"
14-
android:layout_height="wrap_content"
15-
tools:text="@string/kenobi"/>
16-
17-
<TextView
18-
style="@style/TextAppearance.AppCompat.Body1"
19-
android:textSize="11sp"
20-
android:layout_width="wrap_content"
21-
android:layout_height="wrap_content"
22-
android:text="@string/kenobi"/>
23-
24-
<com.stringcare.library.SCTextView
25-
style="@style/TextAppearance.AppCompat.Body1"
26-
android:layout_width="wrap_content"
27-
android:layout_height="wrap_content"
28-
android:layout_marginTop="15dp"
29-
android:text="@string/grievous"/>
30-
31-
<TextView
32-
style="@style/TextAppearance.AppCompat.Body1"
33-
android:textSize="11sp"
34-
android:layout_width="wrap_content"
35-
android:layout_height="wrap_content"
36-
android:text="@string/grievous"/>
10+
<ScrollView
11+
android:layout_width="match_parent"
12+
android:layout_height="match_parent">
13+
14+
<LinearLayout
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content"
17+
android:orientation="vertical">
18+
19+
<com.stringcare.library.SCTextView
20+
android:id="@+id/kenobi"
21+
style="@style/TextAppearance.AppCompat.Body1"
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"
24+
tools:text="@string/kenobi"/>
25+
26+
<TextView
27+
style="@style/TextAppearance.AppCompat.Body1"
28+
android:textSize="11sp"
29+
android:layout_width="wrap_content"
30+
android:layout_height="wrap_content"
31+
android:text="@string/kenobi"/>
32+
33+
<com.stringcare.library.SCTextView
34+
style="@style/TextAppearance.AppCompat.Body1"
35+
android:layout_width="wrap_content"
36+
android:layout_height="wrap_content"
37+
android:layout_marginTop="15dp"
38+
android:text="@string/grievous"/>
39+
40+
<TextView
41+
style="@style/TextAppearance.AppCompat.Body1"
42+
android:textSize="11sp"
43+
android:layout_width="wrap_content"
44+
android:layout_height="wrap_content"
45+
android:text="@string/grievous"/>
46+
47+
<com.stringcare.library.SCTextView
48+
android:id="@+id/r2d2"
49+
style="@style/TextAppearance.AppCompat.Body1"
50+
android:layout_width="wrap_content"
51+
android:layout_height="wrap_content"
52+
android:layout_marginTop="15dp"
53+
tools:text="@string/kenobi"/>
54+
55+
<TextView
56+
style="@style/TextAppearance.AppCompat.Body1"
57+
android:textSize="11sp"
58+
android:layout_width="wrap_content"
59+
android:layout_height="wrap_content"
60+
android:text="@string/r2d2"/>
61+
62+
<com.stringcare.library.SCTextView
63+
android:id="@+id/c3po"
64+
style="@style/TextAppearance.AppCompat.Body1"
65+
android:layout_width="wrap_content"
66+
android:layout_height="wrap_content"
67+
android:layout_marginTop="15dp"
68+
tools:text="@string/kenobi"/>
69+
<TextView
70+
style="@style/TextAppearance.AppCompat.Body1"
71+
android:textSize="11sp"
72+
android:layout_width="wrap_content"
73+
android:layout_height="wrap_content"
74+
android:text="@string/c3po"/>
75+
76+
</LinearLayout>
77+
78+
</ScrollView>
3779

3880
</LinearLayout>
3981

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
<resources>
2-
<string name="app_name">Kenobi</string>
3-
<string name="kenobi" hidden="true">Hello there!</string>
4-
<string name="grievous" hidden="true">General Kenobi</string>
5-
</resources>
1+
<resources> <string name="app_name">Kenobi</string> <string name="kenobi" >-36, -67, 104, 65, 11, -83, -14, -27, -44, -23, -47, -116</string> <string name="grievous" >73, -14, -114, 87, 34, -1, -8, -85, -59, -24, -29, -29, -60, -57</string></resources>
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<resources>
2+
<string name="r2d2" hidden="true">🤖</string>
3+
<string name="c3po" hidden="true">
4+
🤖
5+
🤖
6+
🤖
7+
🤖
8+
🤖
9+
🤖
10+
🤖
11+
🤖
12+
🤖
13+
🤖
14+
🤖
15+
🤖
16+
🤖
17+
🤖
18+
🤖
19+
🤖
20+
🤖
21+
🤖
22+
🤖
23+
🤖
24+
🤖
25+
🤖
26+
🤖
27+
🤖
28+
🤖
29+
🤖
30+
🤖
31+
🤖
32+
🤖
33+
🤖
34+
🤖
35+
🤖
36+
🤖
37+
🤖
38+
🤖
39+
🤖
40+
🤖
41+
🤖
42+
🤖
43+
🤖
44+
🤖
45+
🤖
46+
🤖
47+
🤖
48+
🤖
49+
🤖
50+
🤖
51+
🤖
52+
🤖
53+
🤖
54+
🤖
55+
🤖
56+
🤖
57+
🤖
58+
🤖
59+
🤖
60+
🤖
61+
🤖
62+
🤖
63+
🤖
64+
🤖
65+
🤖
66+
🤖
67+
🤖
68+
🤖
69+
🤖
70+
🤖
71+
🤖
72+
🤖
73+
🤖
74+
🤖
75+
🤖
76+
🤖
77+
🤖
78+
🤖
79+
🤖
80+
🤖
81+
🤖
82+
🤖
83+
🤖
84+
🤖
85+
🤖
86+
🤖
87+
🤖
88+
🤖
89+
🤖
90+
🤖
91+
🤖
92+
🤖
93+
🤖
94+
🤖
95+
🤖
96+
🤖
97+
🤖
98+
🤖
99+
🤖
100+
🤖
101+
🤖
102+
🤖
103+
</string>
104+
</resources>

build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
repositories {
88
google()
99
jcenter()
10-
10+
1111
}
1212
dependencies {
1313
classpath 'com.android.tools.build:gradle:3.4.1'
@@ -22,7 +22,6 @@ allprojects {
2222
repositories {
2323
google()
2424
jcenter()
25-
2625
}
2726
}
2827

@@ -31,3 +30,14 @@ task clean(type: Delete) {
3130
}
3231

3332
apply plugin: StringCare
33+
34+
stringcare {
35+
debug true
36+
main_module "app"
37+
modules {
38+
app {
39+
stringFiles = ['strings.xml', "strings_extra.xml"]
40+
srcFolders = ['src/main', "src/other_source"]
41+
}
42+
}
43+
}

0 commit comments

Comments
 (0)