سؤال

قمت بتعيين tabWidget الخاص بي في الأسفل. عندما أرغب في تحرير EditText ، سترفع لوحة المفاتيح. لكن أداة TAB تأتي فوق لوحة المفاتيح. لدعم الشاشة المتعددة ، قمت بتعيين Android: layout_weight = "1.0". بعد ذلك ، حصلت على هذه المشكلة ، لقد أضفت رمز التصميم الخاص بي أدناه. أي فكرة لجعل tabWidget في الأسفل ثابتة؟

شفرة:

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent" android:layout_height="fill_parent">
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@android:id/tabcontent" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:layout_weight="1.0">

    </FrameLayout>
    <TabWidget android:id="@android:id/tabs"
        android:layout_gravity="bottom" android:background="@drawable/gradient_black"
        android:listSelector="@color/transparent" android:layout_width="fill_parent"
        android:layout_height="63dip" />
</LinearLayout>

هل كانت مفيدة؟

المحلول

قد ترغب في ضبط WindowsoftInputMode في بيانك. يتحكم هذا في كيفية تحول الشاشة عند عرض لوحة المفاتيح الناعمة. ربما تريد ضبط PANTPAN بدلاً من adjustresize الافتراضي؟ هذه صفحة لديه مزيد من المعلومات حول أوضاع الإدخال المختلفة.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top