kopia lustrzana https://github.com/ryukoposting/Signal-Android
Adjust text story button protections.
rodzic
6476e585c4
commit
a3a79fc58d
|
@ -21,7 +21,6 @@ import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
|||
class TextStoryPostCreationFragment : Fragment(R.layout.stories_text_post_creation_fragment), TextStoryPostTextEntryFragment.Callback {
|
||||
|
||||
private lateinit var scene: ConstraintLayout
|
||||
private lateinit var linkButton: View
|
||||
private lateinit var backgroundButton: AppCompatImageView
|
||||
private lateinit var send: View
|
||||
private lateinit var storyTextPostView: StoryTextPostView
|
||||
|
@ -53,11 +52,13 @@ class TextStoryPostCreationFragment : Fragment(R.layout.stories_text_post_creati
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
scene = view.findViewById(R.id.scene)
|
||||
linkButton = view.findViewById(R.id.add_link)
|
||||
backgroundButton = view.findViewById(R.id.background_selector)
|
||||
send = view.findViewById(R.id.send)
|
||||
storyTextPostView = view.findViewById(R.id.story_text_post)
|
||||
|
||||
val backgroundProtection: View = view.findViewById(R.id.background_protection)
|
||||
val addLinkProtection: View = view.findViewById(R.id.add_link_protection)
|
||||
|
||||
storyTextPostView.showCloseButton()
|
||||
|
||||
lifecycleDisposable.bindTo(viewLifecycleOwner)
|
||||
|
@ -97,11 +98,11 @@ class TextStoryPostCreationFragment : Fragment(R.layout.stories_text_post_creati
|
|||
TextStoryPostTextEntryFragment().show(childFragmentManager, null)
|
||||
}
|
||||
|
||||
backgroundButton.setOnClickListener {
|
||||
backgroundProtection.setOnClickListener {
|
||||
viewModel.cycleBackgroundColor()
|
||||
}
|
||||
|
||||
linkButton.setOnClickListener {
|
||||
addLinkProtection.setOnClickListener {
|
||||
TextStoryPostLinkEntryFragment().show(childFragmentManager, null)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,37 +11,58 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:layout_constraintVertical_bias="0"
|
||||
app:layout_constraintBottom_toTopOf="@id/toggle_spacer"
|
||||
app:layout_constraintDimensionRatio="9:16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/background_selector"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/background_protection"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/story_text_background_button_overlay"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/circle_tintable"
|
||||
app:layout_constraintBottom_toTopOf="@id/button_bar_barrier"
|
||||
app:layout_constraintStart_toStartOf="@id/story_text_post"
|
||||
app:tint="@color/transparent_black_40" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/background_selector"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:src="@drawable/story_text_background_button_overlay"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background_protection"
|
||||
app:layout_constraintEnd_toEndOf="@id/background_protection"
|
||||
app:layout_constraintStart_toStartOf="@id/background_protection"
|
||||
app:layout_constraintTop_toTopOf="@id/background_protection"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Signal.Circle"
|
||||
tools:background="@color/signal_alert_primary" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/add_link"
|
||||
android:id="@+id/add_link_protection"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:background="@drawable/story_text_circle_button_background_inset_6"
|
||||
android:scaleType="centerInside"
|
||||
app:backgroundTint="@color/transparent_black_40"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/circle_tintable"
|
||||
app:layout_constraintBottom_toTopOf="@id/button_bar_barrier"
|
||||
app:layout_constraintStart_toEndOf="@id/background_selector"
|
||||
app:layout_constraintStart_toEndOf="@id/background_protection"
|
||||
app:tint="@color/transparent_black_40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/add_link"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:scaleType="centerInside"
|
||||
app:layout_constraintBottom_toBottomOf="@id/add_link_protection"
|
||||
app:layout_constraintEnd_toEndOf="@id/add_link_protection"
|
||||
app:layout_constraintStart_toStartOf="@id/add_link_protection"
|
||||
app:layout_constraintTop_toTopOf="@id/add_link_protection"
|
||||
app:srcCompat="@drawable/ic_link_24"
|
||||
app:tint="@color/core_white" />
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue