Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:[BUG] Key Labels Not Displaying in Landscape Mode #17022

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 34 additions & 31 deletions AnkiDroid/src/main/res/layout/dialog_key_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,46 @@
~ this program. If not, see <http://www.gnu.org/licenses/>.
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.ichi2.ui.FixedTextView
android:id="@+id/key_picker_selected_key"
app:layout_constraintDimensionRatio="w,1:1"
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center"
android:textSize="24sp"
android:textAlignment="center"
android:text="@string/key_picker_default_press_key"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintBottom_toTopOf="@id/warning"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="w,1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">

<com.ichi2.ui.FixedTextView
android:id="@+id/warning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/colorError"
tools:text="Already used in X"
android:layout_margin="6dp"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/key_picker_selected_key"
android:drawableStart="@drawable/ic_warning"
android:drawableTint="?attr/colorError"
android:drawablePadding="4dp"
tools:visibility="visible"
/>
<com.ichi2.ui.FixedTextView
android:id="@+id/key_picker_selected_key"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="@string/key_picker_default_press_key"
android:textSize="24sp" />

<com.ichi2.ui.FixedTextView
android:id="@+id/warning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:drawablePadding="4dp"
android:drawableStart="@drawable/ic_warning"
android:drawableTint="?attr/colorError"
android:textColor="?attr/colorError"
android:visibility="gone"
tools:text="Already used in X"
tools:visibility="visible" />

</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>