Optimise XML
parent
9b6fa0db01
commit
54bb84541a
@ -0,0 +1,19 @@
|
||||
package org.thoughtcrime.securesms.dependencies
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
class UiModule {
|
||||
@Singleton
|
||||
@Provides
|
||||
@ConversationViewPool
|
||||
fun provideConversationRecycledViewPool(): RecyclerView.RecycledViewPool {
|
||||
return RecyclerView.RecycledViewPool()
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package org.thoughtcrime.securesms.dependencies
|
||||
|
||||
import javax.inject.Qualifier
|
||||
|
||||
@Qualifier
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class ConversationViewPool
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/unreadMarkerContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/small_spacing"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/medium_spacing"
|
||||
android:layout_marginEnd="@dimen/small_spacing"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/unreadMarker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/unread_marker"
|
||||
android:textColor="?android:colorAccent"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/small_spacing"
|
||||
android:layout_marginEnd="@dimen/medium_spacing"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:colorAccent" />
|
||||
</LinearLayout>
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout android:id="@+id/statusContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="true"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageStatusTextView"
|
||||
android:contentDescription="@string/AccessibilityId_message_sent_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="2dp"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="@dimen/very_small_font_size"
|
||||
tools:text="Sent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messageStatusImageView"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_delivery_status_sent" />
|
||||
|
||||
<org.thoughtcrime.securesms.conversation.v2.components.ExpirationTimerView
|
||||
android:id="@+id/expirationTimerView"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center"
|
||||
android:tint="?message_status_color" />
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue