Selaa lähdekoodia

冗余代码删除

huyuguo 3 vuotta sitten
vanhempi
commit
f6c3209481
41 muutettua tiedostoa jossa 0 lisäystä ja 1732 poistoa
  1. 0 40
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/AndroidManifest.xml
  2. 0 74
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/ImageFloder.java
  3. 0 436
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/ImageLoader.java
  4. 0 356
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/SelectPhotoActivity.java
  5. 0 98
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/CommonAdapter.java
  6. 0 116
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/GirdItemAdapter.java
  7. 0 89
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/ImageFloderAdapter.java
  8. 0 126
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/ViewHolder.java
  9. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-hdpi/ic_launcher.png
  10. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-mdpi/ic_launcher.png
  11. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph.png
  12. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph1.png
  13. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph_highlighted.png
  14. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph_highlighted1.png
  15. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/dir_choose.png
  16. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/ic_launcher.png
  17. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/navigationbar_arrow_down.png
  18. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/navigationbar_arrow_up.png
  19. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/pic_dir.png
  20. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/picture_unselected.png
  21. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/pictures_no.png
  22. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/pictures_selected.png
  23. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xxhdpi/dir_choose.png
  24. BIN
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xxhdpi/ic_launcher.png
  25. 0 8
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable/photo_btn_selector.xml
  26. 0 30
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable/photo_select_btn_selector.xml
  27. 0 16
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/activity_main.xml
  28. 0 25
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/grid_item.xml
  29. 0 22
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/grid_item2.xml
  30. 0 17
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/image_select_dirlist.xml
  31. 0 56
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/list_dir_item.xml
  32. 0 52
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/photo_select_view.xml
  33. 0 76
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/select_photo_header.xml
  34. 0 12
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/menu/main.xml
  35. 0 11
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values-v11/styles.xml
  36. 0 12
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values-v14/styles.xml
  37. 0 10
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values-w820dp/dimens.xml
  38. 0 27
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/colors.xml
  39. 0 7
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/dimens.xml
  40. 0 8
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/strings.xml
  41. 0 8
      app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/styles.xml

+ 0 - 40
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/AndroidManifest.xml

@ -1,40 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
    package="com.example.imageselected"
4
    android:versionCode="1"
5
    android:versionName="1.0" >
6
7
    <uses-sdk
8
        android:minSdkVersion="24"
9
        android:targetSdkVersion="29" />
10
11
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
12
    <uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
13
    <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
14
    <uses-permission android:name="android.permission.CAMERA" />
15
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
16
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
17
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
18
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
19
    <uses-permission android:name="android.permission.CAMERA" />
20
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
21
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
22
    <uses-permission android:name="android.permission.WAKE_LOCK" />
23
24
    <application
25
        android:allowBackup="true"
26
        android:icon="@drawable/ic_launcher"
27
        android:label="@string/app_name"
28
        android:theme="@style/AppTheme" >
29
        <activity
30
            android:name=".photo.SelectPhotoActivity"
31
            android:label="@string/app_name" >
32
            <intent-filter>
33
                <action android:name="android.intent.action.MAIN" />
34
35
                <category android:name="android.intent.category.LAUNCHER" />
36
            </intent-filter>
37
        </activity>
38
    </application>
39
40
</manifest>

+ 0 - 74
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/ImageFloder.java

@ -1,74 +0,0 @@
1
package com.example.imageselected.photo;
2

3
/**
4
 * 图片的实体类
5
 * @author Administrator
6
 *
7
 */
8
public class ImageFloder{
9
	/**
10
	 * 图片的文件夹路径
11
	 */
12
	private String dir;
13

14
	/**
15
	 * 第一张图片的路径
16
	 */
17
	private String firstImagePath;
18

19
	/**
20
	 * 文件夹的名称
21
	 */
22
	private String name;
23

24
	/**
25
	 * 图片的数量
26
	 */
27
	private int count;
28

29
	private boolean  isSelected;
30
	
31
	public boolean isSelected() {
32
		return isSelected;
33
	}
34

35
	public void setSelected(boolean isSelected) {
36
		this.isSelected = isSelected;
37
	}
38

39
	public void setName(String name) {
40
		this.name = name;
41
	}
42

43
	public String getDir(){
44
		return dir;
45
	}
46

47
	public void setDir(String dir){
48
		this.dir = dir;
49
		int lastIndexOf = this.dir.lastIndexOf("/");
50
		this.name = this.dir.substring(lastIndexOf);
51
	}
52

53
	public String getFirstImagePath(){
54
		return firstImagePath;
55
	}
56

57
	public void setFirstImagePath(String firstImagePath){
58
		this.firstImagePath = firstImagePath;
59
	}
60

61
	public String getName(){
62
		return name;
63
	}
64
	public int getCount(){
65
		return count;
66
	}
67

68
	public void setCount(int count){
69
		this.count = count;
70
	}
71

72
	
73

74
}

+ 0 - 436
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/ImageLoader.java

@ -1,436 +0,0 @@
1
package com.example.imageselected.photo;
2

3
import java.lang.reflect.Field;
4
import java.util.LinkedList;
5
import java.util.concurrent.ExecutorService;
6
import java.util.concurrent.Executors;
7
import java.util.concurrent.Semaphore;
8

9
import android.graphics.Bitmap;
10
import android.graphics.BitmapFactory;
11
import android.os.Handler;
12
import android.os.Looper;
13
import android.os.Message;
14
import androidx.collection.LruCache;
15
import android.util.DisplayMetrics;
16
import android.util.Log;
17
import android.view.ViewGroup.LayoutParams;
18
import android.widget.ImageView;
19

