Turn 'Learn more' link into a button to have a larger tap area

and a selectable background
This commit is contained in:
Torsten Grote
2021-02-26 15:22:00 -03:00
parent 071010e438
commit aa1ba0d950
4 changed files with 15 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Button;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
@@ -96,7 +96,7 @@ public class ConversationSettingsDialog extends DialogFragment {
switchDisappearingMessages.setOnCheckedChangeListener(
(button, value) -> viewModel.setAutoDeleteTimerEnabled(value));
TextView buttonLearnMore =
Button buttonLearnMore =
view.findViewById(R.id.buttonLearnMore);
buttonLearnMore.setOnClickListener(e -> showLearnMoreDialog());

View File

@@ -19,7 +19,6 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:paddingHorizontal="@dimen/margin_large"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -43,24 +42,25 @@
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switchDisappearingMessages"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_margin="16dp"
android:enabled="false"
android:text="@string/disappearing_messages_summary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageViewBomb" />
app:layout_constraintTop_toBottomOf="@+id/imageViewBomb"
tools:enabled="true" />
<TextView
<Button
android:id="@+id/buttonLearnMore"
style="@style/BriarButtonFlat.Positive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_large"
android:clickable="true"
android:focusable="true"
android:padding="16dp"
android:text="@string/learn_more"
android:textColor="@color/briar_text_link"
android:textAllCaps="false"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/switchDisappearingMessages" />
@@ -68,4 +68,4 @@
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -46,7 +46,7 @@
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:textColor="@color/briar_text_secondary_inverse"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"

View File

@@ -582,8 +582,8 @@
<string name="disappearing_messages_title">Disappearing messages</string>
<string name="disappearing_messages_explanation_long">Turning on this setting will make new
messages in this conversation automatically disappear after 7\u00A0days.
\n\nThe countdown for the sender\'s copy of the message starts after it has been delivered,
while it starts for the recipient after they have read the message.
\n\nThe countdown for the sender\'s copy of the message starts after it has been delivered.
The countdown starts for the recipient after they have read the message.
\n\nMessages that will disappear are marked with a bomb icon.
\n\nKeep in mind that recipients can still make copies of the messages you send.
\n\nIf you change this setting, it will apply to your new messages immediately and to your