내 응용 프로그램에 많은 데이터 입력 화면이 있습니다. 각각의 화면에서 마지막 EditText가 표시되지 않습니다. 이 버튼을 누르고 텍스트를 입력 할 수는 있지만 사용할 수도 있습니다. 다음 화면 중 하나에 대한 코드입니다 : 어떤 도움을 크게 감상 할 수마지막 EditText 줄이 사라집니다.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.pdrestimator.Main_Activity$Car_Fragment">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:layout_height="match_parent"
>
<TextView
android:id="@+id/vinLabel"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:textSize="20dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="VIN" />
<EditText
android:id="@+id/vin"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/carVinLabel"
android:layout_marginRight="10dp"
android:layout_marginLeft="140dp"
android:layout_alignBaseline="@+id/vinLabel"
android:ems="10" />
<TextView
android:id="@+id/yearLabel"
android:layout_below="@+id/vinLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:layout_alignParentLeft="true"
android:layout_marginTop="35dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Year" />
<Spinner
android:id="@+id/year"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/yearLabel"
android:layout_alignLeft="@+id/vin"
android:layout_alignRight="@+id/vin"
android:layout_alignBaseline="@+id/yearLabel"
android:ems="10" />
<TextView
android:id="@+id/makeLabel"
android:layout_below="@+id/yearLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize="20dp"
android:layout_marginTop="48dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Make" />
<AutoCompleteTextView
android:id="@+id/make"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/yearLabel"
android:layout_alignLeft="@+id/vin"
android:layout_alignRight="@+id/vin"
android:layout_alignBaseline="@+id/makeLabel"
android:ems="10" />
<TextView
android:id="@+id/modelLabel"
android:layout_below="@+id/makeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize="20dp"
android:layout_marginTop="35dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Model" />
<EditText
android:id="@+id/model"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/modelLabel"
android:layout_alignLeft="@+id/vin"
android:layout_alignRight="@+id/vin"
android:layout_alignBaseline="@+id/modelLabel"
android:ems="10" />
<TextView
android:id="@+id/colorLabel"
android:layout_below="@+id/modelLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="35dp"
android:textSize="20dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Color" />
<AutoCompleteTextView
android:id="@+id/color"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/colorLabel"
android:layout_alignLeft="@+id/vin"
android:layout_alignRight="@+id/vin"
android:layout_alignBaseline="@+id/colorLabel"
android:ems="10" />
<TextView
android:id="@+id/manufactureDateLabel"
android:layout_below="@+id/colorLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize="20dp"
android:layout_marginTop="35dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Manuf. Date" />
<EditText
android:id="@+id/manufactureDate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/manufactureDateLabel"
android:layout_alignLeft="@+id/vin"
android:layout_alignRight="@+id/vin"
android:layout_alignBaseline="@+id/manufactureDateLabel"
android:ems="10" />
<TextView
android:id="@+id/stockNumberLabel"
android:layout_below="@+id/manufactureDateLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize="20dp"
android:layout_marginTop="35dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Stock Number" />
<EditText
android:id="@+id/stockNumber"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/stockNumberLabel"
android:layout_alignLeft="@+id/vin"
android:layout_alignRight="@+id/vin"
android:layout_alignBaseline="@+id/stockNumberLabel"
android:ems="10" />
</RelativeLayout>
</ScrollView>
은!
보이지 않는 경우 EditText를 어떻게 만듭니 까? – Rohit5k2
나는 그것이 어디에 있어야하는지 안다 : 그것의 레이블 바로 위, 그 바로 아래의 EditText로 줄 지어있다. 거기에 있지만 커서가있는 줄이 표시되지 않습니다. –
당신이 볼 수있는'EditText' xml을 게시 할 수 있습니까? – Rohit5k2