20
public class ImageLoader
21
{
22
	/**
23
	 * ͼƬ����ĺ�����
24
	 */
25
	private LruCache<String, Bitmap> mLruCache;
26
	/**
27
	 * �̳߳�
28
	 */
29
	private ExecutorService mThreadPool;
30
	/**
31
	 * �̳߳ص��߳�������Ĭ��Ϊ1
32
	 */
33
	private int mThreadCount = 1;
34
	/**
35
	 * ���еĵ��ȷ�ʽ
36
	 */
37
	private Type mType = Type.LIFO;
38
	/**
39
	 * �������
40
	 */
41
	private LinkedList<Runnable> mTasks;
42
	/**
43
	 * ��ѯ���߳�
44
	 */
45
	private Thread mPoolThread;
46
	private Handler mPoolThreadHander;
47

48
	/**
49
	 * ������UI�̵߳�handler�����ڸ�ImageView����ͼƬ
50
	 */
51
	private Handler mHandler;
52

53
	/**
54
	 * ����һ��ֵΪ1���ź�������ֹmPoolThreadHanderδ��ʼ�����
55
	 */
56
	private volatile Semaphore mSemaphore = new Semaphore(0);
57

58
	/**
59
	 * ����һ��ֵΪ1���ź����������̳߳��ڲ�Ҳ��һ�������̣߳���ֹ����������ٶȹ��죬ʹLIFOЧ��������
60
	 */
61
	private volatile Semaphore mPoolSemaphore;
62

63
	private static ImageLoader mInstance;
64

65
	/**
66
	 * ���еĵ��ȷ�ʽ
67
	 * 
68
	 * @author zhy
69
	 * 
70
	 */
71
	public enum Type
72
	{
73
		FIFO, LIFO
74
	}
75

76

77
	/**
78
	 * ������ø�ʵ������
79
	 * 
80
	 * @return
81
	 */
82
	public static ImageLoader getInstance()
83
	{
84

85
		if (mInstance == null)
86
		{
87
			synchronized (ImageLoader.class)
88
			{
89
				if (mInstance == null)
90
				{
91
					mInstance = new ImageLoader(1, Type.LIFO);
92
				}
93
			}
94
		}
95
		return mInstance;
96
	}
97

98
	private ImageLoader(int threadCount, Type type)
99
	{
100
		init(threadCount, type);
101
	}
102

103
	private void init(int threadCount, Type type)
104
	{
105
		// loop thread
106
		mPoolThread = new Thread()
107
		{
108
			@Override
109
			public void run()
110
			{
111
				Looper.prepare();
112

113
				mPoolThreadHander = new Handler()
114
				{
115
					@Override
116
					public void handleMessage(Message msg)
117
					{
118
						mThreadPool.execute(getTask());
119
						try
120
						{
121
							mPoolSemaphore.acquire();
122
						} catch (InterruptedException e)
123
						{
124
						}
125
					}
126
				};
127
				// �ͷ�һ���ź���
128
				mSemaphore.release();
129
				Looper.loop();
130
			}
131
		};
132
		mPoolThread.start();
133

134
		// ��ȡӦ�ó����������ڴ�
135
		int maxMemory = (int) Runtime.getRuntime().maxMemory();
136
		int cacheSize = maxMemory / 8;
137
		mLruCache = new LruCache<String, Bitmap>(cacheSize)
138
		{
139
			@Override
140
			protected int sizeOf(String key, Bitmap value)
141
			{
142
				return value.getRowBytes() * value.getHeight();
143
			};
144
		};
145

146
		mThreadPool = Executors.newFixedThreadPool(threadCount);
147
		mPoolSemaphore = new Semaphore(threadCount);
148
		mTasks = new LinkedList<Runnable>();
149
		mType = type == null ? Type.LIFO : type;
150

151
	}
152

153
	/**
154
	 * ����ͼƬ
155
	 * 
156
	 * @param path
157
	 * @param imageView
158
	 */
159
	public void loadImage(final String path, final ImageView imageView)
160
	{
161
		// set tag
162
		imageView.setTag(path);
163
		// UI�߳�
164
		if (mHandler == null)
165
		{
166
			mHandler = new Handler()
167
			{
168
				@Override
169
				public void handleMessage(Message msg)
170
				{
171
					ImgBeanHolder holder = (ImgBeanHolder) msg.obj;
172
					ImageView imageView = holder.imageView;
173
					Bitmap bm = holder.bitmap;
174
					String path = holder.path;
175
					if (imageView.getTag().toString().equals(path))
176
					{
177
						imageView.setImageBitmap(bm);
178
					}
179
				}
180
			};
181
		}
182

183
		Bitmap bm = getBitmapFromLruCache(path);
184
		if (bm != null)
185
		{
186
			ImgBeanHolder holder = new ImgBeanHolder();
187
			holder.bitmap = bm;
188
			holder.imageView = imageView;
189
			holder.path = path;
190
			Message message = Message.obtain();
191
			message.obj = holder;
192
			mHandler.sendMessage(message);
193
		} else
194
		{
195
			addTask(new Runnable()
196
			{
197
				@Override
198
				public void run()
199
				{
200

201
					ImageSize imageSize = getImageViewWidth(imageView);
202

203
					int reqWidth = imageSize.width;
204
					int reqHeight = imageSize.height;
205

206
					Bitmap bm = decodeSampledBitmapFromResource(path, reqWidth,
207
							reqHeight);
208
					addBitmapToLruCache(path, bm);
209
					ImgBeanHolder holder = new ImgBeanHolder();
210
					holder.bitmap = getBitmapFromLruCache(path);
211
					holder.imageView = imageView;
212
					holder.path = path;
213
					Message message = Message.obtain();
214
					message.obj = holder;
215
					// Log.e("TAG", "mHandler.sendMessage(message);");
216
					mHandler.sendMessage(message);
217
					mPoolSemaphore.release();
218
				}
219
			});
220
		}
221

222
	}
223
	
224
	/**
225
	 * ���һ������
226
	 * 
227
	 * @param runnable
228
	 */
229
	private synchronized void addTask(Runnable runnable)
230
	{
231
		try
232
		{
233
			// �����ź�������ֹmPoolThreadHanderΪnull
234
			if (mPoolThreadHander == null)
235
				mSemaphore.acquire();
236
		} catch (InterruptedException e)
237
		{
238
		}
239
		mTasks.add(runnable);
240
		
241
		mPoolThreadHander.sendEmptyMessage(0x110);
242
	}
243

244
	/**
245
	 * ȡ��һ������
246
	 * 
247
	 * @return
248
	 */
249
	private synchronized Runnable getTask()
250
	{
251
		if (mType == Type.FIFO)
252
		{
253
			return mTasks.removeFirst();
254
		} else if (mType == Type.LIFO)
255
		{
256
			return mTasks.removeLast();
257
		}
258
		return null;
259
	}
260
	
261
	/**
262
	 * ������ø�ʵ������
263
	 * 
264
	 * @return
265
	 */
266
	public static ImageLoader getInstance(int threadCount, Type type)
267
	{
268

269
		if (mInstance == null)
270
		{
271
			synchronized (ImageLoader.class)
272
			{
273
				if (mInstance == null)
274
				{
275
					mInstance = new ImageLoader(threadCount, type);
276
				}
277
			}
278
		}
279
		return mInstance;
280
	}
281

282

283
	/**
284
	 * ����ImageView����ʵ���ѹ���Ŀ�͸�
285
	 * 
286
	 * @param imageView
287
	 * @return
288
	 */
289
	private ImageSize getImageViewWidth(ImageView imageView)
290
	{
291
		ImageSize imageSize = new ImageSize();
292
		final DisplayMetrics displayMetrics = imageView.getContext()
293
				.getResources().getDisplayMetrics();
294
		final LayoutParams params = imageView.getLayoutParams();
295

296
		int width = params.width == LayoutParams.WRAP_CONTENT ? 0 : imageView
297
				.getWidth(); // Get actual image width
298
		if (width <= 0)
299
			width = params.width; // Get layout width parameter
300
		if (width <= 0)
301
			width = getImageViewFieldValue(imageView, "mMaxWidth"); // Check
302
																	// maxWidth
303
																	// parameter
304
		if (width <= 0)
305
			width = displayMetrics.widthPixels;
306
		int height = params.height == LayoutParams.WRAP_CONTENT ? 0 : imageView
307
				.getHeight(); // Get actual image height
308
		if (height <= 0)
309
			height = params.height; // Get layout height parameter
310
		if (height <= 0)
311
			height = getImageViewFieldValue(imageView, "mMaxHeight"); // Check
312
																		// maxHeight
313
																		// parameter
314
		if (height <= 0)
315
			height = displayMetrics.heightPixels;
316
		imageSize.width = width;
317
		imageSize.height = height;
318
		return imageSize;
319

320
	}
321

322
	/**
323
	 * ��LruCache�л�ȡһ��ͼƬ����������ھͷ���null��
324
	 */
325
	private Bitmap getBitmapFromLruCache(String key)
326
	{
327
		return mLruCache.get(key);
328
	}
329

330
	/**
331
	 * ��LruCache�����һ��ͼƬ
332
	 * 
333
	 * @param key
334
	 * @param bitmap
335
	 */
336
	private void addBitmapToLruCache(String key, Bitmap bitmap)
337
	{
338
		if (getBitmapFromLruCache(key) == null)
339
		{
340
			if (bitmap != null)
341
				mLruCache.put(key, bitmap);
342
		}
343
	}
344

345
	/**
346
	 * ����inSampleSize������ѹ��ͼƬ
347
	 * 
348
	 * @param options
349
	 * @param reqWidth
350
	 * @param reqHeight
351
	 * @return
352
	 */
353
	private int calculateInSampleSize(BitmapFactory.Options options,
354
			int reqWidth, int reqHeight)
355
	{
356
		// ԴͼƬ�Ŀ��
357
		int width = options.outWidth;
358
		int height = options.outHeight;
359
		int inSampleSize = 1;
360

361
		if (width > reqWidth && height > reqHeight)
362
		{
363
			// �����ʵ�ʿ�Ⱥ�Ŀ���ȵı���
364
			int widthRatio = Math.round((float) width / (float) reqWidth);
365
			int heightRatio = Math.round((float) width / (float) reqWidth);
366
			inSampleSize = Math.max(widthRatio, heightRatio);
367
		}
368
		return inSampleSize;
369
	}
370

371
	/**
372
	 * ���ݼ����inSampleSize���õ�ѹ����ͼƬ
373
	 * 
374
	 * @param pathName
375
	 * @param reqWidth
376
	 * @param reqHeight
377
	 * @return
378
	 */
379
	private Bitmap decodeSampledBitmapFromResource(String pathName,
380
			int reqWidth, int reqHeight)
381
	{
382
		// ��һ�ν�����inJustDecodeBounds����Ϊtrue������ȡͼƬ��С
383
		final BitmapFactory.Options options = new BitmapFactory.Options();
384
		options.inJustDecodeBounds = true;
385
		BitmapFactory.decodeFile(pathName, options);
386
		// �������涨��ķ�������inSampleSizeֵ
387
		options.inSampleSize = calculateInSampleSize(options, reqWidth,
388
				reqHeight);
389
		// ʹ�û�ȡ����inSampleSizeֵ�ٴν���ͼƬ
390
		options.inJustDecodeBounds = false;
391
		Bitmap bitmap = BitmapFactory.decodeFile(pathName, options);
392

393
		return bitmap;
394
	}
395

396
	private class ImgBeanHolder
397
	{
398
		Bitmap bitmap;
399
		ImageView imageView;
400
		String path;
401
	}
402

403
	private class ImageSize
404
	{
405
		int width;
406
		int height;
407
	}
408

409
	/**
410
	 * ������ImageView���õ�����Ⱥ͸߶�
411
	 * 
412
	 * @param object
413
	 * @param fieldName
414
	 * @return
415
	 */
416
	private static int getImageViewFieldValue(Object object, String fieldName)
417
	{
418
		int value = 0;
419
		try
420
		{
421
			Field field = ImageView.class.getDeclaredField(fieldName);
422
			field.setAccessible(true);
423
			int fieldValue = (Integer) field.get(object);
424
			if (fieldValue > 0 && fieldValue < Integer.MAX_VALUE)
425
			{
426
				value = fieldValue;
427

428
				Log.e("TAG", value + "");
429
			}
430
		} catch (Exception e)
431
		{
432
		}
433
		return value;
434
	}
435

436
}

