나는 그것을 설명하기보다는 보여주기 쉽기 때문에 스크린 샷을 추가 한 작은 출퇴근 시간 기록 용지 응용 프로그램을 가지고 있습니다! 바라건대 당신이 거기 근로자가 될 것입니다 다른 사이트에 대한 작업 번호 있어야하고 그에 소요되는 시간에 대한 각 작업의 수를 기준으로 자신의 시간을 입력 할 수 있습니다 볼 수있는 사진과android 응용 프로그램에 사용자 정의 레이아웃을 추가하는 버튼
일자리를 추가 할 수있는 "일자리 추가"버튼을 사용할 수 있습니까? 그렇습니다. 그것이 눌려 질 때마다 아래의보기? 아래 그림과 같이 아래
이 섹션의 XML 코드는 I 당신은 버튼의onClick
에서보기를 부풀려 수
<LinearLayout
android:id="@+id/MainLayoutThree"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" > //start of 1st job layout
<LinearLayout
android:id="@+id/LayoutTwoA"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/beige"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/jobNo" >
</TextView>
<EditText
android:id="@+id/editText3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1">
</EditText>
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ordHours" >
</TextView>
<EditText
android:id="@+id/editText4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1">
</EditText>
</LinearLayout>
<LinearLayout
android:id="@+id/LayoutThree"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/beige"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/overTimeHours" />
</LinearLayout>
<LinearLayout
android:id="@+id/LayoutFour"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/beige"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="x1.25" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1">
</EditText>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="x1.50" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1">
</EditText>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="x2" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1">
</EditText>
</LinearLayout>
[동적으로 선형 레이아웃에 컨텐츠 추가?] (http://stackoverflow.com/questions/6661261/adding-content-to-a-lineary-layout-dynamically) –