Import android.app. Activity import android.os. Bundle import android.view.
GestureDetector import android.view.GestureDetector. SimpleOnGestureListener import android.view. MotionEvent import android.view.
View import android.view.animation. Animation import android.view.animation. AnimationUtils import android.widget.
AdapterView import android.widget. ArrayAdapter import android.widget. ListView import android.widget.
Toast import android.widget. ViewFlipper import android.widget.AdapterView. OnItemClickListener public class MainActivity extends Activity { private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; private GestureDetector gestureDetector; View.
OnTouchListener gestureListener; private Animation slideLeftIn; private Animation slideLeftOut; private Animation slideRightIn; private Animation slideRightOut; private ViewFlipper viewFlipper; private ListView lv; private String city = { "Indore", "Bhopal", "Khargone", "Ujjain", "Nasik", "Pune", "Delhi", "Mumbai", "Noida", "Hyderabad", "Banglore", "Ajmer", "Goa", "Jaipur", "Nagpur", "" }; private String country = { "India", "Bhutan", "Kuwait", "USA", }; @Override public void onCreate(Bundle savedInstanceState) { super. OnCreate(savedInstanceState); setContentView(R.layout. Main_layout); lv = (ListView) findViewById(R.id.
List01); ListView lv2 = (ListView) findViewById(R.id. List02); viewFlipper = (ViewFlipper) findViewById(R.id. Flipper); slideLeftIn = AnimationUtils.
LoadAnimation(this, R.anim. Slide_left_in); slideLeftOut = AnimationUtils . LoadAnimation(this, R.anim.
Slide_left_out); slideRightIn = AnimationUtils . LoadAnimation(this, R.anim. Slide_right_in); slideRightOut = AnimationUtils.
LoadAnimation(this, R.anim. Slide_right_out); ActivitySwipeDetector activitySwipeDetector = new ActivitySwipeDetector( this) View on which gesture should function This is image view at bottom of listView on which flip gesture is performed flipBarBottom. SetOnTouchListener(activitySwipeDetector) lv.
SetAdapter(new ArrayAdapter(this, android.R.layout. Simple_list_item_1, city)); lv2. SetAdapter(new ArrayAdapter(this, android.R.layout.
Simple_list_item_1, country)); lv. SetOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView arg0, View view, int position, long id) { // user clicked a list item, make it "selected" Toast. MakeText(getBaseContext(), "Item Clicked", Toast.
LENGTH_SHORT).show(); // selectedAdapter. SetSelectedPosition(position); } }); lv2. SetOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView arg0, View view, int position, long id) { // user clicked a list item, make it "selected" Toast.
MakeText(getBaseContext(), "Item List2 Clicked", Toast. LENGTH_SHORT).show(); // selectedAdapter. SetSelectedPosition(position); } }); } public class ActivitySwipeDetector implements View.
OnTouchListener { static final String logTag = "ActivitySwipeDetector"; private Activity activity; static final int MIN_DISTANCE = 100; private float downX, downY, upX, upY; public ActivitySwipeDetector(Activity activity) { this. Activity = activity; } public void onRightToLeftSwipe() { Log. I(logTag, "RightToLeftSwipe!"); // activity.doSomething(); viewFlipper.
SetInAnimation(slideLeftIn); viewFlipper. SetOutAnimation(slideLeftOut); viewFlipper.showNext(); flipBarBottom. SetBackgroundResource(R.drawable.
Flipstatus01); } public void onLeftToRightSwipe() { Log. I(logTag, "LeftToRightSwipe!"); viewFlipper. SetInAnimation(slideRightIn); viewFlipper.
SetOutAnimation(slideRightOut); viewFlipper.showPrevious(); flipBarBottom. SetBackgroundResource(R.drawable. Flipstatus02); // activity.doSomething(); } public void onTopToBottomSwipe() { Log.
I(logTag, "onTopToBottomSwipe!"); // activity.doSomething(); } public void onBottomToTopSwipe() { Log. I(logTag, "onBottomToTopSwipe! "); // activity.doSomething(); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.
ACTION_DOWN: { downX = event.getX(); downY = event.getY(); return true; } case MotionEvent. ACTION_UP: { upX = event.getX(); upY = event.getY(); float deltaX = downX - upX; float deltaY = downY - upY; // swipe horizontal? If (Math.
Abs(deltaX) > MIN_DISTANCE) { // left or right if (deltaX 0) { this. OnRightToLeftSwipe(); return true; } } else { Log. I(logTag, "Swipe was only " + Math.
Abs(deltaX) + " long, need at least " + MIN_DISTANCE); } // swipe vertical? If (Math. Abs(deltaY) > MIN_DISTANCE) { // top or down if (deltaY 0) { this.
OnBottomToTopSwipe(); return true; } } else { Log. I(logTag, "Swipe was only " + Math. Abs(deltaX) + " long, need at least " + MIN_DISTANCE); } return true; } } return false; } }.
Import android.app. Activity; import android.os. Bundle; import android.view.
GestureDetector; import android.view.GestureDetector. SimpleOnGestureListener; import android.view. MotionEvent; import android.view.
View; import android.view.animation. Animation; import android.view.animation. AnimationUtils; import android.widget.
AdapterView; import android.widget. ArrayAdapter; import android.widget. ListView; import android.widget.
Toast; import android.widget. ViewFlipper; import android.widget.AdapterView. OnItemClickListener; public class MainActivity extends Activity { private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; private GestureDetector gestureDetector; View.
OnTouchListener gestureListener; private Animation slideLeftIn; private Animation slideLeftOut; private Animation slideRightIn; private Animation slideRightOut; private ViewFlipper viewFlipper; private ListView lv; private String city = { "Indore", "Bhopal", "Khargone", "Ujjain", "Nasik", "Pune", "Delhi", "Mumbai", "Noida", "Hyderabad", "Banglore", "Ajmer", "Goa", "Jaipur", "Nagpur", "" }; private String country = { "India", "Bhutan", "Kuwait", "USA", }; @Override public void onCreate(Bundle savedInstanceState) { super. OnCreate(savedInstanceState); setContentView(R.layout. Main_layout); lv = (ListView) findViewById(R.id.
List01); ListView lv2 = (ListView) findViewById(R.id. List02); viewFlipper = (ViewFlipper) findViewById(R.id. Flipper); slideLeftIn = AnimationUtils.
LoadAnimation(this, R.anim. Slide_left_in); slideLeftOut = AnimationUtils . LoadAnimation(this, R.anim.
Slide_left_out); slideRightIn = AnimationUtils . LoadAnimation(this, R.anim. Slide_right_in); slideRightOut = AnimationUtils.
LoadAnimation(this, R.anim. Slide_right_out); ActivitySwipeDetector activitySwipeDetector = new ActivitySwipeDetector( this); //View on which gesture should function This is image view at bottom of listView on which flip gesture is performed. FlipBarBottom.
SetOnTouchListener(activitySwipeDetector); lv. SetAdapter(new ArrayAdapter(this, android.R.layout. Simple_list_item_1, city)); lv2.
SetAdapter(new ArrayAdapter(this, android.R.layout. Simple_list_item_1, country)); lv. SetOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView arg0, View view, int position, long id) { // user clicked a list item, make it "selected" Toast.
MakeText(getBaseContext(), "Item Clicked", Toast. LENGTH_SHORT).show(); // selectedAdapter. SetSelectedPosition(position); } }); lv2.
SetOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView arg0, View view, int position, long id) { // user clicked a list item, make it "selected" Toast. MakeText(getBaseContext(), "Item List2 Clicked", Toast. LENGTH_SHORT).show(); // selectedAdapter.
SetSelectedPosition(position); } }); } public class ActivitySwipeDetector implements View. OnTouchListener { static final String logTag = "ActivitySwipeDetector"; private Activity activity; static final int MIN_DISTANCE = 100; private float downX, downY, upX, upY; public ActivitySwipeDetector(Activity activity) { this. Activity = activity; } public void onRightToLeftSwipe() { Log.
I(logTag, "RightToLeftSwipe! "); // activity.doSomething(); viewFlipper. SetInAnimation(slideLeftIn); viewFlipper.
SetOutAnimation(slideLeftOut); viewFlipper.showNext(); flipBarBottom. SetBackgroundResource(R.drawable. Flipstatus01); } public void onLeftToRightSwipe() { Log.
I(logTag, "LeftToRightSwipe! "); viewFlipper. SetInAnimation(slideRightIn); viewFlipper.
SetOutAnimation(slideRightOut); viewFlipper.showPrevious(); flipBarBottom. SetBackgroundResource(R.drawable. Flipstatus02); // activity.doSomething(); } public void onTopToBottomSwipe() { Log.
I(logTag, "onTopToBottomSwipe! "); // activity.doSomething(); } public void onBottomToTopSwipe() { Log. I(logTag, "onBottomToTopSwipe!"); // activity.doSomething(); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.
ACTION_DOWN: { downX = event.getX(); downY = event.getY(); return true; } case MotionEvent. ACTION_UP: { upX = event.getX(); upY = event.getY(); float deltaX = downX - upX; float deltaY = downY - upY; // swipe horizontal? If (Math.
Abs(deltaX) > MIN_DISTANCE) { // left or right if (deltaX 0) { this. OnRightToLeftSwipe(); return true; } } else { Log. I(logTag, "Swipe was only " + Math.
Abs(deltaX) + " long, need at least " + MIN_DISTANCE); } // swipe vertical? If (Math. Abs(deltaY) > MIN_DISTANCE) { // top or down if (deltaY 0) { this.
OnBottomToTopSwipe(); return true; } } else { Log. I(logTag, "Swipe was only " + Math. Abs(deltaX) + " long, need at least " + MIN_DISTANCE); } return true; } } return false; } }.
Lv = (ListView) findViewById(R.id. ListView lv2 = (ListView) findViewById(R.id. ViewFlipper = (ViewFlipper) findViewById(R.id.
SlideLeftIn = AnimationUtils.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.