+ 0 - 356
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/SelectPhotoActivity.java

@ -1,356 +0,0 @@
1
package com.example.imageselected.photo;
2

3
import java.io.File;
4
import java.io.FilenameFilter;
5
import java.text.SimpleDateFormat;
6
import java.util.ArrayList;
7
import java.util.Arrays;
8
import java.util.Date;
9
import java.util.HashSet;
10
import java.util.List;
11

12

13
import com.example.imageselected.R;
14
import com.example.imageselected.photo.adapter.GirdItemAdapter;
15
import com.example.imageselected.photo.adapter.ImageFloderAdapter;
16
import com.example.imageselected.photo.adapter.GirdItemAdapter.OnPhotoSelectedListener;
17

18
import android.app.Activity;
19
import android.app.ProgressDialog;
20
import android.content.ContentResolver;
21
import android.content.Intent;
22
import android.database.Cursor;
23
import android.graphics.drawable.BitmapDrawable;
24
import android.net.Uri;
25
import android.os.Bundle;
26
import android.os.Environment;
27
import android.os.Handler;
28
import android.os.Message;
29
import android.provider.MediaStore;
30
import android.util.DisplayMetrics;
31
import android.util.Log;
32
import android.view.LayoutInflater;
33
import android.view.View;
34
import android.view.Window;
35
import android.view.WindowManager;
36
import android.view.View.OnClickListener;
37
import android.view.ViewGroup.LayoutParams;
38
import android.widget.AdapterView;
39
import android.widget.AdapterView.OnItemClickListener;
40
import android.widget.Button;
41
import android.widget.GridView;
42
import android.widget.ImageView;
43
import android.widget.LinearLayout;
44
import android.widget.ListView;
45
import android.widget.PopupWindow;
46
import android.widget.PopupWindow.OnDismissListener;
47
import android.widget.RelativeLayout;
48
import android.widget.TextView;
49
import android.widget.Toast;
50
/**
51
 * 相册图片选择
52
 * @author Administrator
53
 *
54
 */
55
public class SelectPhotoActivity extends Activity  {
56

57
	private GridView photoGrid;//图片列表
58

59
	private Button photoBtn;//底部下一步按钮
60

61
	private TextView titleName;//头部的标题
62

63
	private ImageView titleIcon;//头部的三角图标
64

65
	private ProgressDialog mProgressDialog;
66

67
	private HashSet<String> mDirPaths = new HashSet<String>();// 临时的辅助类,用于防止同一个文件夹的多次扫描
68

69
	private List<ImageFloder> mImageFloders = new ArrayList<ImageFloder>();// 扫描拿到所有的图片文件夹
70

71
	int totalCount = 0;
72

73
	private File mImgDir=new File("");// 图片数量最多的文件夹
74

75
	private int mPicsSize;//存储文件夹中的图片数量
76

77
	private List<String> mImgs=new ArrayList<String>();//所有的图片
78

79
	private int mScreenHeight;
80

81
	private LinearLayout dirLayout;
82

83
	private TextView quxiaoBtn;
84

85
	private ListView dirListView;
86

87
	private RelativeLayout headLayout;
88

89
	private int mScreenWidth;
90

91
	private ImageFloderAdapter floderAdapter;
92

93
	private GirdItemAdapter girdItemAdapter;
94

95
	private PopupWindow popupWindow;
96

97
	private View dirview;
98

99
	private static final int TAKE_CAMERA_PICTURE = 1000;//拍照
100

101
	private String path;
102

103
	private File dir;
104

105
	private String imagename;
106
	@Override
107
	protected void onCreate(Bundle savedInstanceState) {
108
		super.onCreate(savedInstanceState);
109
		requestWindowFeature(Window.FEATURE_NO_TITLE);
110
		setContentView(R.layout.photo_select_view);
111
		GirdItemAdapter.mSelectedImage.clear();
112
		DisplayMetrics outMetrics = new DisplayMetrics();
113
		getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
114
		mScreenHeight = outMetrics.heightPixels;
115
		mScreenWidth = outMetrics.widthPixels;
116
		setView();
117
		getImages();
118
		initEvent();
119
	}
120
	/**
121
	 * 获取控件
122
	 */
123
	private void setView() {
124
		photoGrid=(GridView)findViewById(R.id.gird_photo_list);
125
		photoBtn=(Button)findViewById(R.id.selected_photo_btn);
126
		titleName=(TextView)this.findViewById(R.id.selected_photo_name_text);
127
		quxiaoBtn=(TextView)findViewById(R.id.quxiao_btn);
128
		titleIcon=(ImageView)findViewById(R.id.selected_photo_icon);
129
		headLayout=(RelativeLayout)findViewById(R.id.selected_photo_header_layout);
130
		titleIcon.setBackgroundResource(R.drawable.navigationbar_arrow_down);
131
	}
132
	/**
133
	 * 利用ContentProvider扫描手机中的图片,此方法在运行在子线程中 完成图片的扫描,最终获得jpg最多的那个文件夹
134
	 */
135
	private void getImages(){
136
		if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){
137
			Toast.makeText(this, "暂无外部存储", Toast.LENGTH_SHORT).show();
138
			return;
139
		}
140
		// 显示进度条
141
		mProgressDialog = ProgressDialog.show(this, null, "正在加载...");
142
		new Thread(new Runnable(){
143
			@Override
144
			public void run(){
145
				String firstImage = null;
146
				Uri mImageUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
147
				ContentResolver mContentResolver = SelectPhotoActivity.this.getContentResolver();
148
				// 只查询jpeg和png的图片
149
				Cursor mCursor = mContentResolver.query(mImageUri, null,
150
						MediaStore.Images.Media.MIME_TYPE + "=? or "
151
								+ MediaStore.Images.Media.MIME_TYPE + "=?",
152
								new String[] { "image/jpeg", "image/png" },
153
								MediaStore.Images.Media.DATE_MODIFIED);
154
				Log.e("TAG", mCursor.getCount() + "");
155
				while (mCursor.moveToNext()){
156
					// 获取图片的路径
157
					String path = mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.DATA));
158
					Log.e("TAG", path);
159
					// 拿到第一张图片的路径
160
					if (firstImage == null)
161
						firstImage = path;
162
					// 获取该图片的父路径名
163
					File parentFile = new File(path).getParentFile();
164
					if (parentFile == null)
165
						continue;
166
					String dirPath = parentFile.getAbsolutePath();
167
					ImageFloder imageFloder = null;
168
					// 利用一个HashSet防止多次扫描同一个文件夹(不加这个判断,图片多起来还是相当恐怖的~~)
169
					if (mDirPaths.contains(dirPath)){
170
						continue;
171
					} else{
172
						mDirPaths.add(dirPath);
173
						// 初始化imageFloder
174
						imageFloder = new ImageFloder();
175
						imageFloder.setDir(dirPath);
176
						imageFloder.setFirstImagePath(path);
177
					}
178
					if(parentFile.list()==null)continue ;
179
					int picSize = parentFile.list(new FilenameFilter(){
180
						@Override
181
						public boolean accept(File dir, String filename){
182
							if (filename.endsWith(".jpg")
183
									|| filename.endsWith(".png")
184
									|| filename.endsWith(".jpeg"))
185
								return true;
186
							return false;
187
						}
188
					}).length;
189
					totalCount += picSize;
190
					imageFloder.setCount(picSize);
191
					mImageFloders.add(imageFloder);
192

193
					if (picSize > mPicsSize){
194
						mPicsSize = picSize;
195
						mImgDir = parentFile;
196
					}
197
				}
198
				mCursor.close();
199

200
				// 扫描完成,辅助的HashSet也就可以释放内存了
201
				mDirPaths = null;
202

203
				// 通知Handler扫描图片完成
204
				mHandler.sendEmptyMessage(0x110);
205

206
			}
207
		}).start();
208

209
	}
210
	private Handler mHandler = new Handler(){
211
		public void handleMessage(android.os.Message msg){
212
			mProgressDialog.dismiss();
213
			setDataView();// 为View绑定数据
214
		}
215
	};
216

217

218
	/**
219
	 * 为View绑定数据
220
	 */
221
	public void setDataView(){
222
		path=Environment.getExternalStorageDirectory() + "/"+"test/photo/";
223
		dir=new File(path); 
224
		if(!dir.exists())dir.mkdirs(); 
225
		if (mImgDir == null){
226
			Toast.makeText(getApplicationContext(), "一张图片没扫描到",Toast.LENGTH_SHORT).show();
227
			return;
228
		}
229

230
		if(mImgDir.exists()){
231
			mImgs = Arrays.asList(mImgDir.list());
232
		}
233

234
		//可以在此设置最大选择照片的数量
235
		girdItemAdapter=new GirdItemAdapter(this, mImgs, mImgDir.getAbsolutePath(),10);
236
		photoGrid.setAdapter(girdItemAdapter);
237
		girdItemAdapter.setOnPhotoSelectedListener(new OnPhotoSelectedListener() {
238
			@Override
239
			public void takePhoto() {
240
				imagename=getTimeName(System.currentTimeMillis())+".jpg";
241
				String state = Environment.getExternalStorageState();  
242
				if (state.equals(Environment.MEDIA_MOUNTED)) {  
243
					Intent intent=new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
244
					File f=new File(dir, imagename);//localTempImgDir和localTempImageFileName是自己定义的名字 
245
					Uri u=Uri.fromFile(f); 
246
					intent.putExtra(MediaStore.Images.Media.ORIENTATION, 0); 
247
					intent.putExtra(MediaStore.EXTRA_OUTPUT, u); 
248
					startActivityForResult(intent, TAKE_CAMERA_PICTURE); 
249
				} else {
250
					Toast.makeText(SelectPhotoActivity.this, "请插入SD卡",Toast.LENGTH_SHORT).show();
251
				}  
252
			}
253
			@Override
254
			public void photoClick(List<String> number) {
255
				photoBtn.setText("下一步("+number.size() + "张)");
256
			}
257
		});
258
	}
259
	/**
260
	 * 初始化展示文件夹的popupWindw
261
	 */
262
	private void initListDirPopupWindw(){
263
		if(popupWindow==null){
264
			dirview=LayoutInflater.from(SelectPhotoActivity.this).inflate(R.layout.image_select_dirlist, null);
265
			dirListView=(ListView)dirview.findViewById(R.id.id_list_dirs);
266
			popupWindow =new PopupWindow(dirview, LayoutParams.MATCH_PARENT, mScreenHeight*3/5);
267
			floderAdapter=new ImageFloderAdapter(SelectPhotoActivity.this, mImageFloders);
268
			dirListView.setAdapter(floderAdapter);
269
		}
270
		popupWindow.setFocusable(true);
271
		popupWindow.setOutsideTouchable(true);
272
		// 这个是为了点击“返回Back”也能使其消失,并且并不会影响你的背景
273
		popupWindow.setBackgroundDrawable(new BitmapDrawable());
274
		// 显示的位置为:屏幕的宽度的一半-PopupWindow的高度的一半
275
		titleIcon.setBackgroundResource(R.drawable.navigationbar_arrow_up);
276
		popupWindow.showAsDropDown(headLayout,0,0);
277
		popupWindow.setOnDismissListener(new OnDismissListener() {
278
			@Override
279
			public void onDismiss() {
280
				titleIcon.setBackgroundResource(R.drawable.navigationbar_arrow_down);
281
			}
282
		});
283
		dirListView.setOnItemClickListener(new OnItemClickListener() {
284
			@Override
285
			public void onItemClick(AdapterView<?> parent, View view,
286
					int position, long id) {
287
				titleName.setText(mImageFloders.get(position).getName());
288
				mImgDir = new File(mImageFloders.get(position).getDir());
289
				mImgs = Arrays.asList(mImgDir.list(new FilenameFilter(){
290
					@Override
291
					public boolean accept(File dir, String filename)
292
					{
293
						if (filename.endsWith(".jpg") || filename.endsWith(".png")
294
								|| filename.endsWith(".jpeg"))
295
							return true;
296
						return false;
297
					}
298
				}));
299
				for (int i = 0; i < mImageFloders.size(); i++) {
300
					mImageFloders.get(i).setSelected(false);
301
				}
302
				mImageFloders.get(position).setSelected(true);
303
				floderAdapter.changeData(mImageFloders);
304
				girdItemAdapter.changeData(mImgs, mImageFloders.get(position).getDir());
305
				if(popupWindow!=null){
306
					popupWindow.dismiss();
307
				}
308
			}
309
		});
310

311
	}
