mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Show About in AppSettings screen.
This commit is contained in:
@@ -160,6 +160,7 @@ class AppSettingsFragment : DSLSettingsFragment(R.string.text_secure_normal__men
|
|||||||
private class BioPreferenceViewHolder(itemView: View) : PreferenceViewHolder<BioPreference>(itemView) {
|
private class BioPreferenceViewHolder(itemView: View) : PreferenceViewHolder<BioPreference>(itemView) {
|
||||||
|
|
||||||
private val avatarView: AvatarImageView = itemView.findViewById(R.id.icon)
|
private val avatarView: AvatarImageView = itemView.findViewById(R.id.icon)
|
||||||
|
private val aboutView: TextView = itemView.findViewById(R.id.about)
|
||||||
|
|
||||||
override fun bind(model: BioPreference) {
|
override fun bind(model: BioPreference) {
|
||||||
super.bind(model)
|
super.bind(model)
|
||||||
@@ -173,6 +174,13 @@ class AppSettingsFragment : DSLSettingsFragment(R.string.text_secure_normal__men
|
|||||||
titleView.visibility = View.VISIBLE
|
titleView.visibility = View.VISIBLE
|
||||||
summaryView.visibility = View.VISIBLE
|
summaryView.visibility = View.VISIBLE
|
||||||
avatarView.visibility = View.VISIBLE
|
avatarView.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
if (model.recipient.combinedAboutAndEmoji != null) {
|
||||||
|
aboutView.text = model.recipient.combinedAboutAndEmoji
|
||||||
|
aboutView.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
aboutView.visibility = View.GONE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,33 +19,41 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:textAppearance="@style/Signal.Text.Title.SettingsBio"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toTopOf="@id/summary"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
|
||||||
app:layout_goneMarginBottom="16dp"
|
|
||||||
tools:text="Person Name" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/summary"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.Signal.Body2"
|
|
||||||
android:textColor="@color/signal_text_secondary"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="@id/title"
|
app:layout_constraintStart_toEndOf="@id/icon"
|
||||||
app:layout_constraintStart_toStartOf="@id/title"
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
app:layout_constraintTop_toBottomOf="@id/title"
|
|
||||||
tools:text="+1 (999) 555-1234" />
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="@style/Signal.Text.Title.SettingsBio"
|
||||||
|
tools:text="Peter Parker" />
|
||||||
|
|
||||||
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
|
android:id="@+id/about"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Signal.Text.Preview.Secondary"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
tools:text="Crusin' the web" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/summary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Signal.Text.Preview.Secondary"
|
||||||
|
tools:text="+1 (999) 555-1234" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
<item name="android:letterSpacing" tools:ignore="NewApi">0.01</item>
|
<item name="android:letterSpacing" tools:ignore="NewApi">0.01</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Signal.Text.Preview.Secondary">
|
||||||
|
<item name="android:textColor">@color/signal_text_secondary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Signal.Text.Preview.Medium">
|
<style name="Signal.Text.Preview.Medium">
|
||||||
<item name="android:fontFamily">sans-serif-medium</item>
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user