Android Open Source - ScienceQuiz Gallery View Pager






From Project

Back to project page ScienceQuiz.

License

The source code is released under:

GNU General Public License

If you think the Android project ScienceQuiz listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.finger.sciencequiz;
// w w w  .  j a v a 2  s . co  m
import android.content.Context;
import android.content.res.TypedArray;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class GalleryViewPager extends ViewPager
{
    public boolean swipeable;

    public GalleryViewPager (Context context, AttributeSet attrs)
    {
  super (context, attrs);
  TypedArray a = context.obtainStyledAttributes (attrs,
      R.styleable.GalleryViewPager);
  try
  {
      swipeable = a.getBoolean (R.styleable.GalleryViewPager_swipeable,
    true);
  }
  finally
  {
      a.recycle ();
  }
    }

    @Override
    public boolean onInterceptTouchEvent (MotionEvent event)
    {
  return swipeable ? super.onInterceptTouchEvent (event) : false;
    }

    @Override
    public boolean onTouchEvent (MotionEvent event)
    {
  return swipeable ? super.onTouchEvent (event) : false;
    }
}




Java Source Code List

com.finger.sciencequiz.AboutActivity.java
com.finger.sciencequiz.ConfigReader.java
com.finger.sciencequiz.FriendsHomeFragment.java
com.finger.sciencequiz.GalleryViewPager.java
com.finger.sciencequiz.GameActivity.java
com.finger.sciencequiz.GameTypeSelectActivity.java
com.finger.sciencequiz.HistoryActivity.java
com.finger.sciencequiz.HomePagerAdapter.java
com.finger.sciencequiz.ImageAdapter.java
com.finger.sciencequiz.LobbyActivity.java
com.finger.sciencequiz.MainActivity.java
com.finger.sciencequiz.NavigationDrawerFragment.java
com.finger.sciencequiz.NewGameActivity.java
com.finger.sciencequiz.ProfileHomeFragment.java
com.finger.sciencequiz.RotationTextView.java
com.finger.sciencequiz.RunningGamesHomeFragment.java
com.finger.sciencequiz.SettingsActivity.java
com.finger.sciencequiz.StartHomeFragment.java