스플래쉬 다음 인트로페이지는 5개입니다 한페이지에 이미지3개가 차례대로 나온후 멈추고 제가 손으로 슬라이드 터치하면 옆으로넘어가 그 페이지에서 또 이미지3개가 차레대로 나온 후 멈추고 그런식으로 하고싶어요 ..
<RelativeLayout xmlns:android="
http://schemas.android.com/apk/res/android"
android:id="@+id/ll_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="0dp"
android:background="@drawable/intro_05">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="50dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/btn_sign_in"
android:layout_width="0dip"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:layout_height="120dp"
android:layout_weight="1.0"
android:adjustViewBounds="true"
android:background="@null" />
</LinearLayout>
</RelativeLay>
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
public class ragmentIntro extends RasSimpleBaseFragment implements OnClickListener {
String TAG = "ragmentIntro";
AppLog Log = AppLog.getInstance();
AppMain mMain = AppMain.getInstance();
private RelativeLayout ll_background;
private ImageButton btn_sign_in;
private int[] background_res_ids = { R.drawable.intro_01, R.drawable.intro_02, R.drawable.intro_03, R.drawable.intro_04, R.drawable.intro_05 }; //5개
int mNum; // page number 페이지 숫자
public static GPFragmentIntro newInstance(int num) {
GPFragmentIntro f = new GPFragmentIntro();
Bundle args = new Bundle();
args.putInt("num", num);
f.setArguments(args);
return f;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mNum = getArguments() != null ? getArguments().getInt("num") : 1;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.gp_fragment_intro, container, false);
ll_background = (RelativeLayout) layout.findViewById(R.id.ll_background);
btn_sign_in = (ImageButton) layout.findViewById(R.id.btn_sign_in);
btn_sign_in.setOnClickListener(this);
// btn_sign_up = (ImageButton) layout.findViewById(R.id.btn_sign_up);
// btn_sign_up.setOnClickListener(this);
updateUI();
return layout;
}
void updateUI() {
if (mNum == 4) {
btn_sign_in.setVisibility(View.VISIBLE);
// btn_sign_up.setVisibility(View.VISIBLE);
} else {
btn_sign_in.setVisibility(View.GONE);
// btn_sign_up.setVisibility(View.GONE);
}
ll_background.setBackgroundResource(background_res_ids[mNum]);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case android.R.id.home:
AppNotifyData data = new AppNotifyData("sign-up-prev");
((RasSimpleBaseFragmentActivity) getActivity()).postMessage(AppDefine.NOTI_BUTTON_CLICK, data, 0);
break;
}
return true;
}
@Override
public void onClick(View v) {
int id = v.getId();
switch (id) {
case R.id.btn_sign_in:
AppIntent ai = new AppIntent();
ai.setParam("key1", "sign-in");
ai.runActivity(getActivity(), mMain.gv.getMainActivity(), 1);
getActivity().finish();
break;
// case R.id.btn_sign_up:
// ai = new AppIntent();
// ai.setParam("key1", "sign-up-phase-1");
// //ai.runActivity(getActivity(), SGActivitySignUpPhase1.class, 1);
// //SGPreferences.getInstance().setFirstRun(false);
// getActivity().finish();
// break;
}
}
@Override
public void notifyEvent(AppNotifyData data) {
Log.d(TAG, "notifyEvent:" + data.getType());
}
}
아무리 짜봐도 안나와서 질문드려봐요 ㅠㅠ