version:
fix: update:更新图标,增加健康码模块
@@ -35,6 +35,10 @@
|
|||||||
android:restoreAnyVersion="true"
|
android:restoreAnyVersion="true"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
|
<activity
|
||||||
|
android:name=".activity.CodeActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:launchMode="singleTask" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.weather.WeatherActivity"
|
android:name=".activity.weather.WeatherActivity"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
|
|||||||
121
app/src/main/java/com/uiui/os/activity/CodeActivity.java
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
package com.uiui.os.activity;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.trello.rxlifecycle4.RxLifecycle;
|
||||||
|
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||||
|
import com.uiui.os.R;
|
||||||
|
import com.uiui.os.adapter.HealthCodeAdapter;
|
||||||
|
import com.uiui.os.base.BaseActivity;
|
||||||
|
import com.uiui.os.bean.BaseResponse;
|
||||||
|
import com.uiui.os.bean.HealthCode;
|
||||||
|
import com.uiui.os.network.NetInterfaceManager;
|
||||||
|
import com.uiui.os.utils.Utils;
|
||||||
|
import com.uiui.os.view.ScaleCircleNavigator;
|
||||||
|
|
||||||
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||||
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
|
import io.reactivex.rxjava3.disposables.Disposable;
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
|
|
||||||
|
public class CodeActivity extends BaseActivity {
|
||||||
|
@BindView(R.id.viewPager)
|
||||||
|
ViewPager mViewPager;
|
||||||
|
@BindView(R.id.magicIndicator)
|
||||||
|
MagicIndicator mMagicIndicator;
|
||||||
|
|
||||||
|
private HealthCodeAdapter mHealthCodeAdapter;
|
||||||
|
private ScaleCircleNavigator scaleCircleNavigator;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLayoutId() {
|
||||||
|
return R.layout.activity_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initView() {
|
||||||
|
ButterKnife.bind(this);
|
||||||
|
mHealthCodeAdapter = new HealthCodeAdapter();
|
||||||
|
mViewPager.setAdapter(mHealthCodeAdapter);
|
||||||
|
scaleCircleNavigator = new ScaleCircleNavigator(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initData() {
|
||||||
|
getHealthCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setImageViews(List<HealthCode> healthCodes) {
|
||||||
|
mMagicIndicator.setNavigator(scaleCircleNavigator);
|
||||||
|
scaleCircleNavigator.setCircleCount(healthCodes.size());
|
||||||
|
scaleCircleNavigator.setNormalCircleColor(Color.DKGRAY);
|
||||||
|
scaleCircleNavigator.setSelectedCircleColor(Color.LTGRAY);
|
||||||
|
scaleCircleNavigator.setCircleClickListener(new ScaleCircleNavigator.OnCircleClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(int index) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewPagerHelper.bind(mMagicIndicator, mViewPager);
|
||||||
|
List<ImageView> imageViews = new ArrayList<>();
|
||||||
|
for (HealthCode healthCode : healthCodes) {
|
||||||
|
ImageView image = new ImageView(this);
|
||||||
|
image.setAdjustViewBounds(true);
|
||||||
|
image.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||||
|
Glide.with(this).load(healthCode.getImg()).into(image);
|
||||||
|
imageViews.add(image);
|
||||||
|
}
|
||||||
|
mHealthCodeAdapter.setImageViews(imageViews);
|
||||||
|
mHealthCodeAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void getHealthCode() {
|
||||||
|
NetInterfaceManager.getInstance().getHealthCodeApi()
|
||||||
|
.getArticleDetails(Utils.getSerial())
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, ActivityEvent.DESTROY))
|
||||||
|
.subscribe(new Observer<BaseResponse<List<HealthCode>>>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
Log.e("getHealthCode", "onSubscribe: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull BaseResponse<List<HealthCode>> listBaseResponse) {
|
||||||
|
Log.e("getHealthCode", "onNext: " + listBaseResponse);
|
||||||
|
if (listBaseResponse.code == 200) {
|
||||||
|
List<HealthCode> healthCodeList = listBaseResponse.data;
|
||||||
|
setImageViews(healthCodeList);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
Log.e("getHealthCode", "onError: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
Log.e("getHealthCode", "onComplete: ");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,6 +32,7 @@ import com.uiui.os.bean.DesktopIcon;
|
|||||||
import com.uiui.os.fragment.AppListFragment;
|
import com.uiui.os.fragment.AppListFragment;
|
||||||
import com.uiui.os.fragment.BaseFragmentPagerAdapter;
|
import com.uiui.os.fragment.BaseFragmentPagerAdapter;
|
||||||
import com.uiui.os.fragment.CustomFragment;
|
import com.uiui.os.fragment.CustomFragment;
|
||||||
|
import com.uiui.os.fragment.SecondFragment;
|
||||||
import com.uiui.os.utils.APKUtils;
|
import com.uiui.os.utils.APKUtils;
|
||||||
import com.uiui.os.utils.AppUsedTimeUtils;
|
import com.uiui.os.utils.AppUsedTimeUtils;
|
||||||
import com.uiui.os.view.ScaleCircleNavigator;
|
import com.uiui.os.view.ScaleCircleNavigator;
|
||||||
@@ -60,6 +61,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
|||||||
private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
||||||
private List<Fragment> mFragments;
|
private List<Fragment> mFragments;
|
||||||
private CustomFragment mCustomFragment;
|
private CustomFragment mCustomFragment;
|
||||||
|
private SecondFragment mSecondFragment;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLayoutId() {
|
public int getLayoutId() {
|
||||||
@@ -79,6 +81,8 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
|||||||
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||||
// fragmentTransaction.add(R.id.viewPager, appListFragment);
|
// fragmentTransaction.add(R.id.viewPager, appListFragment);
|
||||||
// fragmentTransaction.commit();
|
// fragmentTransaction.commit();
|
||||||
|
mSecondFragment = new SecondFragment();
|
||||||
|
mFragments.add(mSecondFragment);
|
||||||
mCustomFragment = new CustomFragment();
|
mCustomFragment = new CustomFragment();
|
||||||
mFragments.add(mCustomFragment);
|
mFragments.add(mCustomFragment);
|
||||||
|
|
||||||
|
|||||||
43
app/src/main/java/com/uiui/os/adapter/HealthCodeAdapter.java
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package com.uiui.os.adapter;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.viewpager.widget.PagerAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class HealthCodeAdapter extends PagerAdapter {
|
||||||
|
private List<ImageView> mImageViews;
|
||||||
|
|
||||||
|
public void setImageViews(List<ImageView> imageViews) {
|
||||||
|
this.mImageViews = imageViews;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mImageViews == null ? 0 : mImageViews.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
|
||||||
|
return view == object;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Object instantiateItem(@NonNull ViewGroup container, int position) {
|
||||||
|
// 给 container 添加一个view
|
||||||
|
container.addView(mImageViews.get(position));
|
||||||
|
// 返回一个和该view相对的object
|
||||||
|
return mImageViews.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
|
||||||
|
container.removeView(mImageViews.get(position));
|
||||||
|
}
|
||||||
|
}
|
||||||
26
app/src/main/java/com/uiui/os/bean/HealthCode.java
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package com.uiui.os.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class HealthCode implements Serializable {
|
||||||
|
private static final long serialVersionUID = 3722434160181671038L;
|
||||||
|
|
||||||
|
int id;
|
||||||
|
String img;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -44,6 +44,7 @@ import com.tencent.mmkv.MMKV;
|
|||||||
import com.uiui.os.BuildConfig;
|
import com.uiui.os.BuildConfig;
|
||||||
import com.uiui.os.R;
|
import com.uiui.os.R;
|
||||||
import com.uiui.os.activity.APPListActivity;
|
import com.uiui.os.activity.APPListActivity;
|
||||||
|
import com.uiui.os.activity.CodeActivity;
|
||||||
import com.uiui.os.activity.EmergencyActivity;
|
import com.uiui.os.activity.EmergencyActivity;
|
||||||
import com.uiui.os.activity.weather.WeatherActivity;
|
import com.uiui.os.activity.weather.WeatherActivity;
|
||||||
import com.uiui.os.adapter.AlarmClockAdapter;
|
import com.uiui.os.adapter.AlarmClockAdapter;
|
||||||
@@ -72,10 +73,13 @@ import butterknife.ButterKnife;
|
|||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkStatusChangedListener {
|
public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkStatusChangedListener {
|
||||||
@BindView(R.id.cl_alarm)
|
// @BindView(R.id.cl_alarm)
|
||||||
ConstraintLayout cl_alarm;
|
// ConstraintLayout cl_alarm;
|
||||||
|
|
||||||
@BindView(R.id.cl_wifi)
|
@BindView(R.id.cl_wifi)
|
||||||
ConstraintLayout cl_wifi;
|
ConstraintLayout cl_wifi;
|
||||||
|
@BindView(R.id.qr_code)
|
||||||
|
ConstraintLayout qr_code;
|
||||||
@BindView(R.id.cl_sos)
|
@BindView(R.id.cl_sos)
|
||||||
ConstraintLayout cl_soso;
|
ConstraintLayout cl_soso;
|
||||||
@BindView(R.id.cl_allapp)
|
@BindView(R.id.cl_allapp)
|
||||||
@@ -84,8 +88,8 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
ConstraintLayout cl_weather;
|
ConstraintLayout cl_weather;
|
||||||
@BindView(R.id.cl_battery)
|
@BindView(R.id.cl_battery)
|
||||||
ConstraintLayout cl_battery;
|
ConstraintLayout cl_battery;
|
||||||
@BindView(R.id.tv_add)
|
// @BindView(R.id.tv_add)
|
||||||
TextView tv_add;
|
// TextView tv_add;
|
||||||
@BindView(R.id.tv_battery)
|
@BindView(R.id.tv_battery)
|
||||||
TextView tv_battery;
|
TextView tv_battery;
|
||||||
@BindView(R.id.tv_location)
|
@BindView(R.id.tv_location)
|
||||||
@@ -100,8 +104,8 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
ImageView iv_charging;
|
ImageView iv_charging;
|
||||||
@BindView(R.id.rv_noti)
|
@BindView(R.id.rv_noti)
|
||||||
RecyclerView rv_noti;
|
RecyclerView rv_noti;
|
||||||
@BindView(R.id.rv_clock)
|
// @BindView(R.id.rv_clock)
|
||||||
RecyclerView rv_clock;
|
// RecyclerView rv_clock;
|
||||||
@BindView(R.id.wifi_ssid)
|
@BindView(R.id.wifi_ssid)
|
||||||
TextView wifi_ssid;
|
TextView wifi_ssid;
|
||||||
@BindView(R.id.iv_sos)
|
@BindView(R.id.iv_sos)
|
||||||
@@ -118,7 +122,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
private View rootView;
|
private View rootView;
|
||||||
private List<AlarmItem> alarmItemList;
|
private List<AlarmItem> alarmItemList;
|
||||||
private NotificationAdapter notificationAdapter;
|
private NotificationAdapter notificationAdapter;
|
||||||
private AlarmClockAdapter alarmClockAdapter;
|
// private AlarmClockAdapter alarmClockAdapter;
|
||||||
private SOSNnmberAdapter sosNnmberAdapter;
|
private SOSNnmberAdapter sosNnmberAdapter;
|
||||||
private MMKV mmkv;
|
private MMKV mmkv;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
@@ -157,7 +161,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
|
|
||||||
public void setAlarmItem(List<AlarmItem> alarmItem) {
|
public void setAlarmItem(List<AlarmItem> alarmItem) {
|
||||||
this.alarmItemList = alarmItem;
|
this.alarmItemList = alarmItem;
|
||||||
setAlarm();
|
// setAlarm();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -287,12 +291,12 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
killBackgroundApp();
|
killBackgroundApp();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cl_alarm.setOnClickListener(new View.OnClickListener() {
|
// cl_alarm.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
APKUtils.openPackage(getActivity(), "com.alarmclock.uiui");
|
// APKUtils.openPackage(getActivity(), "com.alarmclock.uiui");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
notificationAdapter = new NotificationAdapter();
|
notificationAdapter = new NotificationAdapter();
|
||||||
rv_noti.setLayoutManager(new LinearLayoutManager(getActivity()));
|
rv_noti.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
rv_noti.setAdapter(notificationAdapter);
|
rv_noti.setAdapter(notificationAdapter);
|
||||||
@@ -307,9 +311,9 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); //直接进入手机中的wifi网络设置界面
|
startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); //直接进入手机中的wifi网络设置界面
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
alarmClockAdapter = new AlarmClockAdapter();
|
// alarmClockAdapter = new AlarmClockAdapter();
|
||||||
rv_clock.setLayoutManager(new LinearLayoutManager(getActivity()));
|
// rv_clock.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
rv_clock.setAdapter(alarmClockAdapter);
|
// rv_clock.setAdapter(alarmClockAdapter);
|
||||||
sosNnmberAdapter = new SOSNnmberAdapter();
|
sosNnmberAdapter = new SOSNnmberAdapter();
|
||||||
rv_sos.setLayoutManager(new LinearLayoutManager(getActivity()));
|
rv_sos.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
rv_sos.setAdapter(sosNnmberAdapter);
|
rv_sos.setAdapter(sosNnmberAdapter);
|
||||||
@@ -345,14 +349,20 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setAlarm();
|
qr_code.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
startActivity(new Intent(getActivity(), CodeActivity.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// setAlarm();
|
||||||
refreshMemory();
|
refreshMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
setAlarm();
|
// setAlarm();
|
||||||
setSosNumber();
|
setSosNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,12 +382,12 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
|||||||
private void setAlarm() {
|
private void setAlarm() {
|
||||||
if (rootView == null) return;
|
if (rootView == null) return;
|
||||||
if (alarmItemList == null) {
|
if (alarmItemList == null) {
|
||||||
tv_add.setVisibility(View.VISIBLE);
|
// tv_add.setVisibility(View.VISIBLE);
|
||||||
rv_clock.setVisibility(View.GONE);
|
// rv_clock.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
tv_add.setVisibility(View.GONE);
|
// tv_add.setVisibility(View.GONE);
|
||||||
rv_clock.setVisibility(View.VISIBLE);
|
// rv_clock.setVisibility(View.VISIBLE);
|
||||||
alarmClockAdapter.setAlarmItemList(alarmItemList);
|
// alarmClockAdapter.setAlarmItemList(alarmItemList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
65
app/src/main/java/com/uiui/os/fragment/SecondFragment.java
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
package com.uiui.os.fragment;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.uiui.os.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link SecondFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class SecondFragment extends Fragment {
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
public SecondFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment SecondFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static SecondFragment newInstance(String param1, String param2) {
|
||||||
|
SecondFragment fragment = new SecondFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_second, container, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ import com.uiui.os.bean.NetDesktopIcon;
|
|||||||
import com.uiui.os.network.api.AlarmClockApi;
|
import com.uiui.os.network.api.AlarmClockApi;
|
||||||
import com.uiui.os.network.api.AppUsageRecordApi;
|
import com.uiui.os.network.api.AppUsageRecordApi;
|
||||||
import com.uiui.os.network.api.GetDesktopApi;
|
import com.uiui.os.network.api.GetDesktopApi;
|
||||||
|
import com.uiui.os.network.api.HealthCodeApi;
|
||||||
import com.uiui.os.network.api.RunNewApp;
|
import com.uiui.os.network.api.RunNewApp;
|
||||||
import com.uiui.os.network.api.SOSRecordApi;
|
import com.uiui.os.network.api.SOSRecordApi;
|
||||||
import com.uiui.os.network.api.SendScreenshotApi;
|
import com.uiui.os.network.api.SendScreenshotApi;
|
||||||
@@ -202,7 +203,6 @@ public class NetInterfaceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AppUsageRecordApi getAppUsageRecordControl() {
|
public AppUsageRecordApi getAppUsageRecordControl() {
|
||||||
return mRetrofit.create(AppUsageRecordApi.class);
|
return mRetrofit.create(AppUsageRecordApi.class);
|
||||||
}
|
}
|
||||||
@@ -210,4 +210,8 @@ public class NetInterfaceManager {
|
|||||||
public SendScreenshotApi getScreenshotApi() {
|
public SendScreenshotApi getScreenshotApi() {
|
||||||
return mRetrofit.create(SendScreenshotApi.class);
|
return mRetrofit.create(SendScreenshotApi.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HealthCodeApi getHealthCodeApi() {
|
||||||
|
return mRetrofit.create(HealthCodeApi.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,7 @@ public class URLAddress {
|
|||||||
public static final String GET_GOODS_DETAILS = "getGoodsDetails";
|
public static final String GET_GOODS_DETAILS = "getGoodsDetails";
|
||||||
/*获取资讯详情*/
|
/*获取资讯详情*/
|
||||||
public static final String GET_ARTICLE_DETAILS = "getArticleDetails";
|
public static final String GET_ARTICLE_DETAILS = "getArticleDetails";
|
||||||
|
/*获取健康吗*/
|
||||||
|
public static final String GET_HEALTH_CODE = "getHealthCode";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
18
app/src/main/java/com/uiui/os/network/api/HealthCodeApi.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package com.uiui.os.network.api;
|
||||||
|
|
||||||
|
import com.uiui.os.bean.BaseResponse;
|
||||||
|
import com.uiui.os.bean.HealthCode;
|
||||||
|
import com.uiui.os.network.URLAddress;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface HealthCodeApi {
|
||||||
|
@GET(URLAddress.GET_HEALTH_CODE)
|
||||||
|
Observable<BaseResponse<List<HealthCode>>> getArticleDetails(
|
||||||
|
@Query("sn") String sn
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 7.7 KiB |
BIN
app/src/main/res/drawable-hdpi/com_uiui_sn.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/drawable-hdpi/health_code.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
27
app/src/main/res/layout-land/activity_code.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activity.CodeActivity">
|
||||||
|
|
||||||
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
android:id="@+id/viewPager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/magicIndicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -171,8 +171,56 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||||
|
<!-- android:id="@+id/cl_alarm"-->
|
||||||
|
<!-- android:layout_width="0dp"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- android:layout_margin="8dp"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- android:background="@drawable/custom_background"-->
|
||||||
|
<!-- tools:ignore="NestedWeights">-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- 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:textColor="@color/black"-->
|
||||||
|
<!-- android:textSize="20sp"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/tv_add"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:background="@drawable/tv_background"-->
|
||||||
|
<!-- android:gravity="center_horizontal"-->
|
||||||
|
<!-- android:text="添加闹钟"-->
|
||||||
|
<!-- android:textColor="@color/white"-->
|
||||||
|
<!-- android:textSize="15sp"-->
|
||||||
|
<!-- 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_clock"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:overScrollMode="never"-->
|
||||||
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@+id/textView5" />-->
|
||||||
|
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_alarm"
|
android:id="@+id/qr_code"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
@@ -186,36 +234,24 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="我的闹钟"
|
android:text="健康码"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/tv_add"
|
android:layout_width="100dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/tv_background"
|
android:scaleType="fitCenter"
|
||||||
android:gravity="center_horizontal"
|
android:src="@drawable/health_code"
|
||||||
android:text="添加闹钟"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="15sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rv_clock"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView5" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
|||||||
97
app/src/main/res/layout-land/fragment_second.xml
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".fragment.SecondFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="3">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="秒杀抢购"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="养生资讯"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="附近活动"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="服务需求"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
27
app/src/main/res/layout-port/activity_code.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activity.CodeActivity">
|
||||||
|
|
||||||
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
android:id="@+id/viewPager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/magicIndicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -170,13 +170,60 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/textView11" />
|
app:layout_constraintTop_toBottomOf="@+id/textView11" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||||
|
<!-- android:id="@+id/cl_alarm"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- android:layout_margin="8dp"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- android:background="@drawable/custom_background">-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- 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:textColor="@color/black"-->
|
||||||
|
<!-- android:textSize="20sp"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/tv_add"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:background="@drawable/tv_background"-->
|
||||||
|
<!-- android:gravity="center_horizontal"-->
|
||||||
|
<!-- android:text="添加闹钟"-->
|
||||||
|
<!-- android:textColor="@color/white"-->
|
||||||
|
<!-- android:textSize="15sp"-->
|
||||||
|
<!-- 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_clock"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:overScrollMode="never"-->
|
||||||
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@+id/textView5" />-->
|
||||||
|
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_alarm"
|
android:id="@+id/qr_code"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/custom_background">
|
android:background="@drawable/custom_background"
|
||||||
|
tools:ignore="NestedWeights">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView5"
|
android:id="@+id/textView5"
|
||||||
@@ -184,36 +231,24 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="我的闹钟"
|
android:text="健康码"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/tv_add"
|
android:layout_width="100dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/tv_background"
|
android:scaleType="fitCenter"
|
||||||
android:gravity="center_horizontal"
|
android:src="@drawable/health_code"
|
||||||
android:text="添加闹钟"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="15sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rv_clock"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView5" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -294,9 +329,9 @@
|
|||||||
android:layout_width="32dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:src="@drawable/wifi_icon"
|
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/wifi_icon"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|||||||
27
app/src/main/res/layout-port/fragment_second.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".fragment.SecondFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:layout_height="0dp">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:layout_height="0dp">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.3 KiB |