version:3.4
fix: update:头像改为圆形,时间居中
This commit is contained in:
@@ -16,8 +16,8 @@ android {
|
||||
applicationId "com.uiui.aios"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 23
|
||||
versionName "3.2"
|
||||
versionCode 25
|
||||
versionName "3.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ import com.uiui.aios.view.JzvdStdRound;
|
||||
import com.uiui.aios.view.MyJzvdStdNoTitleNoClarity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -58,16 +61,15 @@ public class AlarmAdapter extends RecyclerView.Adapter<AlarmAdapter.holder> {
|
||||
AlarmClockData alarmClockData = mAlarmClockData.get(position);
|
||||
switch (alarmClockData.getType()) {
|
||||
case 1:
|
||||
// try {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
// Date date = sdf.parse(alarmClockData.getTime());
|
||||
// SimpleDateFormat hours = new SimpleDateFormat("HH:mm");
|
||||
// String time = hours.format(date);
|
||||
// holder.tv_time.setText(time);
|
||||
// } catch (ParseException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
holder.tv_time.setText(alarmClockData.getTime());
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
Date date = sdf.parse(alarmClockData.getTime());
|
||||
SimpleDateFormat hours = new SimpleDateFormat("HH:mm");
|
||||
String time = hours.format(date);
|
||||
holder.tv_time.setText(time);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
holder.tv_remind_type.setText("单次");
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -20,6 +20,9 @@ import com.uiui.aios.bean.AlarmClockData;
|
||||
import com.uiui.aios.utils.FFmpegUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
@@ -54,7 +57,20 @@ public class NotificationAdapter extends RecyclerView.Adapter<NotificationAdapte
|
||||
public void onBindViewHolder(@NonNull Holder holder, int position) {
|
||||
AlarmClockData alarmClockData = dataList.get(position);
|
||||
holder.tv_title.setText("提醒事件:" + alarmClockData.getTitle());
|
||||
holder.tv_time.setText(alarmClockData.getTime());
|
||||
String time = alarmClockData.getTime();
|
||||
if (time.length() > 5) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
SimpleDateFormat hours = new SimpleDateFormat("HH:mm");
|
||||
try {
|
||||
Date date = sdf.parse(time);
|
||||
String hourTime = hours.format(date);
|
||||
holder.tv_time.setText(hourTime);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
holder.tv_time.setText(time);
|
||||
}
|
||||
String voice = alarmClockData.getVoice();
|
||||
holder.root.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.qweather.sdk.bean.base.Unit;
|
||||
import com.qweather.sdk.bean.weather.WeatherHourlyBean;
|
||||
import com.qweather.sdk.bean.weather.WeatherNowBean;
|
||||
import com.qweather.sdk.view.QWeather;
|
||||
import com.shehuan.niv.NiceImageView;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.uiui.aios.BuildConfig;
|
||||
import com.uiui.aios.R;
|
||||
@@ -119,7 +120,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
@BindView(R.id.iv_note_nodata)
|
||||
ImageView iv_note_nodata;
|
||||
@BindView(R.id.iv_head)
|
||||
ImageView iv_head;
|
||||
NiceImageView iv_head;
|
||||
|
||||
@BindView(R.id.cl_health)
|
||||
ConstraintLayout mClHealth;
|
||||
|
||||
@@ -103,13 +103,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
<com.shehuan.niv.NiceImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/home_clinical_detection"
|
||||
app:is_circle="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -269,7 +270,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_noti"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_note"
|
||||
android:id="@+id/cl_health"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
@@ -87,41 +87,45 @@
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/custom_background">
|
||||
android:background="@drawable/custom_background"
|
||||
tools:ignore="NestedWeights">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="爱心守护"
|
||||
android:text="健康码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
<com.shehuan.niv.NiceImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/note_nodata"
|
||||
android:visibility="gone"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/home_clinical_detection"
|
||||
app:is_circle="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_noti"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_head"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_head"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_head" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -225,26 +229,25 @@
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/textView5" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_health"
|
||||
android:id="@+id/cl_note"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background"
|
||||
tools:ignore="NestedWeights">
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="健康码"
|
||||
android:text="爱心守护"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
@@ -252,18 +255,28 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/home_clinical_detection"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/note_nodata"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_noti"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_tongue"
|
||||
android:layout_width="0dp"
|
||||
|
||||
Reference in New Issue
Block a user