312

313
	/**
314
	 * 监听事件
315
	 */
316
	private void initEvent(){
317
		quxiaoBtn.setOnClickListener(new OnClickListener() {
318
			@Override
319
			public void onClick(View v) {
320
				// TODO Auto-generated method stub
321
				finish();
322
			}
323
		});
324
		/**
325
		 * 为底部的布局设置点击事件,弹出popupWindow
326
		 */
327
		titleName.setOnClickListener(new OnClickListener(){
328
			@Override
329
			public void onClick(View v){
330
				// 初始化展示文件夹的popupWindw
331
				initListDirPopupWindw();
332
			}
333
		});
334
		photoBtn.setOnClickListener(new OnClickListener() {
335
			@Override
336
			public void onClick(View v) {
337
				Toast.makeText(SelectPhotoActivity.this, GirdItemAdapter.mSelectedImage.toString(), Toast.LENGTH_SHORT).show();
338
			}
339
		});
340
	}
341
	public static String getTimeName(long time){
342
		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
343
		Date date = new Date(time);
344
		return formatter.format(date);
345
	}
346

347
	@Override
348
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
349
		super.onActivityResult(requestCode, resultCode, data);
350
		switch (requestCode) {
351
		case TAKE_CAMERA_PICTURE:
352
			Toast.makeText(this, path+imagename, Toast.LENGTH_SHORT).show();
353
			break;
354
		}
355
	}
356
}

+ 0 - 98
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/CommonAdapter.java

@ -1,98 +0,0 @@
1
package com.example.imageselected.photo.adapter;
2

3
import java.util.ArrayList;
4
import java.util.LinkedList;
5
import java.util.List;
6

7
import android.content.Context;
8
import android.util.Log;
9
import android.view.LayoutInflater;
10
import android.view.View;
11
import android.view.ViewGroup;
12
import android.widget.BaseAdapter;
13

14
import com.example.imageselected.R;
15

16

17
public abstract class CommonAdapter<T> extends BaseAdapter
18
{
19
	final int VIEW_TYPE = 2;
20
	final int TYPE_1 = 0;
21
	final int TYPE_2 = 1;
22
	protected LayoutInflater mInflater;
23
	protected Context mContext;
24
	protected List<T> mDatas;
25
	private String mDirPath;
26
	public CommonAdapter(Context context, List<T> mDatas)
27
	{
28
		this.mContext = context;
29
		this.mInflater = LayoutInflater.from(mContext);
30
		this.mDatas = mDatas;
31
		this.mDirPath=mDirPath;
32
	}
33
	@Override
34
	public int getCount()
35
	{
36
		return mDatas.size()+1;
37
	}
38

39
	@Override
40
	public T getItem(int position)
41
	{
42
		return mDatas.get(position);
43
	}
44

45
	@Override
46
	public long getItemId(int position)
47
	{
48
		return position;
49
	}
50

51
	@Override
52
	public View getView(int position, View convertView, ViewGroup parent)
53
	{
54
		int type = getItemViewType(position);
55
		final ViewHolder viewHolder = getViewHolder(position, convertView,
56
				parent,type);
57
		switch (type){
58
			case TYPE_1:
59
				convert(viewHolder, getItem(0),type);
60
				break;
61
			case TYPE_2:
62
				convert(viewHolder, getItem(position-1),type);
63
				break;
64
		}
65
		return viewHolder.getConvertView();
66

67
	}
68
	public int getItemViewType(int position) {
69
		if(position==0){
70
			return TYPE_1;
71
		}else{
72
			return TYPE_2;
73
		}
74
	}
75

76
	@Override
77
	public int getViewTypeCount() {
78
		return VIEW_TYPE;
79
	}
80

81
	public abstract void convert(ViewHolder helper, T item,int type);
82

83
	private ViewHolder getViewHolder(int position, View convertView,
84
			ViewGroup parent,int type)
85
	{	int mItemLayoutId= R.layout.grid_item;
86
		switch (type){
87
			case TYPE_1:
88
				mItemLayoutId= R.layout.grid_item2;
89
				break;
90
			case TYPE_2:
91
				mItemLayoutId=R.layout.grid_item;
92
				break;
93
		}
94
		return ViewHolder.get(mContext, convertView, parent,mItemLayoutId ,
95
				position);
96
	}
97

98
}

+ 0 - 116
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/GirdItemAdapter.java

@ -1,116 +0,0 @@
1
package com.example.imageselected.photo.adapter;
2

3
import java.util.ArrayList;
4
import java.util.LinkedList;
5
import java.util.List;
6

7

8
import android.annotation.SuppressLint;
9
import android.content.Context;
10
import android.graphics.Color;
11
import android.util.Log;
12
import android.view.LayoutInflater;
13
import android.view.View;
14
import android.view.ViewGroup;
15
import android.view.View.OnClickListener;
16
import android.widget.BaseAdapter;
17
import android.widget.ImageButton;
18
import android.widget.ImageView;
19
import android.widget.LinearLayout;
20
import android.widget.Toast;
21

22
import com.example.imageselected.R;
23

24

25
public class GirdItemAdapter extends CommonAdapter<String>{
26
	private String mDirPath;
27
	private  Context context;
28
	public static List<String> mSelectedImage = new LinkedList<String>();
29
	private int maxSize=5;
30
	public GirdItemAdapter(Context context, List<String> mDatas,String mDirPath,int maxSize) {
31
		super(context,mDatas);
32
		this.maxSize=maxSize;
33
		this.mDirPath=mDirPath;
34
		this.context=context;
35
	}
36
	public void changeData(List<String> mDatas,String mDirPath){
37
		this.mDatas = mDatas;
38
		this.mDirPath=mDirPath;
39
		notifyDataSetChanged();
40
	}
41

42
	@Override
43
	public void convert(ViewHolder helper, String item,int type) {
44
		switch (type) {
45
			case TYPE_1:
46
				final LinearLayout mImageView = helper.getView(R.id.id_item_image2);
47
				mImageView.setOnClickListener(new OnClickListener() {
48
					@Override
49
					public void onClick(View v) {
50
						onPhotoSelectedListener.takePhoto();
51
					}
52
				});
53
				break;
54
			case TYPE_2:
55
				final ImageView myImageView = helper.getView(R.id.id_item_image);
56
				final ImageButton myImageSelected = helper.getView(R.id.id_item_select);
57
				myImageSelected.setImageResource(R.drawable.picture_unselected);
58
				myImageView.setImageResource(R.drawable.pictures_no);
59
				myImageView.setBackgroundResource(R.drawable.pictures_no);
60
				helper.setImageByUrl(R.id.id_item_image,mDirPath + "/"+item);
61
				myImageView.setColorFilter(null);
62
				myImageView.setOnClickListener(new MyOnClickListener(helper,item));
63
				if (mSelectedImage.contains(mDirPath + "/" + item)){
64
					myImageSelected.setImageResource(R.drawable.pictures_selected);
65
					myImageView.setColorFilter(Color.parseColor("#77000000"));
66
				} else{
67
					myImageSelected.setImageResource(R.drawable.picture_unselected);
68
					myImageView.setColorFilter(Color.parseColor("#00000000"));
69
				}
70
				break;
71

72
			default:
73
				break;
74
		}
75
	}
76

77
	class MyOnClickListener implements OnClickListener{
78
		String item;
79
		ViewHolder helper;
80
		ImageView myitemImageView ;
81
		ImageButton myitemImageSelected;
82
		MyOnClickListener(ViewHolder helper,String item){
83
			this.item=item;
84
			this.helper=helper;
85
			myitemImageSelected=helper.getView(R.id.id_item_select);
86
			myitemImageView= helper.getView(R.id.id_item_image);
87
		}
88
		@Override
89
		public void onClick(View v) {
90
			if (mSelectedImage.contains(mDirPath + "/" + item)){
91
				mSelectedImage.remove(mDirPath + "/" + item);
92
				myitemImageSelected.setImageResource( R.drawable.picture_unselected);
93
				myitemImageView.setColorFilter(null);
94
			} else{
95
				if(mSelectedImage.size()>=maxSize){
96
					Toast.makeText(context, "最多上传"+maxSize+"张", Toast.LENGTH_SHORT).show();
97
					return ;
98
				}
99
				mSelectedImage.add(mDirPath + "/" + item);
100
				myitemImageSelected.setImageResource( R.drawable.pictures_selected);
101
				myitemImageView.setColorFilter(Color.parseColor("#77000000"));
102
			}
103
			onPhotoSelectedListener.photoClick(mSelectedImage);
104
		}
105

106
	}
107
	public OnPhotoSelectedListener onPhotoSelectedListener;
108
	public void setOnPhotoSelectedListener(OnPhotoSelectedListener onPhotoSelectedListener){
109
		this.onPhotoSelectedListener=onPhotoSelectedListener;
110
	}
111
	public  interface OnPhotoSelectedListener{
112
		public void photoClick(List<String> number);
113
		public void takePhoto();
114
	}
115

116
}

