Reputation: 3
Layout for 5 players:
Layout for 6 players:
At the 6 players layout when you click the First Player it gets weird(right image). Anyone know what is wrong? Thanks for any help
My activty code:
<ScrollView
android:id="@+id/scrollView4"
android:layout_width="320dp"
android:layout_height="320sp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toTopOf="@+id/button_basic_4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView28">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
//edit texts...
</LinearLayout>
</ScrollView>
Upvotes: 1
Views: 136
Reputation: 1675
This seems to happen because of the keyboard that is popping up. Use
<activity
android:name=".ActivityName"
android:screenOrientation="nosensor"
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
Use nosensor if you want to use the app only for portrait modes. Use stateAlwaysHidden in the <activity>
if you don't want android to pop that keyboard up everytime your activity opens.
Check out this link the official documentation.
Upvotes: 1
Reputation: 5017
In your activity manifest just add this
<activity
android:windowSoftInputMode="adjustPan">
</activity>
The documentation for adjustpan
states that
The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing
Please see official doc here
Upvotes: 2