Skip to content

Commit

Permalink
Fix sharecode visibility in landscape mode
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Aug 29, 2024
1 parent 7373c04 commit ecd2e54
Showing 1 changed file with 47 additions and 39 deletions.
86 changes: 47 additions & 39 deletions app/src/main/res/layout/sync_kserver_link_host_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@
android:id="@+id/link_option_nfc"
style="@style/Widget.Material3.CompoundButton.RadioButton"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="wrap_content"
android:text="@string/sync_kserver_link_host_option_nfc" />
android:text="@string/sync_kserver_link_host_option_nfc"
android:visibility="gone" />
</RadioGroup>
</com.google.android.material.card.MaterialCardView>


<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/link_container_qrcode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
Expand All @@ -83,55 +83,62 @@
tools:background="@color/seed" />
</androidx.constraintlayout.widget.ConstraintLayout>

<LinearLayout
<ScrollView
android:id="@+id/link_container_direct"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/link_options_card"
tools:visibility="visible">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/sharecode_label"
style="@style/TextAppearance.Material3.LabelLarge"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="32dp"
android:text="@string/sync_kserver_link_code_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
android:orientation="vertical">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/link_code_actual"
style="@style/TextAppearance.Material3.BodyLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="8dp"
android:textIsSelectable="true"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/sharecode_label"
tools:text="ABCDEFAKSLÖDKASÖDLKASÖLDKASÖLDKASÖLDKLÖASDKÖASDKÖ" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/sharecode_label"
style="@style/TextAppearance.Material3.LabelLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="32dp"
android:text="@string/sync_kserver_link_code_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/link_code_actual"
style="@style/TextAppearance.Material3.BodyLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="8dp"
android:textIsSelectable="true"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/sharecode_label"
tools:text="@tools:sample/lorem/random" />

<com.google.android.material.button.MaterialButton
android:id="@+id/link_code_input_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:layout_marginBottom="32dp"
android:layout_marginTop="16dp"
android:text="@string/general_share_action"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/link_code_actual" />

<com.google.android.material.button.MaterialButton
android:id="@+id/link_code_input_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="16dp"
android:text="@string/general_share_action"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/link_code_actual" />
</LinearLayout>
</ScrollView>

</LinearLayout>

<LinearLayout
android:id="@+id/link_container_nfc"
Expand All @@ -140,6 +147,7 @@
android:layout_marginHorizontal="32dp"
android:layout_marginVertical="32dp"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down

0 comments on commit ecd2e54

Please sign in to comment.