Skip to content

Commit 80b9680

Browse files
committed
fix bug on recyclerview null text
1 parent bfd3abd commit 80b9680

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

app/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ android {
3131
dependencies {
3232

3333
implementation 'androidx.appcompat:appcompat:1.5.1'
34-
implementation 'com.google.android.material:material:1.6.1'
34+
implementation 'com.google.android.material:material:1.7.0'
3535
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
3636
implementation project(':readMoreTextView')
3737
testImplementation 'junit:junit:4.13.2'
38-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
39-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
38+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
39+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
4040
}

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id 'com.android.application' version '7.3.0' apply false
4-
id 'com.android.library' version '7.3.0' apply false
3+
id 'com.android.application' version '7.3.1' apply false
4+
id 'com.android.library' version '7.3.1' apply false
55
}
66

77
task clean(type: Delete) {

readMoreTextView/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ android {
2929
dependencies {
3030

3131
implementation 'androidx.appcompat:appcompat:1.5.1'
32-
implementation 'com.google.android.material:material:1.6.1'
32+
implementation 'com.google.android.material:material:1.7.0'
3333
testImplementation 'junit:junit:4.13.2'
34-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
35-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
34+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
35+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
3636
}

readMoreTextView/src/main/java/com/erif/readmoretextview/TextViewReadMore.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,11 @@ public void setText(CharSequence text, BufferType type) {
148148
if (text instanceof Spanned) {
149149
rebuild = false;
150150
} else {
151-
this.text = text.toString();
151+
if (text != null) {
152+
this.text = text.toString();
153+
} else {
154+
this.text = null;
155+
}
152156
rebuild = true;
153157
}
154158
}

0 commit comments

Comments
 (0)