+ 0 - 89
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/ImageFloderAdapter.java

@ -1,89 +0,0 @@
1
package com.example.imageselected.photo.adapter;
2

3
import java.util.List;
4

5
import com.example.imageselected.R;
6
import com.example.imageselected.photo.ImageFloder;
7
import com.example.imageselected.photo.ImageLoader;
8
import com.example.imageselected.photo.ImageLoader.Type;
9

10
import android.content.Context;
11
import android.view.LayoutInflater;
12
import android.view.View;
13
import android.view.ViewGroup;
14
import android.widget.BaseAdapter;
15
import android.widget.ImageView;
16
import android.widget.RelativeLayout;
17
import android.widget.TextView;
18
/**
19
 * Ïà²áÁбíÀà
20
 * @author Administrator
21
 *
22
 */
23
public class ImageFloderAdapter extends BaseAdapter{
24
	private Context context;
25
	private List<ImageFloder> list;
26
	
27
	public ImageFloderAdapter(Context context, List<ImageFloder> list) {
28
		super();
29
		this.context = context;
30
		this.list = list;
31
	}
32

33
	public void changeData(List<ImageFloder> list){
34
		this.list=list;
35
		notifyDataSetChanged();
36
	}
37
	@Override
38
	public int getCount() {
39
		// TODO Auto-generated method stub
40
		return list.size();
41
	}
42

43
	@Override
44
	public ImageFloder getItem(int position) {
45
		// TODO Auto-generated method stub
46
		return list.get(position);
47
	}
48

49
	@Override
50
	public long getItemId(int position) {
51
		// TODO Auto-generated method stub
52
		return position;
53
	}
54

55
	@Override
56
	public View getView(int position, View convertView, ViewGroup parent) {
57
		ViewHolder holder=null;
58
		if(convertView==null){
59
			convertView=LayoutInflater.from(context).inflate(R.layout.list_dir_item, null);
60
			holder=new ViewHolder();
61
			holder.dirItemIcon=(ImageView)convertView.findViewById(R.id.id_dir_choose);
62
			holder.dirItemImage=(ImageView)convertView.findViewById(R.id.id_dir_item_image);
63
			holder.dirItemName=(TextView)convertView.findViewById(R.id.id_dir_item_name);
64
			holder.dirItemNum=(TextView)convertView.findViewById(R.id.id_dir_item_count);
65
			convertView.setTag(holder);
66
		}else{
67
			holder=(ViewHolder) convertView.getTag();
68
		}
69
		ImageLoader.getInstance(3,Type.LIFO).loadImage(list.get(position).getFirstImagePath(), holder.dirItemImage);
70
		holder.dirItemName.setText(list.get(position).getName());
71
		holder.dirItemNum.setText(list.get(position).getCount()+"ÕÅ");
72
		if(list.get(position).isSelected())
73
			holder.dirItemIcon.setVisibility(View.VISIBLE);
74
		else
75
			holder.dirItemIcon.setVisibility(View.INVISIBLE);
76
		return convertView;
77
	}
78

79
	class ViewHolder{
80
		ImageView dirItemImage;
81
		TextView dirItemName;
82
		TextView dirItemNum;
83
		ImageView dirItemIcon;
84
		RelativeLayout listdirLayout;
85
	}
86
	
87

88

89
}

+ 0 - 126
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/java/com/example/imageselected/photo/adapter/ViewHolder.java

@ -1,126 +0,0 @@
1
package com.example.imageselected.photo.adapter;
2
3
import android.content.Context;
4
import android.graphics.Bitmap;
5
import android.util.SparseArray;
6
import android.view.LayoutInflater;
7
import android.view.View;
8
import android.view.ViewGroup;
9
import android.widget.ImageView;
10
import android.widget.TextView;
11
12
import com.example.imageselected.photo.ImageLoader;
13
14
15
public class ViewHolder
16
{
17
	private final SparseArray<View> mViews;
18
	private int mPosition;
19
	private View mConvertView;
20
21
	private ViewHolder(Context context, ViewGroup parent, int layoutId,
22
			int position)
23
	{
24
		this.mPosition = position;
25
		this.mViews = new SparseArray<View>();
26
		mConvertView = LayoutInflater.from(context).inflate(layoutId, parent,
27
				false);
28
		// setTag
29
		mConvertView.setTag(this);
30
	}
31
32
	/**
33
	 * 拿到一个ViewHolder对象
34
	 * 
35
	 * @param context
36
	 * @param convertView
37
	 * @param parent
38
	 * @param layoutId
39
	 * @param position
40
	 * @return
41
	 */
42
	public static ViewHolder get(Context context, View convertView,
43
			ViewGroup parent, int layoutId, int position)
44
	{
45
		ViewHolder holder = null;
46
		if (convertView == null)
47
		{
48
			holder = new ViewHolder(context, parent, layoutId, position);
49
		} else
50
		{
51
			holder = (ViewHolder) convertView.getTag();
52
			holder.mPosition = position;
53
		}
54
		return holder;
55
	}
56
57
	public View getConvertView()
58
	{
59
		return mConvertView;
60
	}
61
62
	/**
63
	 * 通过控件的Id获取对于的控件,如果没有则加入views
64
	 * 
65
	 * @param viewId
66
	 * @return
67
	 */
68
	public <T extends View> T getView(int viewId)
69
	{
70
		View view = mViews.get(viewId);
71
		if (view == null)
72
		{
73
			view = mConvertView.findViewById(viewId);
74
			mViews.put(viewId, view);
75
		}
76
		return (T) view;
77
	}
78
79
80
81
	/**
82
	 * 为ImageView设置图片
83
	 * 
84
	 * @param viewId
85
	 * @param drawableId
86
	 * @return
87
	 */
88
	public ViewHolder setImageResource(int viewId, int drawableId)
89
	{
90
		ImageView view = getView(viewId);
91
		view.setImageResource(drawableId);
92
93
		return this;
94
	}
95
96
	/**
97
	 * 为ImageView设置图片
98
	 * 
99
	 * @param viewId
100
	 * @return
101
	 */
102
	public ViewHolder setImageBitmap(int viewId, Bitmap bm)
103
	{
104
		ImageView view = getView(viewId);
105
		view.setImageBitmap(bm);
106
		return this;
107
	}
108
109
	/**
110
	 * 为ImageView设置图片
111
	 * 
112
	 * @param viewId
113
	 * @return
114
	 */
115
	public ViewHolder setImageByUrl(int viewId, String url)
116
	{
117
		ImageLoader.getInstance(3, ImageLoader.Type.LIFO).loadImage(url, (ImageView) getView(viewId));
118
		return this;
119
	}
120
121
	public int getPosition()
122
	{
123
		return mPosition;
124
	}
125
126
}

BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-hdpi/ic_launcher.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-mdpi/ic_launcher.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph1.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph_highlighted.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/compose_photo_photograph_highlighted1.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/dir_choose.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/ic_launcher.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/navigationbar_arrow_down.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/navigationbar_arrow_up.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/pic_dir.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/picture_unselected.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/pictures_no.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xhdpi/pictures_selected.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xxhdpi/dir_choose.png


BIN
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable-xxhdpi/ic_launcher.png


+ 0 - 8
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable/photo_btn_selector.xml

@ -1,8 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3

4
    <item android:state_pressed="true" android:drawable="@drawable/compose_photo_photograph_highlighted"></item>
5
    <item android:state_pressed="false"  android:drawable="@drawable/compose_photo_photograph"></item>
6
    <item android:drawable="@drawable/compose_photo_photograph"></item>
7

8
</selector>

+ 0 - 30
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/drawable/photo_select_btn_selector.xml

@ -1,30 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3

4
    <item android:state_pressed="true" android:state_enabled="true"><shape>
5
            <corners android:radius="6dip" />
6

7
            <solid android:color="#E56311" />
8
        </shape></item>
9
    <item android:state_pressed="false" android:state_enabled="true"><shape>
10
            <corners android:radius="6dip" />
11

12
            <solid android:color="#F78A00" />
13
        </shape></item>
14
    <item><shape>
15
            <corners android:radius="6dip" />
16

17
            <solid android:color="#F78A00" />
18
        </shape></item>
19
    <item android:state_enabled="false"><shape>
20
            <corners android:radius="6dip" />
21

22
            <solid android:color="#FFFFFF" />
23
        </shape></item>
24
    <item android:state_enabled="true"><shape>
25
            <corners android:radius="6dip" />
26

27
            <solid android:color="#F78A00" />
28
        </shape></item>
29

30
</selector>

+ 0 - 16
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/activity_main.xml

@ -1,16 +0,0 @@
1
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
    xmlns:tools="http://schemas.android.com/tools"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent"
5
    android:paddingBottom="@dimen/activity_vertical_margin"
6
    android:paddingLeft="@dimen/activity_horizontal_margin"
7
    android:paddingRight="@dimen/activity_horizontal_margin"
8
    android:paddingTop="@dimen/activity_vertical_margin"
9
    tools:context="com.example.imageselected.MainActivity" >
10

11
    <TextView
12
        android:layout_width="wrap_content"
13
        android:layout_height="wrap_content"
14
        android:text="@string/hello_world" />
15

16
</RelativeLayout>

+ 0 - 25
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/grid_item.xml

@ -1,25 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="fill_parent"
4
    android:layout_height="fill_parent" >
5

6
    <ImageView
7
        android:id="@+id/id_item_image"
8
        android:layout_width="fill_parent"
9
        android:layout_height="120dp"
10
        android:background="@drawable/pictures_no"
11
        android:scaleType="centerCrop" />
12

13
    <ImageButton
14
        android:id="@+id/id_item_select"
15
        android:clickable="false"
16
        android:layout_width="wrap_content"
17
        android:layout_height="wrap_content"
18
        android:layout_alignParentRight="true"
19
        android:layout_alignParentTop="true"
20
        android:layout_marginRight="3dp"
21
        android:layout_marginTop="3dp"
22
        android:background="@null"
23
        android:src="@drawable/pictures_selected" />
24

25
</RelativeLayout>

+ 0 - 22
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/grid_item2.xml

@ -1,22 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="fill_parent"
4
    android:layout_height="fill_parent" >
5

6
    <LinearLayout
7
        android:orientation="horizontal"
8
        android:gravity="center"
9
         android:id="@+id/id_item_image2"
10
        android:layout_width="match_parent"
11
        android:layout_height="120dp" >
12

13
        <ImageView
14
            android:layout_width="wrap_content"
15
            android:layout_gravity="center"
16
            android:layout_height="wrap_content"
17
            android:background="@drawable/photo_btn_selector"
18
            android:scaleType="centerCrop" />
19

20
    </LinearLayout>
21

22
</RelativeLayout>

+ 0 - 17
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/image_select_dirlist.xml

@ -1,17 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="wrap_content"
5
    android:visibility="visible"
6
    android:background="#a0ffffff" >
7

8
    <ListView
9
        android:id="@+id/id_list_dirs"
10
        android:layout_width="fill_parent"
11
        android:layout_height="match_parent"
12
        android:divider="#EEE3D9"
13
        android:background="#a0ffffff"
14
        android:dividerHeight="1px" >
15
    </ListView>
16

17
</LinearLayout>

+ 0 - 56
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/list_dir_item.xml

@ -1,56 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="fill_parent"
4
    android:layout_height="wrap_content"
5
    android:id="@+id/list_dir_layout"
6
    android:padding="5dp" >
7

8
    <ImageView
9
        android:id="@+id/id_dir_item_image"
10
        android:layout_width="100dp"
11
        android:layout_height="100dp"
12
        android:layout_alignParentLeft="true"
13
        android:layout_centerVertical="true"
14
        android:background="@drawable/pic_dir"
15
        android:paddingBottom="17dp"
16
        android:paddingLeft="12dp"
17
        android:paddingRight="12dp"
18
        android:paddingTop="9dp"
19
        android:scaleType="fitXY"
20
        android:src="@drawable/ic_launcher" />
21

22
    <LinearLayout
23
        android:layout_width="wrap_content"
24
        android:layout_height="wrap_content"
25
        android:layout_centerVertical="true"
26
        android:layout_marginLeft="10dp"
27
        android:layout_toRightOf="@id/id_dir_item_image"
28
        android:orientation="vertical" >
29

30
        <TextView
31
            android:id="@+id/id_dir_item_name"
32
            android:layout_width="wrap_content"
33
            android:layout_height="wrap_content"
34
            android:text="所有图片"
35
            android:textSize="10sp" />
36

37
        <TextView
38
            android:id="@+id/id_dir_item_count"
39
            android:layout_width="wrap_content"
40
            android:layout_height="wrap_content"
41
            android:layout_gravity="center"
42
            android:text="4723张"
43
            android:textColor="#444"
44
            android:textSize="8sp" />
45
    </LinearLayout>
46

47
    <ImageView
48
        android:id="@+id/id_dir_choose"
49
        android:layout_width="wrap_content"
50
        android:layout_height="wrap_content"
51
        android:layout_alignParentRight="true"
52
        android:layout_centerVertical="true"
53
        android:layout_marginRight="20dp"
54
        android:src="@drawable/dir_choose" />
55

56
</RelativeLayout>

+ 0 - 52
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/photo_select_view.xml

@ -1,52 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent"
5
    android:orientation="vertical" >
6

7
    <include layout="@layout/select_photo_header" />
8

9
    <LinearLayout
10
        android:layout_width="match_parent"
11
        android:layout_height="wrap_content"
12
        android:layout_weight="1"
13
        android:orientation="vertical" >
