Skip to content

Commit

Permalink
Converted Sample to standard sources layout, added AUIL Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
smarek committed Mar 25, 2014
1 parent 5a283e0 commit 532febf
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 15 deletions.
9 changes: 1 addition & 8 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'android'

dependencies {
compile 'com.android.support:support-v4:19.0.+'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.1'
compile project(':library')
}

Expand All @@ -13,12 +14,4 @@ android {
minSdkVersion 8
targetSdkVersion 19
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
Binary file removed sample/libs/android-support-v4.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
android:versionName="1.2.2-SNAPSHOT">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
Expand All @@ -24,6 +21,7 @@
<activity android:name=".SimpleSampleActivity" />
<activity android:name=".ViewPagerActivity" />
<activity android:name=".RotationSampleActivity" />
<activity android:name=".AUILSampleActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package uk.co.senab.photoview.sample;

import android.app.Activity;
import android.os.Bundle;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

import uk.co.senab.photoview.PhotoView;

public class AUILSampleActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_simple);

PhotoView photoView = (PhotoView) findViewById(R.id.iv_photo);

if (!ImageLoader.getInstance().isInited()) {
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).build();
ImageLoader.getInstance().init(config);
}

ImageLoader.getInstance().displayImage("http://pbs.twimg.com/media/Bist9mvIYAAeAyQ.jpg", photoView);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public class LauncherActivity extends ListActivity {

public static final String[] options = {"Simple Sample", "ViewPager Sample", "Rotation Sample"};
public static final String[] options = {"Simple Sample", "ViewPager Sample", "Rotation Sample", "Android Universal Image Loader"};

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -47,6 +47,9 @@ protected void onListItemClick(ListView l, View v, int position, long id) {
case 2:
intent = new Intent(this, RotationSampleActivity.class);
break;
case 3:
intent = new Intent(this, AUILSampleActivity.class);
break;
}

startActivity(intent);
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/android" >
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<FrameLayout
android:layout_width="match_parent"
Expand Down
5 changes: 5 additions & 0 deletions sample/src/main/res/layout/activity_simple.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<uk.co.senab.photoview.PhotoView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/iv_photo"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 532febf

Please sign in to comment.