Skip to content

Commit 961e9aa

Browse files
committed
Improved the topic layout in the drawer
1 parent dc823cb commit 961e9aa

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ dependencies {
3838
implementation 'com.android.support:cardview-v7:27.1.1'
3939
implementation 'com.android.support:design:27.1.1'
4040
implementation 'com.google.android:flexbox:0.2.7'
41-
implementation 'com.github.mcmrarm:chatlib:0.2.1'
42-
implementation 'com.github.mcmrarm:chatlib-android-core:0.1.0'
43-
implementation 'com.github.mcmrarm:chatlib-android-storage:0.2.0'
41+
implementation 'com.github.mcmrarm:chatlib:master-SNAPSHOT'
42+
implementation 'com.github.mcmrarm:chatlib-android-core:master-SNAPSHOT'
43+
implementation 'com.github.mcmrarm:chatlib-android-storage:master-SNAPSHOT'
4444
implementation 'com.google.code.gson:gson:2.8.2'
4545
implementation 'net.lingala.zip4j:zip4j:1.3.2'
4646
testImplementation 'junit:junit:4.12'

app/src/main/java/io/mrarm/irc/chat/ChannelInfoAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ public void bind(String topic, String topicSetBy, Date topicSetOn) {
161161
topicInfoTextView.setText(SpannableStringHelper.getText(
162162
topicInfoTextView.getContext(), R.string.channel_topic_info,
163163
topicSetByColored, topicSetOnStr));
164+
topicInfoTextView.setVisibility(View.VISIBLE);
164165
} else {
165166
topicInfoTextView.setText(null);
167+
topicInfoTextView.setVisibility(View.GONE);
166168
}
167169
}
168170

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="match_parent"
44
android:layout_height="wrap_content"
5-
android:minHeight="@dimen/single_list_item_height"
5+
android:minHeight="32dp"
66
android:paddingStart="16dp"
77
android:paddingEnd="16dp"
88
android:layout_marginBottom="8dp"
@@ -12,6 +12,7 @@
1212
android:id="@+id/topic"
1313
android:layout_width="match_parent"
1414
android:layout_height="wrap_content"
15+
android:layout_weight="1"
1516
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
1617
android:paddingTop="2dp"
1718
android:paddingBottom="0dp"
@@ -21,6 +22,7 @@
2122
android:id="@+id/topic_info"
2223
android:layout_width="match_parent"
2324
android:layout_height="wrap_content"
25+
android:layout_weight="1"
2426
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
2527
android:paddingTop="2dp"
2628
android:paddingBottom="2dp"

0 commit comments

Comments
 (0)