14

15
        <GridView
16
            android:id="@+id/gird_photo_list"
17
            android:layout_width="match_parent"
18
            android:layout_height="wrap_content"
19
            android:horizontalSpacing="5dp"
20
            android:verticalSpacing="5dp"
21
            android:numColumns="3" >
22
        </GridView>
23
    </LinearLayout>
24

25
    <TextView
26
        android:id="@+id/textView4"
27
        android:layout_width="match_parent"
28
        android:layout_height="0.5dip"
29
        android:background="@color/gray"
30
        android:text="TextView" />
31

32
    <LinearLayout
33
        android:layout_width="match_parent"
34
        android:layout_gravity="center_vertical"
35
        android:gravity="right"
36
        android:layout_height="50dp" >
37

38
        <Button
39
            android:id="@+id/selected_photo_btn"
40
            android:layout_width="wrap_content"
41
            android:layout_height="35dp"
42
            android:paddingLeft="10dp"
43
            android:paddingRight="10dp"
44
            android:textSize="12sp"
45
            android:layout_gravity="center_vertical"
46
            android:layout_marginRight="10dp"
47
            android:textColor="@color/white"
48
            android:background="@drawable/photo_select_btn_selector"
49
            android:text="下一步" />
50
    </LinearLayout>
51

52
</LinearLayout>

+ 0 - 76
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/layout/select_photo_header.xml

@ -1,76 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:id="@+id/selected_photo_header_layout"
4
    android:layout_width="match_parent"
5
    android:layout_height="wrap_content"
6
    android:orientation="vertical"
7
    android:visibility="visible" >
8

9

10
    <LinearLayout
11
        android:id="@+id/header_layout"
12
        android:layout_width="match_parent"
13
        android:layout_height="wrap_content"
14
        android:background="@color/white"
15
        android:orientation="vertical" >
16

17
        <LinearLayout
18
            android:layout_width="match_parent"
19
            android:layout_height="45dp" >
20

21
            <TextView
22
                android:id="@+id/quxiao_btn"
23
                android:layout_width="wrap_content"
24
                android:layout_height="wrap_content"
25
                android:layout_gravity="center"
26
                android:layout_marginLeft="5dp"
27
                android:gravity="center"
28
                android:text=""
29
                android:textColor="@color/orange_text" />
30

31
            <LinearLayout
32
                android:layout_width="0dp"
33
                android:layout_height="match_parent"
34
                android:layout_gravity="center"
35
                android:layout_weight="1"
36
                android:gravity="center" >
37

38
                <TextView
39
                    android:id="@+id/selected_photo_name_text"
40
                    android:layout_width="wrap_content"
41
                    android:layout_height="match_parent"
42
                    android:layout_marginRight="5dp"
43
                    android:ellipsize="end"
44
                    android:gravity="center"
45
                    android:singleLine="true"
46
                    android:text="相机胶卷"
47
                    android:textSize="16sp" />
48

49
                <ImageView
50
                    android:id="@+id/selected_photo_icon"
51
                    android:layout_width="wrap_content"
52
                    android:layout_height="wrap_content"
53
                    android:layout_gravity="center"
54
                    android:gravity="center" />
55
            </LinearLayout>
56

57
            <TextView
58
                android:id="@+id/textView3"
59
                android:layout_width="wrap_content"
60
                android:layout_height="wrap_content"
61
                android:layout_gravity="center"
62
                android:layout_marginRight="5dp"
63
                android:gravity="center"
64
                android:text="确定"
65
                android:visibility="invisible" />
66
        </LinearLayout>
67

68
        <TextView
69
            android:id="@+id/textView4"
70
            android:layout_width="match_parent"
71
            android:layout_height="0.5dip"
72
            android:background="@color/gray"
73
            android:text="TextView" />
74
    </LinearLayout>
75

76
</RelativeLayout>

+ 0 - 12
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/menu/main.xml

@ -1,12 +0,0 @@
1
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2
    xmlns:app="http://schemas.android.com/apk/res-auto"
3
    xmlns:tools="http://schemas.android.com/tools"
4
    tools:context="com.example.imageselected.MainActivity" >
5

6
    <item
7
        android:id="@+id/action_settings"
8
        android:orderInCategory="100"
9
        android:title="@string/action_settings"
10
        app:showAsAction="never"/>
11

12
</menu>

+ 0 - 11
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values-v11/styles.xml

@ -1,11 +0,0 @@
1
<resources>
2

3
    <!--
4
        Base application theme for API 11+. This theme completely replaces
5
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
6
    -->
7
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
8
        <!-- API 11 theme customizations can go here. -->
9
    </style>
10

11
</resources>

+ 0 - 12
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values-v14/styles.xml

@ -1,12 +0,0 @@
1
<resources>
2

3
    <!--
4
        Base application theme for API 14+. This theme completely replaces
5
        AppBaseTheme from BOTH res/values/styles.xml and
6
        res/values-v11/styles.xml on API 14+ devices.
7
    -->
8
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
9
        <!-- API 14 theme customizations can go here. -->
10
    </style>
11

12
</resources>

+ 0 - 10
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values-w820dp/dimens.xml

@ -1,10 +0,0 @@
1
<resources>
2

3
    <!--
4
         Example customization of dimensions originally defined in res/values/dimens.xml
5
         (such as screen margins) for screens with more than 820dp of available width. This
6
         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
7
    -->
8
    <dimen name="activity_horizontal_margin">64dp</dimen>
9

10
</resources>

+ 0 - 27
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/colors.xml

@ -1,27 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<resources>
3
   <color name="gray">#AFAFAF</color>
4
    <color name="orange">#CC6600</color>
5
    <color name="pink">#FFE6E6</color>
6
    <color name="yellow">#F99503</color>
7
    <color name="blue">#00AED6</color>
8
    <color name="white">#FFFFFF</color>
9
    <color name="red">#D80000</color>
10
    <color name="black">#000000</color>
11
    
12
    
13
     <color name="common_orange_color">#ff601e</color>
14
    <color name="common_orange_pressed_color">#ea4500</color>
15
    <color name="common_white_color">#ffffff</color>
16
17
    <color name="common_dark_grey_text_color">#7c7c7c</color>
18
    <color name="common_light_grey_text_color">#969696</color>
19
    <color name="btn_gray_normal">#c0c0c0</color>
20
    <color name="orange_text">#F78A00</color>
21
    
22
    
23
    <!-- actiondialog-->
24
    <color name="ui_action_dialog_gray">#e0e6e6e6</color>
25
    <color name="ui_action_dialog_color">#e0ffffff</color>
26
    <color name="ui_action_dialog_textviewcolor">#0048fc</color>
27
</resources>

+ 0 - 7
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/dimens.xml

@ -1,7 +0,0 @@
1
<resources>
2

3
    <!-- Default screen margins, per the Android Design guidelines. -->
4
    <dimen name="activity_horizontal_margin">16dp</dimen>
5
    <dimen name="activity_vertical_margin">16dp</dimen>
6

7
</resources>

+ 0 - 8
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/strings.xml

@ -1,8 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<resources>
3

4
    <string name="app_name">ImageSelected</string>
5
    <string name="hello_world">Hello world!</string>
6
    <string name="action_settings">Settings</string>
7

8
</resources>

+ 0 - 8
app/src/main/res/drawable-xhdpi/╥бн╒пем╪ф╛╡╩╢Мбр/ImageSelected1/app/src/main/res/values/styles.xml

@ -1,8 +0,0 @@
1
<resources>
2

3
    <!-- Base application theme. -->
4
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5
        <!-- Customize your theme here. -->
6
    </style>
7

8
</resources>