└── ViewpagerImageGallery ├── .classpath ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── bin ├── AndroidManifest.xml ├── ViewpagerImageGallery.apk ├── classes.dex ├── classes │ └── com │ │ └── manishkpr │ │ └── viewpagerimagegallery │ │ ├── BuildConfig.class │ │ ├── ImageAdapter.class │ │ ├── MainActivity.class │ │ ├── R$attr.class │ │ ├── R$dimen.class │ │ ├── R$drawable.class │ │ ├── R$id.class │ │ ├── R$layout.class │ │ ├── R$menu.class │ │ ├── R$string.class │ │ ├── R$style.class │ │ └── R.class ├── dexedLibs │ └── android-support-v4-3eba929b1431598697f02298c6e512ac.jar ├── jarlist.cache ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-ldpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ └── drawable-xhdpi │ │ └── ic_launcher.png └── resources.ap_ ├── gen └── com │ └── manishkpr │ └── viewpagerimagegallery │ ├── BuildConfig.java │ └── R.java ├── ic_launcher-web.png ├── libs └── android-support-v4.jar ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-ldpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable │ ├── one.jpg │ ├── three.jpg │ └── two.jpg ├── layout │ └── activity_main.xml ├── menu │ └── activity_main.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── src └── com └── manishkpr └── viewpagerimagegallery ├── ImageAdapter.java └── MainActivity.java /ViewpagerImageGallery/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ViewpagerImageGallery 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/ViewpagerImageGallery.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/ViewpagerImageGallery.apk -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes.dex -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/BuildConfig.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/ImageAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/ImageAdapter.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/MainActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/MainActivity.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$attr.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$dimen.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$dimen.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$drawable.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$id.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$layout.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$menu.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$menu.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$string.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$style.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R$style.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/classes/com/manishkpr/viewpagerimagegallery/R.class -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/dexedLibs/android-support-v4-3eba929b1431598697f02298c6e512ac.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/dexedLibs/android-support-v4-3eba929b1431598697f02298c6e512ac.jar -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/jarlist.cache: -------------------------------------------------------------------------------- 1 | # cache for current jar dependecy. DO NOT EDIT. 2 | # format is 3 | # Encoding is UTF-8 4 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/bin/resources.ap_ -------------------------------------------------------------------------------- /ViewpagerImageGallery/gen/com/manishkpr/viewpagerimagegallery/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package com.manishkpr.viewpagerimagegallery; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /ViewpagerImageGallery/gen/com/manishkpr/viewpagerimagegallery/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.manishkpr.viewpagerimagegallery; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class dimen { 14 | public static final int padding_large=0x7f040002; 15 | public static final int padding_medium=0x7f040001; 16 | public static final int padding_small=0x7f040000; 17 | } 18 | public static final class drawable { 19 | public static final int ic_launcher=0x7f020000; 20 | public static final int one=0x7f020001; 21 | public static final int three=0x7f020002; 22 | public static final int two=0x7f020003; 23 | } 24 | public static final class id { 25 | public static final int menu_settings=0x7f080001; 26 | public static final int view_pager=0x7f080000; 27 | } 28 | public static final class layout { 29 | public static final int activity_main=0x7f030000; 30 | } 31 | public static final class menu { 32 | public static final int activity_main=0x7f070000; 33 | } 34 | public static final class string { 35 | public static final int app_name=0x7f050000; 36 | public static final int hello_world=0x7f050001; 37 | public static final int menu_settings=0x7f050002; 38 | } 39 | public static final class style { 40 | /** 41 | Base application theme, dependent on API level. This theme is replaced 42 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 43 | 44 | 45 | Theme customizations available in newer API levels can go in 46 | res/values-vXX/styles.xml, while customizations related to 47 | backward-compatibility can go here. 48 | 49 | 50 | Base application theme for API 11+. This theme completely replaces 51 | AppBaseTheme from res/values/styles.xml on API 11+ devices. 52 | 53 | API 11 theme customizations can go here. 54 | 55 | Base application theme for API 14+. This theme completely replaces 56 | AppBaseTheme from BOTH res/values/styles.xml and 57 | res/values-v11/styles.xml on API 14+ devices. 58 | 59 | API 14 theme customizations can go here. 60 | */ 61 | public static final int AppBaseTheme=0x7f060000; 62 | /** Application theme. 63 | All customizations that are NOT specific to a particular API-level can go here. 64 | */ 65 | public static final int AppTheme=0x7f060001; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/ic_launcher-web.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/libs/android-support-v4.jar -------------------------------------------------------------------------------- /ViewpagerImageGallery/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-17 15 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable/one.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable/one.jpg -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable/three.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable/three.jpg -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/drawable/two.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manishkpr/AndroidViewPagerGallery/35e675494d3174cad9b48b2dd2ca9fa4b175e87d/ViewpagerImageGallery/res/drawable/two.jpg -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/menu/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 4dp 3 | 8dp 4 | 16dp 5 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ViewpagerImageGallery 5 | Hello world! 6 | Settings 7 | 8 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/src/com/manishkpr/viewpagerimagegallery/ImageAdapter.java: -------------------------------------------------------------------------------- 1 | package com.manishkpr.viewpagerimagegallery; 2 | 3 | import android.content.Context; 4 | import android.support.v4.view.PagerAdapter; 5 | import android.support.v4.view.ViewPager; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.ImageView; 9 | 10 | public class ImageAdapter extends PagerAdapter { 11 | Context context; 12 | private int[] GalImages = new int[] { 13 | R.drawable.one, 14 | R.drawable.two, 15 | R.drawable.three 16 | }; 17 | ImageAdapter(Context context){ 18 | this.context=context; 19 | } 20 | @Override 21 | public int getCount() { 22 | return GalImages.length; 23 | } 24 | 25 | @Override 26 | public boolean isViewFromObject(View view, Object object) { 27 | return view == ((ImageView) object); 28 | } 29 | 30 | @Override 31 | public Object instantiateItem(ViewGroup container, int position) { 32 | ImageView imageView = new ImageView(context); 33 | int padding = context.getResources().getDimensionPixelSize(R.dimen.padding_medium); 34 | imageView.setPadding(padding, padding, padding, padding); 35 | imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); 36 | imageView.setImageResource(GalImages[position]); 37 | ((ViewPager) container).addView(imageView, 0); 38 | return imageView; 39 | } 40 | 41 | @Override 42 | public void destroyItem(ViewGroup container, int position, Object object) { 43 | ((ViewPager) container).removeView((ImageView) object); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ViewpagerImageGallery/src/com/manishkpr/viewpagerimagegallery/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.manishkpr.viewpagerimagegallery; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.support.v4.view.ViewPager; 6 | 7 | public class MainActivity extends Activity { 8 | @Override 9 | public void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_main); 12 | 13 | ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager); 14 | ImageAdapter adapter = new ImageAdapter(this); 15 | viewPager.setAdapter(adapter); 16 | } 17 | 18 | 19 | } 20 | --------------------------------------------------------------------------------