Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
h7lin committed Oct 19, 2012
0 parents commit 8abde42
Show file tree
Hide file tree
Showing 125 changed files with 7,851 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
16 changes: 16 additions & 0 deletions .gitignore
@@ -0,0 +1,16 @@
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties
33 changes: 33 additions & 0 deletions .project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ImageLoader</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
52 changes: 52 additions & 0 deletions AndroidManifest.xml
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nostra13.example.universalimageloader"
android:versionCode="22"
android:versionName="1.6.1" >

<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="4" />

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

<application
android:name=".UILApplication"
android:icon="@drawable/app_icon"
android:label="@string/app_name" >
<activity
android:name=".HomeActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ImageListActivity"
android:label="@string/ac_name_image_list" />
<activity
android:name=".ImageGridActivity"
android:label="@string/ac_name_image_grid" />
<activity
android:name=".ImagePagerActivity"
android:label="@string/ac_name_image_pager" />
<activity
android:name=".ImageGalleryActivity"
android:label="@string/ac_name_image_gallery" />

<!-- Widget -->
<receiver android:name=".widget.UILWidgetProvider">
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_provider" />

<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
</receiver>
</application>

</manifest>
4 changes: 4 additions & 0 deletions README.md
@@ -0,0 +1,4 @@
ImageLoader
=====

Based on https://github.com/nostra13/Android-Universal-Image-Loader
Binary file added libs/android-support-v4.jar
Binary file not shown.
11 changes: 11 additions & 0 deletions project.properties
@@ -0,0 +1,11 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-7
10 changes: 10 additions & 0 deletions res/anim/fade_in.xml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >

<alpha
android:duration="@android:integer/config_mediumAnimTime"
android:fromAlpha="0.0"
android:interpolator="@android:anim/decelerate_interpolator"
android:toAlpha="1.0" />

</set>
Binary file added res/drawable-hdpi/app_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/image_for_empty_url.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/stub_image.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions res/layout/ac_home.xml
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dip"
android:paddingLeft="10dip"
android:paddingTop="20dip"
android:text="@string/label_activity_examples"
android:textSize="24dip" />

<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:onClick="onImageListClick"
android:text="@string/button_image_list" />

<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:onClick="onImageGridClick"
android:text="@string/button_image_grid" />

<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:onClick="onImagePagerClick"
android:text="@string/button_image_pager" />

<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:onClick="onImageGalleryClick"
android:text="@string/button_image_gallery" />

</LinearLayout>
7 changes: 7 additions & 0 deletions res/layout/ac_image_gallery.xml
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:spacing="1dip" />
11 changes: 11 additions & 0 deletions res/layout/ac_image_grid.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="100dip"
android:gravity="center"
android:horizontalSpacing="4dip"
android:numColumns="auto_fit"
android:stretchMode="columnWidth"
android:verticalSpacing="4dip" />
5 changes: 5 additions & 0 deletions res/layout/ac_image_list.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
5 changes: 5 additions & 0 deletions res/layout/ac_image_pager.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
9 changes: 9 additions & 0 deletions res/layout/item_gallery_image.xml
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image"
android:layout_width="120dip"
android:layout_height="120dip"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:contentDescription="@string/descr_image"
android:scaleType="centerCrop" />
8 changes: 8 additions & 0 deletions res/layout/item_grid_image.xml
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image"
android:layout_width="100dip"
android:layout_height="100dip"
android:adjustViewBounds="true"
android:contentDescription="@string/descr_image"
android:scaleType="centerCrop" />
21 changes: 21 additions & 0 deletions res/layout/item_list_image.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<ImageView
android:id="@+id/image"
android:layout_width="72dip"
android:layout_height="72dip"
android:adjustViewBounds="true"
android:contentDescription="@string/descr_image" />

<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="20dip"
android:textSize="22sp" />

</LinearLayout>
22 changes: 22 additions & 0 deletions res/layout/item_pager_image.xml
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="1dip" >

<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:contentDescription="@string/descr_image" />

<ProgressBar
android:id="@+id/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />

</FrameLayout>
32 changes: 32 additions & 0 deletions res/layout/widget.xml
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="8dip"
android:orientation="horizontal" >

<ImageView
android:id="@+id/image_left"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/descr_image"
android:paddingBottom="4dip"
android:paddingLeft="8dip"
android:paddingRight="4dip"
android:paddingTop="4dip"
android:src="@drawable/stub_image" />

<ImageView
android:id="@+id/image_right"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/descr_image"
android:paddingBottom="4dip"
android:paddingLeft="4dip"
android:paddingRight="8dip"
android:paddingTop="4dip"
android:src="@drawable/stub_image" />

</LinearLayout>
12 changes: 12 additions & 0 deletions res/menu/main_menu.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

<item
android:id="@+id/item_clear_memory_cache"
android:title="@string/menu_item_clear_memory_cache"/>

<item
android:id="@+id/item_clear_disc_cache"
android:title="@string/menu_item_clear_disc_cache"/>

</menu>

0 comments on commit 8abde42

Please sign in to comment.