a.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>

首页气泡弹窗,聊聊入口隐藏 · 1354e6e3de - Gogs: Go Git Service
Browse Source

首页气泡弹窗,聊聊入口隐藏

huyuguo 6 years ago
parent
commit
1354e6e3de

+ 46 - 46
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

@ -1241,7 +1241,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1241 1241
        windowLabelPublic = findViewById(R.id.iv_label_public);
1242 1242
        windowLabelGround = findViewById(R.id.iv_label_ground);
1243 1243
        windowLabelFreePark = findViewById(R.id.iv_label_free_park);
1244
        windowChat = findViewById(R.id.iv_chat);
1244
//        windowChat = findViewById(R.id.iv_chat);
1245 1245
1246 1246
        windowGo = (RelativeLayout) findViewById(R.id.window_rl_go);
1247 1247
        windowZhanDetails = (RelativeLayout) findViewById(R.id.window_rl_zhan_details);
@ -1336,51 +1336,51 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1336 1336
            }
1337 1337
        });
1338 1338
1339
        // add by hyg 点击跳转到聊聊
1340
        windowChat.setOnClickListener(new View.OnClickListener() {
1341
            @Override
1342
            public void onClick(View view) {
1343
                if (socket != null) {
1344
                    try {
1345
                        socket.close();
1346
                    } catch (IOException e) {
1347
                        e.printStackTrace();
1348
                    }
1349
                }
1350
                MobclickAgent.onEvent(getApplicationContext(), "1121");
1351
                Intent i = new Intent(getApplication(), ChatActivity.class);//聊聊页面
1352
                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1353
                startActivity(i);
1354
                overridePendingTransition(0, 0);
1355
                if (count == 1) {
1356
1357
                    count = 2;
1358
                }
1359
                MobclickAgent.onEvent(getApplicationContext(), "0999");
1360
                windowLayout.setVisibility(View.GONE);
1361
1362
1363
                rl_control.setVisibility(View.VISIBLE);
1364
                if (nMarker != null) {
1365
                    nMarker.hideInfoWindow();
1366
                    MarkerOptions markerOptionss = new MarkerOptions();
1367
                    if (current_chargePoint.getOwn_pay().equals("1")) {
1368
                        nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker1));
1369
                    } else {
1370
                        if (current_chargePoint.getSuit_car().equals("特斯拉")) {
1371
                            nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1372
                        } else {
1373
                            if (WelcomeActivity.canCost.contains(current_chargePoint.getSupplier())) {
1374
                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker2));
1375
                            } else {
1376
                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1377
                            }
1378
                        }
1379
                    }
1380
                }
1381
1382
            }
1383
        });
1339
        // add by hyg 点击跳转到聊聊 隐藏该功能
1340
//        windowChat.setOnClickListener(new View.OnClickListener() {
1341
//            @Override
1342
//            public void onClick(View view) {
1343
//                if (socket != null) {
1344
//                    try {
1345
//                        socket.close();
1346
//                    } catch (IOException e) {
1347
//                        e.printStackTrace();
1348
//                    }
1349
//                }
1350
//                MobclickAgent.onEvent(getApplicationContext(), "1121");
1351
//                Intent i = new Intent(getApplication(), ChatActivity.class);//聊聊页面
1352
//                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1353
//                startActivity(i);
1354
//                overridePendingTransition(0, 0);
1355
//                if (count == 1) {
1356
//
1357
//                    count = 2;
1358
//                }
1359
//                MobclickAgent.onEvent(getApplicationContext(), "0999");
1360
//                windowLayout.setVisibility(View.GONE);
1361
//
1362
//
1363
//                rl_control.setVisibility(View.VISIBLE);
1364
//                if (nMarker != null) {
1365
//                    nMarker.hideInfoWindow();
1366
//                    MarkerOptions markerOptionss = new MarkerOptions();
1367
//                    if (current_chargePoint.getOwn_pay().equals("1")) {
1368
//                        nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker1));
1369
//                    } else {
1370
//                        if (current_chargePoint.getSuit_car().equals("特斯拉")) {
1371
//                            nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1372
//                        } else {
1373
//                            if (WelcomeActivity.canCost.contains(current_chargePoint.getSupplier())) {
1374
//                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker2));
1375
//                            } else {
1376
//                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1377
//                            }
1378
//                        }
1379
//                    }
1380
//                }
1381
//
1382
//            }
1383
//        });
1384 1384
1385 1385
1386 1386
        tv_sortDistance = (TextView) findViewById(R.id.tv_sortDistance);

+ 6 - 3
app/src/main/res/layout/activity_main_map.xml

@ -960,10 +960,14 @@
960 960
            android:layout_height="wrap_content"
961 961
            android:orientation="vertical"
962 962
            tools:visibility="visible">
963
964 963
            <View
965 964
                android:layout_width="match_parent"
966 965
                android:layout_height="0.5dp"
966
                android:background="#dddddd"/>
967
968
            <!--<View
969
                android:layout_width="match_parent"
970
                android:layout_height="0.5dp"
967 971
                android:background="#DCF4E3" />
968 972
969 973
            <android.support.constraint.ConstraintLayout
@ -991,11 +995,10 @@
991 995
                    app:layout_constraintRight_toRightOf="parent"
992 996
                    app:layout_constraintTop_toTopOf="parent" />
993 997
            </android.support.constraint.ConstraintLayout>
994
995 998
            <View
996 999
                android:layout_width="match_parent"
997 1000
                android:layout_height="0.5dp"
998
                android:background="#DCF4E3" />
1001
                android:background="#DCF4E3" />-->
999 1002
1000 1003
            <RelativeLayout
1001 1004
                android:layout_width="wrap_content"