1

(1) 静的な高さ 40px のコンテナー (現時点ではリニア レイアウト)、(2) スクロール可能で動的に読み込まれるコンテンツ レイアウト (現時点では ScrollView でラップされた LinearLayout)、(3) およびエントリを必要とする Android アプリケーションを作成しています。 /回答フィールド。

アイデアは、(2) スクロール可能で動的にロードされるコンテンツのサイズを変更して、(1) 回答フィールドと (3) コンテナーが表示されているかどうかに関係なく表示されるようにすることです。また、動的に読み込まれる部分内のすべてのコンテンツを表示できるようにする必要があります。

問題は、ソフト キーボードが表示されているときに、40px コンテナーとスクロール可能な領域の一部を非表示にする上向きのパンを取得していることです (スクロール可能な領域の上部の数行をスクロールできません)。達した)。

マニフェストのアクティビティ エントリ:

<activity
    android:name="com.xxxxx.xxxxx.xxxxxx.paid.activities.GamePlayActivity"
    android:windowSoftInputMode="stateAlwaysVisible|adjustResize"
    android:label="@string/app_name" >
</activity>

レイアウト:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/game_play_main_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@color/activity_home_screen">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40sp"
        android:background="#FF000000"/>
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:fillViewport="true"
        android:scrollbars="none">
        <LinearLayout 
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/game_play_table"/>
    </ScrollView>
    <EditText 
        android:id="@+id/game_play_answer"
        android:layout_width="match_parent"
        android:layout_height="40sp"
        android:layout_margin="3sp"
        android:inputType="textAutoComplete"/>
</LinearLayout>

どんなアイデアでも大歓迎です.stackoverflowで見つかったさまざまな実装を検索して試してみましたが、まだ要件を満たしていません.

4

0 に答える 0