MainActivity 에서 MainFragment 를 열도록 했구요
protected Fragment createFragment() {
// TODO Auto-generated method stub
return new MainFragment();
}
MainFragment 의 xml이 아래처럼 했습니다.
그런데 ImageView 부분에 2개의 이미지가 있어서 좌우로 슬라이드를 할수 있게 하고 싶습니다.
아래의 Spinner 와 Button은 그대로 유지하구요..
어떻게 xml를 만들고 어떻게 개념을 생각해야 하는지 문의 드립니다.
혹시 비슷한 내용을 공부할 수 있는 사이트가 있으면 도움 부탁 드립니다.
<LinearLayout xmlns:android="
http://schemas.android.com/apk/res/android"
xmlns:tools="
http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="top" >
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/sample"
android:background="#ffffffff"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:background="#ffffffff">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="내용선택"/>
<Spinner
android:id="@+id/spn"
android:layout_width="0dp"
android:layout_height="36sp"
android:layout_weight="7"
android:spinnerMode="dialog"></Spinner>
</LinearLayout>
<Button
android:id="@+id/button_ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="저장하기" />
</LinearLayout>