android - implement Tab host Using ImageViews -


I have three images. When I change the image that I want to change the image. ( clickable image, non-click enabled image. ). When I go to the second image, I want to set the image on the clickable image. And the image I pressed should come in a non-clickable image. ( is just like tabhost-im to see image developing tab image ) There is no way to do this. Here I have found the code snippet, please see below.

  loginbtn .setOnTouchListener (New On-TouchListener) {@ Override Public Boolean On Touch (see We, Motion Avenger RG1) {Switch (arg1.getAction ()) {Case MotionEvent.ACTION_DOWN : {(ImageView) v .setImageResource (R.drawable.login_click); NewFragment = New Login (); Piece Transaction Transaction = getFragmentManager (). BeginTransaction (); Transactions.Rayle (RIDM Institution , Newfragment); transaction.ad tubaux stack (empty); transaction.setTransition (FragmentTransaction.TRANSIT_FRAGMENT_OPEN); transaction.commit ();} back true;}});  

you can

int click = 0;

  images.setOnTouchListener (New View.OnTouchListener () {@Override Public Boolean On-Touch (View View, Motion Event Speed ​​Event) {Switch (Motion Avenate Compat .. Gate Action Masked (Speed ​​Event) ) {Case motion event.action_up: clicked ++; break; case MotionEvent.ACTION_DOWN: if (click == 1) {images.setImageResource (R.drawable.click_image);} and if (clicked == 2 } {Images.setImageResource (R.drawable.non_click_image); Back to true;;}}  

}


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -