@@ -1,7 +1,6 @@ |
||
| 1 | 1 |
package ai.pai.client.views; |
| 2 | 2 |
|
| 3 | 3 |
import android.app.Activity; |
| 4 |
-import android.content.Context; |
|
| 5 | 4 |
import android.text.TextUtils; |
| 6 | 5 |
import android.view.LayoutInflater; |
| 7 | 6 |
import android.view.View; |
@@ -22,7 +21,7 @@ public class GatherInfoPopup extends BasePopupWindow {
|
||
| 22 | 21 |
private View popupView; |
| 23 | 22 |
private ImageView gatherMap; |
| 24 | 23 |
private TextView gatherInfoText; |
| 25 |
- private Context context; |
|
| 24 |
+ private Activity context; |
|
| 26 | 25 |
|
| 27 | 26 |
|
| 28 | 27 |
public GatherInfoPopup(Activity context) {
|
@@ -50,9 +49,23 @@ public class GatherInfoPopup extends BasePopupWindow {
|
||
| 50 | 49 |
} |
| 51 | 50 |
|
| 52 | 51 |
private void init(){
|
| 53 |
- gatherInfoText.setText(context.getString(R.string.gather_info, TimeUtils.getGatherTimeStr(Preferences.getInstance(context).getGatherTime()),Preferences.getInstance(context).getTourGatherLocation())); |
|
| 52 |
+ String time = TimeUtils.getGatherTimeStr(Preferences.getInstance(context).getGatherTime()); |
|
| 53 |
+ if(time.length()==0){
|
|
| 54 |
+ time = context.getString(R.string.gather_no_time); |
|
| 55 |
+ } |
|
| 56 |
+ String location = Preferences.getInstance(context).getTourGatherLocation(); |
|
| 57 |
+ if(location.length()==0){
|
|
| 58 |
+ location = context.getString(R.string.gather_no_location); |
|
| 59 |
+ } |
|
| 60 |
+ gatherInfoText.setText(context.getString(R.string.gather_info,time ,location)); |
|
| 54 | 61 |
if(!TextUtils.isEmpty(Preferences.getInstance(context).getGatherMap())){
|
| 55 | 62 |
PhotoLoader.getInstance(context).displayImage(Preferences.getInstance(context).getGatherMap(),gatherMap); |
| 63 |
+ gatherMap.setOnClickListener(new View.OnClickListener(){
|
|
| 64 |
+ @Override |
|
| 65 |
+ public void onClick(View v) {
|
|
| 66 |
+ new FullScreenImgPopup(context,Preferences.getInstance(context).getGatherMap()).showPopupWindow(); |
|
| 67 |
+ } |
|
| 68 |
+ }); |
|
| 56 | 69 |
}else{
|
| 57 | 70 |
gatherMap.setVisibility(View.GONE); |
| 58 | 71 |
} |
@@ -22,6 +22,7 @@ |
||
| 22 | 22 |
android:layout_width="45dp" |
| 23 | 23 |
android:layout_height="45dp" |
| 24 | 24 |
android:src="@drawable/pop_back" |
| 25 |
+ android:layout_marginTop="10dp" |
|
| 25 | 26 |
android:padding="5dp"/> |
| 26 | 27 |
|
| 27 | 28 |
<RelativeLayout |
@@ -36,8 +37,6 @@ |
||
| 36 | 37 |
|
| 37 | 38 |
</RelativeLayout> |
| 38 | 39 |
|
| 39 |
- |
|
| 40 |
- |
|
| 41 | 40 |
</LinearLayout> |
| 42 | 41 |
|
| 43 | 42 |
</RelativeLayout> |
@@ -20,14 +20,27 @@ |
||
| 20 | 20 |
android:background="@color/pop_bg_color" |
| 21 | 21 |
android:orientation="vertical"> |
| 22 | 22 |
|
| 23 |
+ <TextView |
|
| 24 |
+ android:layout_width="wrap_content" |
|
| 25 |
+ android:layout_height="wrap_content" |
|
| 26 |
+ android:textColor="@color/dark_grey" |
|
| 27 |
+ android:layout_marginTop="4dp" |
|
| 28 |
+ android:text="@string/gather_title" |
|
| 29 |
+ android:textSize="20sp" /> |
|
| 23 | 30 |
|
| 31 |
+ <View |
|
| 32 |
+ android:layout_width="match_parent" |
|
| 33 |
+ android:layout_height="1px" |
|
| 34 |
+ android:layout_margin="8dp" |
|
| 35 |
+ android:background="@color/line_bg"/> |
|
| 24 | 36 |
|
| 25 | 37 |
<TextView |
| 26 | 38 |
android:id="@+id/tv_gather_info" |
| 27 | 39 |
android:layout_width="wrap_content" |
| 28 | 40 |
android:layout_height="wrap_content" |
| 29 |
- android:textColor="@color/dark_grey" |
|
| 30 |
- android:layout_marginTop="4dp" |
|
| 41 |
+ android:layout_marginLeft="8dp" |
|
| 42 |
+ android:layout_marginRight="8dp" |
|
| 43 |
+ android:textColor="@color/grey" |
|
| 31 | 44 |
android:textSize="16sp" /> |
| 32 | 45 |
|
| 33 | 46 |
|
@@ -247,6 +247,12 @@ |
||
| 247 | 247 |
|
| 248 | 248 |
<string name="gather_info">请%1$s前到%2$s集合</string> |
| 249 | 249 |
|
| 250 |
+ <string name="gather_no_time">导游指定时间</string> |
|
| 251 |
+ |
|
| 252 |
+ <string name="gather_no_location">指定地点</string> |
|
| 253 |
+ |
|
| 254 |
+ <string name="gather_title">集合信息</string> |
|
| 255 |
+ |
|
| 250 | 256 |
<string name="group_photo_not_null">该群里已有照片,无法删除</string> |
| 251 | 257 |
|
| 252 | 258 |
<string name="group_admin_not_me">您不是该群的管理员,无法删除</string> |