第N+1次提交
This commit is contained in:
581
app/src/main/java/com/hbl/lewan/custom/CustomDatePickerNew1.java
Normal file
581
app/src/main/java/com/hbl/lewan/custom/CustomDatePickerNew1.java
Normal file
@@ -0,0 +1,581 @@
|
||||
package com.hbl.lewan.custom;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.utils.DataUtils;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.CustomDatePicker;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.DateFormatUtils;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.PickerView;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
public class CustomDatePickerNew1 implements View.OnClickListener, PickerView.OnSelectListener {
|
||||
private Context mContext;
|
||||
private CustomDatePicker.Callback mCallback;
|
||||
private Calendar mBeginTime;
|
||||
private Calendar mEndTime;
|
||||
private Calendar mSelectedTime;
|
||||
private boolean mCanDialogShow;
|
||||
private Dialog mPickerDialog;
|
||||
private PickerView mDpvYear;
|
||||
private PickerView mDpvMonth;
|
||||
private PickerView mDpvDay;
|
||||
private PickerView mDpvHour;
|
||||
private PickerView mDpvMinute;
|
||||
private TextView mTvHourUnit;
|
||||
private TextView mTvMinuteUnit;
|
||||
private int mBeginYear;
|
||||
private int mBeginMonth;
|
||||
private int mBeginDay;
|
||||
private int mBeginHour;
|
||||
private int mBeginMinute;
|
||||
private int mEndYear;
|
||||
private int mEndMonth;
|
||||
private int mEndDay;
|
||||
private int mEndHour;
|
||||
private int mEndMinute;
|
||||
private List<String> mYearUnits;
|
||||
private List<String> mMonthUnits;
|
||||
private List<String> mDayUnits;
|
||||
private List<String> mHourUnits;
|
||||
private List<String> mMinuteUnits;
|
||||
private DecimalFormat mDecimalFormat;
|
||||
private boolean mCanShowPreciseTime;
|
||||
private int mScrollUnits;
|
||||
private static final int SCROLL_UNIT_HOUR = 1;
|
||||
private static final int SCROLL_UNIT_MINUTE = 2;
|
||||
private static final int MAX_MINUTE_UNIT = 59;
|
||||
private static final int MAX_HOUR_UNIT = 23;
|
||||
private static final int MAX_MONTH_UNIT = 12;
|
||||
private static final long LINKAGE_DELAY_DEFAULT = 100L;
|
||||
private ImageView ivCloseKey;
|
||||
// private TextView datasTv;
|
||||
// private ImageView editIv;
|
||||
private LinearLayout bottpmLy;
|
||||
private String riqi;
|
||||
|
||||
public CustomDatePickerNew1(Context context, CustomDatePicker.Callback callback, String beginDateStr, String endDateStr, String riqi) {
|
||||
this(context, callback, DateFormatUtils.str2Long(beginDateStr, true), DateFormatUtils.str2Long(endDateStr, true),riqi);
|
||||
}
|
||||
|
||||
public CustomDatePickerNew1(Context context, CustomDatePicker.Callback callback, long beginTimestamp, long endTimestamp, String riqi) {
|
||||
this.mYearUnits = new ArrayList();
|
||||
this.mMonthUnits = new ArrayList();
|
||||
this.mDayUnits = new ArrayList();
|
||||
this.mHourUnits = new ArrayList();
|
||||
this.mMinuteUnits = new ArrayList();
|
||||
this.riqi = riqi;
|
||||
|
||||
this.mDecimalFormat = new DecimalFormat("00");
|
||||
this.mScrollUnits = 3;
|
||||
if (context != null && callback != null && beginTimestamp < endTimestamp) {
|
||||
this.mContext = context;
|
||||
this.mCallback = callback;
|
||||
this.mBeginTime = Calendar.getInstance();
|
||||
this.mBeginTime.setTimeInMillis(beginTimestamp);
|
||||
this.mEndTime = Calendar.getInstance();
|
||||
this.mEndTime.setTimeInMillis(endTimestamp);
|
||||
this.mSelectedTime = Calendar.getInstance();
|
||||
this.initView();
|
||||
this.initData();
|
||||
this.mCanDialogShow = true;
|
||||
} else {
|
||||
this.mCanDialogShow = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.mPickerDialog = new Dialog(this.mContext, R.style.date_picker_dialog);
|
||||
this.mPickerDialog.requestWindowFeature(1);
|
||||
this.mPickerDialog.setContentView(R.layout.dialog_date_picker1);
|
||||
Window window = this.mPickerDialog.getWindow();
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.gravity = Gravity.BOTTOM;
|
||||
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(lp);
|
||||
}
|
||||
|
||||
// this.mPickerDialog.findViewById(R.id.tv_cancel).setOnClickListener(this);
|
||||
this.mPickerDialog.findViewById(R.id.tv_confirm).setOnClickListener(this);
|
||||
this.mTvHourUnit = (TextView)this.mPickerDialog.findViewById(R.id.tv_hour_unit);
|
||||
this.mTvMinuteUnit = (TextView)this.mPickerDialog.findViewById(R.id.tv_minute_unit);
|
||||
this.mDpvYear = (PickerView)this.mPickerDialog.findViewById(R.id.dpv_year);
|
||||
this.mDpvYear.setOnSelectListener(this);
|
||||
this.mDpvMonth = (PickerView)this.mPickerDialog.findViewById(R.id.dpv_month);
|
||||
this.mDpvMonth.setOnSelectListener(this);
|
||||
this.mDpvDay = (PickerView)this.mPickerDialog.findViewById(R.id.dpv_day);
|
||||
this.mDpvDay.setOnSelectListener(this);
|
||||
this.mDpvHour = (PickerView)this.mPickerDialog.findViewById(R.id.dpv_hour);
|
||||
this.mDpvHour.setOnSelectListener(this);
|
||||
this.mDpvMinute = (PickerView)this.mPickerDialog.findViewById(R.id.dpv_minute);
|
||||
this.mDpvMinute.setOnSelectListener(this);
|
||||
|
||||
|
||||
this.ivCloseKey = (ImageView) this.mPickerDialog.findViewById(R.id.iv_close_key);
|
||||
// this.datasTv = (TextView) this.mPickerDialog.findViewById(R.id.datas_tv);
|
||||
// this.editIv = (ImageView) this.mPickerDialog.findViewById(R.id.edit_iv);
|
||||
this.bottpmLy = (LinearLayout) this.mPickerDialog.findViewById(R.id.bottpm_ly);
|
||||
this.ivCloseKey.setOnClickListener(this);
|
||||
// this.editIv.setOnClickListener(v -> showBottom());
|
||||
// this.datasTv.setOnClickListener(v -> showBottom());
|
||||
//格式化日期
|
||||
// if(TextUtils.isEmpty(riqi)){
|
||||
// this.datasTv.setText(R.string.zwszsr_txt);
|
||||
// }else {
|
||||
// Long time = DataUtils.dateToStampNew(riqi);
|
||||
// this.datasTv.setText(DataUtils.getCurrentTimeTypeNoline1(datasTv.getContext(), time));
|
||||
// }
|
||||
}
|
||||
|
||||
// private void showBottom() {
|
||||
// if(this.bottpmLy.getVisibility() == View.GONE){
|
||||
// this.bottpmLy.setVisibility(View.VISIBLE);
|
||||
//// this.editIv.setVisibility(View.GONE);
|
||||
// }
|
||||
// }
|
||||
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id != R.id.tv_cancel && id!=R.id.iv_close_key && id == R.id.tv_confirm && this.mCallback != null) {
|
||||
this.mCallback.onTimeSelected(this.mSelectedTime.getTimeInMillis());
|
||||
}
|
||||
|
||||
if (this.mPickerDialog != null && this.mPickerDialog.isShowing()) {
|
||||
this.mPickerDialog.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onSelect(View view, String selected) {
|
||||
if (view != null && !TextUtils.isEmpty(selected)) {
|
||||
int timeUnit;
|
||||
try {
|
||||
timeUnit = Integer.parseInt(selected);
|
||||
} catch (Throwable var6) {
|
||||
return;
|
||||
}
|
||||
|
||||
int id = view.getId();
|
||||
if (id == R.id.dpv_year) {
|
||||
this.mSelectedTime.set(1, timeUnit);
|
||||
this.linkageMonthUnit(true, 100L);
|
||||
} else if (id == R.id.dpv_month) {
|
||||
int lastSelectedMonth = this.mSelectedTime.get(2) + 1;
|
||||
this.mSelectedTime.add(2, timeUnit - lastSelectedMonth);
|
||||
this.linkageDayUnit(true, 100L);
|
||||
} else if (id == R.id.dpv_day) {
|
||||
this.mSelectedTime.set(5, timeUnit);
|
||||
this.linkageHourUnit(true, 100L);
|
||||
} else if (id == R.id.dpv_hour) {
|
||||
this.mSelectedTime.set(11, timeUnit);
|
||||
this.linkageMinuteUnit(true);
|
||||
} else if (id == R.id.dpv_minute) {
|
||||
this.mSelectedTime.set(12, timeUnit);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
this.mSelectedTime.setTimeInMillis(this.mBeginTime.getTimeInMillis());
|
||||
this.mBeginYear = this.mBeginTime.get(1);
|
||||
this.mBeginMonth = this.mBeginTime.get(2) + 1;
|
||||
this.mBeginDay = this.mBeginTime.get(5);
|
||||
this.mBeginHour = this.mBeginTime.get(11);
|
||||
this.mBeginMinute = this.mBeginTime.get(12);
|
||||
this.mEndYear = this.mEndTime.get(1);
|
||||
this.mEndMonth = this.mEndTime.get(2) + 1;
|
||||
this.mEndDay = this.mEndTime.get(5);
|
||||
this.mEndHour = this.mEndTime.get(11);
|
||||
this.mEndMinute = this.mEndTime.get(12);
|
||||
boolean canSpanYear = this.mBeginYear != this.mEndYear;
|
||||
boolean canSpanMon = !canSpanYear && this.mBeginMonth != this.mEndMonth;
|
||||
boolean canSpanDay = !canSpanMon && this.mBeginDay != this.mEndDay;
|
||||
boolean canSpanHour = !canSpanDay && this.mBeginHour != this.mEndHour;
|
||||
boolean canSpanMinute = !canSpanHour && this.mBeginMinute != this.mEndMinute;
|
||||
if (canSpanYear) {
|
||||
this.initDateUnits(12, this.mBeginTime.getActualMaximum(5), 23, 59);
|
||||
} else if (canSpanMon) {
|
||||
this.initDateUnits(this.mEndMonth, this.mBeginTime.getActualMaximum(5), 23, 59);
|
||||
} else if (canSpanDay) {
|
||||
this.initDateUnits(this.mEndMonth, this.mEndDay, 23, 59);
|
||||
} else if (canSpanHour) {
|
||||
this.initDateUnits(this.mEndMonth, this.mEndDay, this.mEndHour, 59);
|
||||
} else if (canSpanMinute) {
|
||||
this.initDateUnits(this.mEndMonth, this.mEndDay, this.mEndHour, this.mEndMinute);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initDateUnits(int endMonth, int endDay, int endHour, int endMinute) {
|
||||
int i;
|
||||
for(i = this.mBeginYear; i <= this.mEndYear; ++i) {
|
||||
this.mYearUnits.add(String.valueOf(i));
|
||||
}
|
||||
|
||||
for(i = this.mBeginMonth; i <= endMonth; ++i) {
|
||||
this.mMonthUnits.add(this.mDecimalFormat.format((long)i));
|
||||
}
|
||||
|
||||
for(i = this.mBeginDay; i <= endDay; ++i) {
|
||||
this.mDayUnits.add(this.mDecimalFormat.format((long)i));
|
||||
}
|
||||
|
||||
if ((this.mScrollUnits & 1) != 1) {
|
||||
this.mHourUnits.add(this.mDecimalFormat.format((long)this.mBeginHour));
|
||||
} else {
|
||||
for(i = this.mBeginHour; i <= endHour; ++i) {
|
||||
this.mHourUnits.add(this.mDecimalFormat.format((long)i));
|
||||
}
|
||||
}
|
||||
|
||||
if ((this.mScrollUnits & 2) != 2) {
|
||||
this.mMinuteUnits.add(this.mDecimalFormat.format((long)this.mBeginMinute));
|
||||
} else {
|
||||
for(i = this.mBeginMinute; i <= endMinute; ++i) {
|
||||
this.mMinuteUnits.add(this.mDecimalFormat.format((long)i));
|
||||
}
|
||||
}
|
||||
|
||||
this.mDpvYear.setDataList(this.mYearUnits);
|
||||
this.mDpvYear.setSelected(0);
|
||||
this.mDpvMonth.setDataList(this.mMonthUnits);
|
||||
this.mDpvMonth.setSelected(0);
|
||||
this.mDpvDay.setDataList(this.mDayUnits);
|
||||
this.mDpvDay.setSelected(0);
|
||||
this.mDpvHour.setDataList(this.mHourUnits);
|
||||
this.mDpvHour.setSelected(0);
|
||||
this.mDpvMinute.setDataList(this.mMinuteUnits);
|
||||
this.mDpvMinute.setSelected(0);
|
||||
this.setCanScroll();
|
||||
}
|
||||
|
||||
private void setCanScroll() {
|
||||
this.mDpvYear.setCanScroll(this.mYearUnits.size() > 1);
|
||||
this.mDpvMonth.setCanScroll(this.mMonthUnits.size() > 1);
|
||||
this.mDpvDay.setCanScroll(this.mDayUnits.size() > 1);
|
||||
this.mDpvHour.setCanScroll(this.mHourUnits.size() > 1 && (this.mScrollUnits & 1) == 1);
|
||||
this.mDpvMinute.setCanScroll(this.mMinuteUnits.size() > 1 && (this.mScrollUnits & 2) == 2);
|
||||
}
|
||||
|
||||
private void linkageMonthUnit(final boolean showAnim, final long delay) {
|
||||
int selectedYear = this.mSelectedTime.get(1);
|
||||
int minMonth;
|
||||
int maxMonth;
|
||||
if (this.mBeginYear == this.mEndYear) {
|
||||
minMonth = this.mBeginMonth;
|
||||
maxMonth = this.mEndMonth;
|
||||
} else if (selectedYear == this.mBeginYear) {
|
||||
minMonth = this.mBeginMonth;
|
||||
maxMonth = 12;
|
||||
} else if (selectedYear == this.mEndYear) {
|
||||
minMonth = 1;
|
||||
maxMonth = this.mEndMonth;
|
||||
} else {
|
||||
minMonth = 1;
|
||||
maxMonth = 12;
|
||||
}
|
||||
|
||||
this.mMonthUnits.clear();
|
||||
|
||||
int selectedMonth;
|
||||
for(selectedMonth = minMonth; selectedMonth <= maxMonth; ++selectedMonth) {
|
||||
this.mMonthUnits.add(this.mDecimalFormat.format((long)selectedMonth));
|
||||
}
|
||||
|
||||
this.mDpvMonth.setDataList(this.mMonthUnits);
|
||||
selectedMonth = this.getValueInRange(this.mSelectedTime.get(2) + 1, minMonth, maxMonth);
|
||||
this.mSelectedTime.set(2, selectedMonth - 1);
|
||||
this.mDpvMonth.setSelected(selectedMonth - minMonth);
|
||||
if (showAnim) {
|
||||
this.mDpvMonth.startAnim();
|
||||
}
|
||||
|
||||
this.mDpvMonth.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
CustomDatePickerNew1.this.linkageDayUnit(showAnim, delay);
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
private void linkageDayUnit(final boolean showAnim, final long delay) {
|
||||
int selectedYear = this.mSelectedTime.get(1);
|
||||
int selectedMonth = this.mSelectedTime.get(2) + 1;
|
||||
int minDay;
|
||||
int maxDay;
|
||||
if (this.mBeginYear == this.mEndYear && this.mBeginMonth == this.mEndMonth) {
|
||||
minDay = this.mBeginDay;
|
||||
maxDay = this.mEndDay;
|
||||
} else if (selectedYear == this.mBeginYear && selectedMonth == this.mBeginMonth) {
|
||||
minDay = this.mBeginDay;
|
||||
maxDay = this.mSelectedTime.getActualMaximum(5);
|
||||
} else if (selectedYear == this.mEndYear && selectedMonth == this.mEndMonth) {
|
||||
minDay = 1;
|
||||
maxDay = this.mEndDay;
|
||||
} else {
|
||||
minDay = 1;
|
||||
maxDay = this.mSelectedTime.getActualMaximum(5);
|
||||
}
|
||||
|
||||
this.mDayUnits.clear();
|
||||
|
||||
int selectedDay;
|
||||
for(selectedDay = minDay; selectedDay <= maxDay; ++selectedDay) {
|
||||
this.mDayUnits.add(this.mDecimalFormat.format((long)selectedDay));
|
||||
}
|
||||
|
||||
this.mDpvDay.setDataList(this.mDayUnits);
|
||||
selectedDay = this.getValueInRange(this.mSelectedTime.get(5), minDay, maxDay);
|
||||
this.mSelectedTime.set(5, selectedDay);
|
||||
this.mDpvDay.setSelected(selectedDay - minDay);
|
||||
if (showAnim) {
|
||||
this.mDpvDay.startAnim();
|
||||
}
|
||||
|
||||
this.mDpvDay.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
CustomDatePickerNew1.this.linkageHourUnit(showAnim, delay);
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
private void linkageHourUnit(final boolean showAnim, long delay) {
|
||||
if ((this.mScrollUnits & 1) == 1) {
|
||||
int selectedYear = this.mSelectedTime.get(1);
|
||||
int selectedMonth = this.mSelectedTime.get(2) + 1;
|
||||
int selectedDay = this.mSelectedTime.get(5);
|
||||
int minHour;
|
||||
int maxHour;
|
||||
if (this.mBeginYear == this.mEndYear && this.mBeginMonth == this.mEndMonth && this.mBeginDay == this.mEndDay) {
|
||||
minHour = this.mBeginHour;
|
||||
maxHour = this.mEndHour;
|
||||
} else if (selectedYear == this.mBeginYear && selectedMonth == this.mBeginMonth && selectedDay == this.mBeginDay) {
|
||||
minHour = this.mBeginHour;
|
||||
maxHour = 23;
|
||||
} else if (selectedYear == this.mEndYear && selectedMonth == this.mEndMonth && selectedDay == this.mEndDay) {
|
||||
minHour = 0;
|
||||
maxHour = this.mEndHour;
|
||||
} else {
|
||||
minHour = 0;
|
||||
maxHour = 23;
|
||||
}
|
||||
|
||||
this.mHourUnits.clear();
|
||||
|
||||
int selectedHour;
|
||||
for(selectedHour = minHour; selectedHour <= maxHour; ++selectedHour) {
|
||||
this.mHourUnits.add(this.mDecimalFormat.format((long)selectedHour));
|
||||
}
|
||||
|
||||
this.mDpvHour.setDataList(this.mHourUnits);
|
||||
selectedHour = this.getValueInRange(this.mSelectedTime.get(11), minHour, maxHour);
|
||||
this.mSelectedTime.set(11, selectedHour);
|
||||
this.mDpvHour.setSelected(selectedHour - minHour);
|
||||
if (showAnim) {
|
||||
this.mDpvHour.startAnim();
|
||||
}
|
||||
}
|
||||
|
||||
this.mDpvHour.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
CustomDatePickerNew1.this.linkageMinuteUnit(showAnim);
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
private void linkageMinuteUnit(boolean showAnim) {
|
||||
if ((this.mScrollUnits & 2) == 2) {
|
||||
int selectedYear = this.mSelectedTime.get(1);
|
||||
int selectedMonth = this.mSelectedTime.get(2) + 1;
|
||||
int selectedDay = this.mSelectedTime.get(5);
|
||||
int selectedHour = this.mSelectedTime.get(11);
|
||||
int minMinute;
|
||||
int maxMinute;
|
||||
if (this.mBeginYear == this.mEndYear && this.mBeginMonth == this.mEndMonth && this.mBeginDay == this.mEndDay && this.mBeginHour == this.mEndHour) {
|
||||
minMinute = this.mBeginMinute;
|
||||
maxMinute = this.mEndMinute;
|
||||
} else if (selectedYear == this.mBeginYear && selectedMonth == this.mBeginMonth && selectedDay == this.mBeginDay && selectedHour == this.mBeginHour) {
|
||||
minMinute = this.mBeginMinute;
|
||||
maxMinute = 59;
|
||||
} else if (selectedYear == this.mEndYear && selectedMonth == this.mEndMonth && selectedDay == this.mEndDay && selectedHour == this.mEndHour) {
|
||||
minMinute = 0;
|
||||
maxMinute = this.mEndMinute;
|
||||
} else {
|
||||
minMinute = 0;
|
||||
maxMinute = 59;
|
||||
}
|
||||
|
||||
this.mMinuteUnits.clear();
|
||||
|
||||
int selectedMinute;
|
||||
for(selectedMinute = minMinute; selectedMinute <= maxMinute; ++selectedMinute) {
|
||||
this.mMinuteUnits.add(this.mDecimalFormat.format((long)selectedMinute));
|
||||
}
|
||||
|
||||
this.mDpvMinute.setDataList(this.mMinuteUnits);
|
||||
selectedMinute = this.getValueInRange(this.mSelectedTime.get(12), minMinute, maxMinute);
|
||||
this.mSelectedTime.set(12, selectedMinute);
|
||||
this.mDpvMinute.setSelected(selectedMinute - minMinute);
|
||||
if (showAnim) {
|
||||
this.mDpvMinute.startAnim();
|
||||
}
|
||||
}
|
||||
|
||||
this.setCanScroll();
|
||||
}
|
||||
|
||||
private int getValueInRange(int value, int minValue, int maxValue) {
|
||||
if (value < minValue) {
|
||||
return minValue;
|
||||
} else {
|
||||
return value > maxValue ? maxValue : value;
|
||||
}
|
||||
}
|
||||
|
||||
public void show(String dateStr) {
|
||||
if (this.canShow() && !TextUtils.isEmpty(dateStr)) {
|
||||
if (this.setSelectedTime(dateStr, false)) {
|
||||
this.mPickerDialog.show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canShow() {
|
||||
return this.mCanDialogShow && this.mPickerDialog != null;
|
||||
}
|
||||
|
||||
public boolean setSelectedTime(String dateStr, boolean showAnim) {
|
||||
return this.canShow() && !TextUtils.isEmpty(dateStr) && this.setSelectedTime(DateFormatUtils.str2Long(dateStr, this.mCanShowPreciseTime), showAnim);
|
||||
}
|
||||
|
||||
public void show(long timestamp) {
|
||||
if (this.canShow()) {
|
||||
if (this.setSelectedTime(timestamp, false)) {
|
||||
this.mPickerDialog.show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public boolean setSelectedTime(long timestamp, boolean showAnim) {
|
||||
if (!this.canShow()) {
|
||||
return false;
|
||||
} else {
|
||||
if (timestamp < this.mBeginTime.getTimeInMillis()) {
|
||||
timestamp = this.mBeginTime.getTimeInMillis();
|
||||
} else if (timestamp > this.mEndTime.getTimeInMillis()) {
|
||||
timestamp = this.mEndTime.getTimeInMillis();
|
||||
}
|
||||
|
||||
this.mSelectedTime.setTimeInMillis(timestamp);
|
||||
this.mYearUnits.clear();
|
||||
|
||||
for(int i = this.mBeginYear; i <= this.mEndYear; ++i) {
|
||||
this.mYearUnits.add(String.valueOf(i));
|
||||
}
|
||||
|
||||
this.mDpvYear.setDataList(this.mYearUnits);
|
||||
this.mDpvYear.setSelected(this.mSelectedTime.get(1) - this.mBeginYear);
|
||||
this.linkageMonthUnit(showAnim, showAnim ? 100L : 0L);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public void setCancelable(boolean cancelable) {
|
||||
if (this.canShow()) {
|
||||
this.mPickerDialog.setCancelable(cancelable);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCanShowPreciseTime(boolean canShowPreciseTime) {
|
||||
if (this.canShow()) {
|
||||
if (canShowPreciseTime) {
|
||||
this.initScrollUnit();
|
||||
this.mDpvHour.setVisibility(View.VISIBLE);
|
||||
this.mTvHourUnit.setVisibility(View.VISIBLE);
|
||||
this.mDpvMinute.setVisibility(View.VISIBLE);
|
||||
this.mTvMinuteUnit.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
this.initScrollUnit(1, 2);
|
||||
this.mDpvHour.setVisibility(View.GONE);
|
||||
this.mTvHourUnit.setVisibility(View.GONE);
|
||||
this.mDpvMinute.setVisibility(View.GONE);
|
||||
this.mTvMinuteUnit.setVisibility(View.GONE);
|
||||
|
||||
this.mDpvDay.setVisibility(View.GONE);
|
||||
// this.mDayUnits.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
this.mCanShowPreciseTime = canShowPreciseTime;
|
||||
}
|
||||
}
|
||||
|
||||
private void initScrollUnit(Integer... units) {
|
||||
if (units != null && units.length != 0) {
|
||||
Integer[] var2 = units;
|
||||
int var3 = units.length;
|
||||
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
int unit = var2[var4];
|
||||
this.mScrollUnits ^= unit;
|
||||
}
|
||||
} else {
|
||||
this.mScrollUnits = 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setScrollLoop(boolean canLoop) {
|
||||
if (this.canShow()) {
|
||||
this.mDpvYear.setCanScrollLoop(canLoop);
|
||||
this.mDpvMonth.setCanScrollLoop(canLoop);
|
||||
this.mDpvDay.setCanScrollLoop(canLoop);
|
||||
this.mDpvHour.setCanScrollLoop(canLoop);
|
||||
this.mDpvMinute.setCanScrollLoop(canLoop);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCanShowAnim(boolean canShowAnim) {
|
||||
if (this.canShow()) {
|
||||
this.mDpvYear.setCanShowAnim(canShowAnim);
|
||||
this.mDpvMonth.setCanShowAnim(canShowAnim);
|
||||
this.mDpvDay.setCanShowAnim(canShowAnim);
|
||||
this.mDpvHour.setCanShowAnim(canShowAnim);
|
||||
this.mDpvMinute.setCanShowAnim(canShowAnim);
|
||||
}
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
if (this.mPickerDialog != null) {
|
||||
this.mPickerDialog.dismiss();
|
||||
this.mPickerDialog = null;
|
||||
this.mDpvYear.onDestroy();
|
||||
this.mDpvMonth.onDestroy();
|
||||
this.mDpvDay.onDestroy();
|
||||
this.mDpvHour.onDestroy();
|
||||
this.mDpvMinute.onDestroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public interface Callback {
|
||||
void onTimeSelected(long var1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.hbl.lewan.R;
|
||||
|
||||
import com.hbl.lewan.adapter.CommonAdapter;
|
||||
import com.hbl.lewan.adapter.ViewHolder;
|
||||
import com.hbl.lewan.custom.CustomDatePickerNew1;
|
||||
import com.hbl.lewan.databinding.FragmentWalletInfoBinding;
|
||||
import com.hbl.lewan.dialog.SelectTypeDialog;
|
||||
import com.hbl.lewan.model.BillBean;
|
||||
@@ -57,6 +58,8 @@ import com.netease.nimlib.sdk.uinfo.UserService;
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||
import com.netease.yunxin.kit.common.ui.fragments.BaseFragment;
|
||||
import com.netease.yunxin.kit.common.ui.utils.TimeFormatUtils;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.CustomDatePicker;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.DateFormatUtils;
|
||||
import com.netease.yunxin.kit.common.utils.SizeUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
@@ -94,6 +97,7 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
List<TaskBean> taskBeans = null;
|
||||
int loc = 0;
|
||||
FragmentWalletInfoBinding binding;
|
||||
String dataString;
|
||||
|
||||
public static WalletInfoFragment newInstance(int status1, int type, String billBean) {
|
||||
Bundle bundle = new Bundle();
|
||||
@@ -155,9 +159,38 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
initList();
|
||||
initRefreshLayout();
|
||||
|
||||
|
||||
dataString = DataUtils.getCurrentTimeMonth(System.currentTimeMillis());
|
||||
binding.typeTv1.setText(dataString);
|
||||
binding.typeTv1.setOnClickListener(v -> showTimerPicker());
|
||||
}
|
||||
String data = DataUtils.getCurrentTimeType(System.currentTimeMillis());
|
||||
|
||||
private void showTimerPicker() {
|
||||
String beginTime = "2000-01-01 00:00";
|
||||
String endTime = DateFormatUtils.long2Str(System.currentTimeMillis(), true);
|
||||
// 通过日期字符串初始化日期,格式请用:yyyy-MM-dd HH:mm
|
||||
CustomDatePickerNew1 mTimerPicker =
|
||||
new CustomDatePickerNew1(
|
||||
getActivity(),
|
||||
new CustomDatePicker.Callback() {
|
||||
@Override
|
||||
public void onTimeSelected(long timestamp) {
|
||||
binding.typeTv1.setText(DataUtils.getCurrentTimeMonth(timestamp));
|
||||
data = DataUtils.getCurrentTimeType(timestamp);
|
||||
}
|
||||
},
|
||||
beginTime,
|
||||
endTime, data);
|
||||
// 允许点击屏幕或物理返回键关闭
|
||||
mTimerPicker.setCancelable(true);
|
||||
// 显示时和分
|
||||
mTimerPicker.setCanShowPreciseTime(false);
|
||||
// 允许循环滚动
|
||||
mTimerPicker.setScrollLoop(false);
|
||||
// 允许滚动动画
|
||||
mTimerPicker.setCanShowAnim(false);
|
||||
mTimerPicker.show(data);
|
||||
}
|
||||
private void getStatistics() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (status == 0) {
|
||||
|
||||
@@ -11,6 +11,8 @@ import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.adapter.CommunityAdapter;
|
||||
import com.hbl.lewan.custom.CustomDatePickerNew;
|
||||
import com.hbl.lewan.custom.CustomDatePickerNew1;
|
||||
import com.hbl.lewan.databinding.ActivityWalletInfoNew1Binding;
|
||||
import com.hbl.lewan.databinding.ActivityWalletInfoRedBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
@@ -20,12 +22,16 @@ import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.utils.DataUtils;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.utils.AvatarColor;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.CustomDatePicker;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.datepicker.DateFormatUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.model.UserField;
|
||||
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
||||
import com.netease.yunxin.kit.corekit.im.provider.FetchCallback;
|
||||
import com.netease.yunxin.kit.corekit.im.repo.CommonRepo;
|
||||
@@ -42,7 +48,7 @@ public class WalletInfoRedActivity extends BaseActivity {
|
||||
WalletBean walletBean;
|
||||
BindBean bindBean;
|
||||
List<Fragment> listFragment = new ArrayList<>();
|
||||
|
||||
String dataString;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
|
||||
@@ -180,9 +186,38 @@ public class WalletInfoRedActivity extends BaseActivity {
|
||||
|
||||
protected void initView() {
|
||||
viewBinding.contactListActivityTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||
|
||||
dataString = DataUtils.getCurrentTimeMonth(System.currentTimeMillis());
|
||||
viewBinding.typeTv1.setText(dataString);
|
||||
viewBinding.typeTv1.setOnClickListener(v -> showTimerPicker());
|
||||
}
|
||||
String data = DataUtils.getCurrentTimeType(System.currentTimeMillis());
|
||||
|
||||
private void showTimerPicker() {
|
||||
String beginTime = "2000-01-01 00:00";
|
||||
String endTime = DateFormatUtils.long2Str(System.currentTimeMillis(), true);
|
||||
// 通过日期字符串初始化日期,格式请用:yyyy-MM-dd HH:mm
|
||||
CustomDatePickerNew1 mTimerPicker =
|
||||
new CustomDatePickerNew1(
|
||||
this,
|
||||
new CustomDatePicker.Callback() {
|
||||
@Override
|
||||
public void onTimeSelected(long timestamp) {
|
||||
viewBinding.typeTv1.setText(DataUtils.getCurrentTimeMonth(timestamp));
|
||||
data = DataUtils.getCurrentTimeType(timestamp);
|
||||
}
|
||||
},
|
||||
beginTime,
|
||||
endTime, data);
|
||||
// 允许点击屏幕或物理返回键关闭
|
||||
mTimerPicker.setCancelable(true);
|
||||
// 显示时和分
|
||||
mTimerPicker.setCanShowPreciseTime(false);
|
||||
// 允许循环滚动
|
||||
mTimerPicker.setScrollLoop(false);
|
||||
// 允许滚动动画
|
||||
mTimerPicker.setCanShowAnim(false);
|
||||
mTimerPicker.show(data);
|
||||
}
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:startColor="#F8F8F8"
|
||||
android:endColor="#F8F8F8"
|
||||
android:centerColor="#F8F8F8"
|
||||
<gradient android:startColor="#FAF3DB"
|
||||
android:endColor="#FAF3DB"
|
||||
android:centerColor="#FAF3DB"
|
||||
android:type="linear"
|
||||
/>
|
||||
<stroke android:width="0dp" android:color="#F8F8F8" />
|
||||
|
||||
182
app/src/main/res/layout/dialog_date_picker1.xml
Normal file
182
app/src/main/res/layout/dialog_date_picker1.xml
Normal file
@@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (c) 2022 NetEase, Inc. All rights reserved. -->
|
||||
<!-- Use of this source code is governed by a MIT license that can be -->
|
||||
<!-- found in the LICENSE file. -->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg2"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottpm_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close_key"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@mipmap/user_colose_img"
|
||||
android:tint="#5D5D5D"
|
||||
tools:ignore="UseAppTint" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="选择月份"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingRight="@dimen/dp_15"
|
||||
android:gravity="center"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/video_call_out_over"
|
||||
android:background="@drawable/button_true_bg1"
|
||||
android:textColor="#F6F8FD"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_f7f7f7" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/dp_2"
|
||||
android:layout_centerInParent="true">
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:background="@drawable/shengri_item_bg"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="40dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingEnd="40dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.datepicker.PickerView
|
||||
android:id="@+id/dpv_year"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="@dimen/picker_view_height"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/year"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/date_unit_text_size" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.datepicker.PickerView
|
||||
android:id="@+id/dpv_month"
|
||||
android:layout_width="40dp"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:layout_height="@dimen/picker_view_height" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/month"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/date_unit_text_size" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.datepicker.PickerView
|
||||
android:id="@+id/dpv_day"
|
||||
android:layout_width="0dp"
|
||||
android:visibility="gone"
|
||||
android:layout_height="@dimen/picker_view_height"
|
||||
android:layout_weight="2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/day"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/date_unit_text_size" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.datepicker.PickerView
|
||||
android:id="@+id/dpv_hour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/picker_view_height"
|
||||
android:visibility="gone"
|
||||
|
||||
android:layout_weight="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hour_unit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
|
||||
android:text="@string/hour"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/date_unit_text_size" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.datepicker.PickerView
|
||||
android:id="@+id/dpv_minute"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/picker_view_height"
|
||||
android:visibility="gone"
|
||||
|
||||
android:layout_weight="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_minute_unit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
android:text="@string/minute"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/date_unit_text_size" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
BIN
chatkit-ui/src/main/res/drawable-xxhdpi/fudai_img.png
Normal file
BIN
chatkit-ui/src/main/res/drawable-xxhdpi/fudai_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 143 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 158 KiB |
@@ -5,43 +5,57 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/big_ly"
|
||||
android:layout_width="218dp"
|
||||
android:layout_height="@dimen/dimen_92_dp"
|
||||
android:layout_height="102dp"
|
||||
android:background="@drawable/hongbnao_f_g"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_hongbao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="67dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_title_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="@dimen/dimen_60_dp"
|
||||
android:layout_marginTop="@dimen/dimen_10_dp"
|
||||
android:layout_marginRight="@dimen/dimen_10_dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:text="来自 黄黄不是嬛嬛 的赠送"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="14sp" />
|
||||
<ImageView
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="67dp"
|
||||
android:layout_marginStart="@dimen/dimen_10_dp"
|
||||
android:src="@drawable/fudai_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_status_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="@dimen/dimen_60_dp"
|
||||
android:layout_marginRight="@dimen/dimen_10_dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:text="待領取"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="12sp" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="67dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_title_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="@dimen/dimen_10_dp"
|
||||
android:layout_marginTop="@dimen/dimen_10_dp"
|
||||
android:layout_marginRight="@dimen/dimen_10_dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:text="来自 黄黄不是嬛嬛 的赠送"
|
||||
android:textColor="#FFFEE3"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_status_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="@dimen/dimen_10_dp"
|
||||
android:layout_marginRight="@dimen/dimen_10_dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:text="待領取"
|
||||
android:textColor="#FEE391"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
Reference in New Issue
Block a user