Commit 3fe478bb7e604a098d2019c4afd6e381787281fc
1 parent
fa8ea94a
我的成绩页面跳转,分享成绩页面跳转,我的活动页面跳转
Showing
16 changed files
with
669 additions
and
2 deletions
moudle_pedometer/src/main/AndroidManifest.xml
| ... | ... | @@ -52,7 +52,9 @@ |
| 52 | 52 | android:required="true" /> |
| 53 | 53 | |
| 54 | 54 | <application android:persistent="true"> |
| 55 | - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity"></activity> | |
| 55 | + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity"></activity> | |
| 56 | + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity" /> | |
| 57 | + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity" /> | |
| 56 | 58 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity" /> |
| 57 | 59 | |
| 58 | 60 | <service | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/MyRecordPresenter.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.frame.presenter; | |
| 2 | + | |
| 3 | +import com.cnlive.moudle.pedometer.frame.view.MyRecordView; | |
| 4 | +import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * Created by hanyayun 019/05/30. | |
| 8 | + */ | |
| 9 | +public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | |
| 10 | + | |
| 11 | + public void getData(){ | |
| 12 | + getView().setData(); | |
| 13 | + } | |
| 14 | +} | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/MyRecordView.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.frame.view; | |
| 2 | + | |
| 3 | +import android.support.v7.widget.LinearLayoutManager; | |
| 4 | +import android.view.View; | |
| 5 | + | |
| 6 | +import com.cnlive.moudle.pedometer.ui.adapter.MyRecordAdapter; | |
| 7 | +import com.cnlive.moudle.pedometer.ui.fragment.MyRecordFragment; | |
| 8 | +import com.hannesdorfmann.mosby3.mvp.MvpView; | |
| 9 | + | |
| 10 | +import java.util.ArrayList; | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * Created by hanyayun 019/05/30. | |
| 15 | + */ | |
| 16 | +public class MyRecordView implements MvpView { | |
| 17 | + | |
| 18 | + private MyRecordFragment fragment; | |
| 19 | + | |
| 20 | + public MyRecordView(MyRecordFragment fragment) { | |
| 21 | + this.fragment = fragment; | |
| 22 | + } | |
| 23 | + | |
| 24 | + | |
| 25 | + public void setData(){ | |
| 26 | + List<String> list = new ArrayList<>(); | |
| 27 | + list.add("fff"); | |
| 28 | + list.add("fff"); | |
| 29 | + list.add("fff"); | |
| 30 | + list.add("fff"); | |
| 31 | + fragment.binding.myRecordRecy.setAdapter(new MyRecordAdapter(list,fragment.getActivity())); | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void initView(){ | |
| 35 | + fragment.binding.myRecordRecy.setLayoutManager(new LinearLayoutManager(fragment.getActivity())); | |
| 36 | +// fragment.binding.myRecordRecy.setAdapter(); | |
| 37 | + } | |
| 38 | + | |
| 39 | + private void showEmpty(){ | |
| 40 | + fragment.binding.myRecordRecy.setVisibility(View.GONE); | |
| 41 | + fragment.binding.empty.setVisibility(View.VISIBLE); | |
| 42 | +// fragment.binding.empty.setImage(R.drawable.history_zw_zt); | |
| 43 | + fragment.binding.empty.setLoadingShowing(false); | |
| 44 | + fragment.binding.empty.setDetailText("当前还没有相关活动哦~"); | |
| 45 | + fragment.binding.empty.setTitleText("没有相关活动"); | |
| 46 | + } | |
| 47 | +} | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RaceRecorView.java
| ... | ... | @@ -4,6 +4,7 @@ import android.support.v7.widget.LinearLayoutManager; |
| 4 | 4 | import android.view.View; |
| 5 | 5 | |
| 6 | 6 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 7 | +import com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity; | |
| 7 | 8 | import com.cnlive.moudle.pedometer.ui.adapter.RaceRecordAdapter; |
| 8 | 9 | import com.cnlive.moudle.pedometer.ui.fragment.RaceRecorFragment; |
| 9 | 10 | import com.example.moudle_pedometer.R; |
| ... | ... | @@ -41,7 +42,7 @@ public class RaceRecorView implements MvpView { |
| 41 | 42 | fragment.binding.topbar.addRightImageButton(R.drawable.location_message, R.id.fragment_more) |
| 42 | 43 | .setOnClickListener(v -> { |
| 43 | 44 | //分享 |
| 44 | - | |
| 45 | + ShareRecordActivity.newInstance(fragment.getActivity()); | |
| 45 | 46 | }); |
| 46 | 47 | } |
| 47 | 48 | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/MyRecordActivity.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.activity; | |
| 2 | + | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Intent; | |
| 5 | +import android.support.annotation.Nullable; | |
| 6 | +import android.support.design.widget.TabLayout; | |
| 7 | +import android.support.v4.app.Fragment; | |
| 8 | +import android.support.v4.app.FragmentPagerAdapter; | |
| 9 | +import android.support.v4.view.ViewPager; | |
| 10 | +import android.support.v7.app.AppCompatActivity; | |
| 11 | +import android.os.Bundle; | |
| 12 | + | |
| 13 | +import com.cnlive.libs.base.util.StatusBarUtil; | |
| 14 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 15 | +import com.cnlive.moudle.pedometer.ui.fragment.MyRecordFragment; | |
| 16 | +import com.example.moudle_pedometer.R; | |
| 17 | +import com.qmuiteam.qmui.widget.QMUITopBar; | |
| 18 | + | |
| 19 | +import java.util.ArrayList; | |
| 20 | +import java.util.List; | |
| 21 | + | |
| 22 | +/** | |
| 23 | + * 我的活动 | |
| 24 | + * Created by hanyayun 019/05/30. | |
| 25 | + */ | |
| 26 | +public class MyRecordActivity extends AppCompatActivity { | |
| 27 | + | |
| 28 | + private QMUITopBar topBar; | |
| 29 | + private List<String> titleList; | |
| 30 | + private List<Fragment> fragmentList; | |
| 31 | + private TabLayout tabs; | |
| 32 | + private ViewPager viewPager; | |
| 33 | + | |
| 34 | + public static void newInstance(Activity context){ | |
| 35 | + Intent intent = new Intent(context,MyRecordActivity.class); | |
| 36 | + context.startActivity(intent); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + protected void onCreate(Bundle savedInstanceState) { | |
| 41 | + super.onCreate(savedInstanceState); | |
| 42 | + StatusBarUtil.setStatusBarWrite(this); | |
| 43 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); | |
| 44 | + setContentView(R.layout.activity_my_record); | |
| 45 | + | |
| 46 | + topBar = findViewById(R.id.topbar); | |
| 47 | + tabs = findViewById(R.id.tabs); | |
| 48 | + viewPager = findViewById(R.id.viewpager); | |
| 49 | + | |
| 50 | + topBar.setTitle("我的活动"); | |
| 51 | + topBar.addLeftImageButton(R.drawable.top_back_black, R.id.fragment_back).setOnClickListener(v -> { | |
| 52 | + finish(); | |
| 53 | + }); | |
| 54 | + | |
| 55 | + titleList = new ArrayList<>(); | |
| 56 | + titleList.add("进行中的活动"); | |
| 57 | + titleList.add("已结束的活动"); | |
| 58 | + | |
| 59 | + fragmentList = new ArrayList<>(); | |
| 60 | + fragmentList.add(new MyRecordFragment()); | |
| 61 | + fragmentList.add(new MyRecordFragment()); | |
| 62 | + | |
| 63 | + tabs.addTab(tabs.newTab(),0); | |
| 64 | + tabs.addTab(tabs.newTab(),1); | |
| 65 | + | |
| 66 | + tabs.setupWithViewPager(viewPager); | |
| 67 | + viewPager.setAdapter(mAdapter); | |
| 68 | + } | |
| 69 | + | |
| 70 | + FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(getSupportFragmentManager()) { | |
| 71 | + @Override | |
| 72 | + public Fragment getItem(int i) { | |
| 73 | + return fragmentList.get(i); | |
| 74 | + } | |
| 75 | + | |
| 76 | + @Override | |
| 77 | + public int getCount() { | |
| 78 | + return fragmentList.size(); | |
| 79 | + } | |
| 80 | + | |
| 81 | + @Nullable | |
| 82 | + @Override | |
| 83 | + public CharSequence getPageTitle(int position) { | |
| 84 | + return titleList.get(position); | |
| 85 | + } | |
| 86 | + }; | |
| 87 | +} | |
| 88 | + | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/ShareRecordActivity.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.activity; | |
| 2 | + | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Intent; | |
| 5 | +import android.support.v7.app.AppCompatActivity; | |
| 6 | +import android.os.Bundle; | |
| 7 | +import android.widget.ImageView; | |
| 8 | +import android.widget.TextView; | |
| 9 | + | |
| 10 | +import com.cnlive.libs.base.util.StatusBarUtil; | |
| 11 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 12 | +import com.example.moudle_pedometer.R; | |
| 13 | +import com.qmuiteam.qmui.widget.QMUITopBar; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * | |
| 17 | + * Created by hanyayun 019/05/30. | |
| 18 | + */ | |
| 19 | +public class ShareRecordActivity extends AppCompatActivity { | |
| 20 | + | |
| 21 | + private ImageView share_back; | |
| 22 | + private TextView share; | |
| 23 | + public static void newInstance(Activity context){ | |
| 24 | + Intent intent = new Intent(context,ShareRecordActivity.class); | |
| 25 | + context.startActivity(intent); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + protected void onCreate(Bundle savedInstanceState) { | |
| 30 | + super.onCreate(savedInstanceState); | |
| 31 | + StatusBarUtil.setStatusBarWrite(this); | |
| 32 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.green_round), 0); | |
| 33 | + setContentView(R.layout.activity_share_record); | |
| 34 | + | |
| 35 | + share_back = findViewById(R.id.share_back); | |
| 36 | + share = findViewById(R.id.share); | |
| 37 | + share_back.setOnClickListener(v -> finish()); | |
| 38 | + share.setOnClickListener(v -> share()); | |
| 39 | + } | |
| 40 | + | |
| 41 | + private void share(){ | |
| 42 | + MyRecordActivity.newInstance(this); | |
| 43 | + } | |
| 44 | +} | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/MyRecordAdapter.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.adapter; | |
| 2 | + | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Context; | |
| 5 | +import android.support.annotation.NonNull; | |
| 6 | +import android.support.v7.widget.RecyclerView; | |
| 7 | +import android.view.LayoutInflater; | |
| 8 | +import android.view.View; | |
| 9 | +import android.view.ViewGroup; | |
| 10 | +import android.widget.TextView; | |
| 11 | + | |
| 12 | + | |
| 13 | +import com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity; | |
| 14 | +import com.example.moudle_pedometer.R; | |
| 15 | + | |
| 16 | +import java.util.ArrayList; | |
| 17 | +import java.util.List; | |
| 18 | +/** | |
| 19 | + * Created by hanyayun 019/05/31. | |
| 20 | + */ | |
| 21 | +public class MyRecordAdapter extends RecyclerView.Adapter<MyRecordAdapter.MyViewHolder> { | |
| 22 | + | |
| 23 | + private List<String> list = new ArrayList<>(); | |
| 24 | + private Activity context; | |
| 25 | + | |
| 26 | + public MyRecordAdapter(List<String> list, Activity context) { | |
| 27 | + this.list = list; | |
| 28 | + this.context = context; | |
| 29 | + } | |
| 30 | + | |
| 31 | + @NonNull | |
| 32 | + @Override | |
| 33 | + public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { | |
| 34 | + View view = LayoutInflater.from(context).inflate(R.layout.item_my_record,viewGroup,false); | |
| 35 | + return new MyViewHolder(view); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int i) { | |
| 40 | +// myViewHolder.discussionAvatarView.initDatas(mDatas); | |
| 41 | + myViewHolder.my_record.setOnClickListener(v -> RaceRecordActivity.newInstance(context)); | |
| 42 | +// myViewHolder.check_raking.setOnClickListener(v -> ); | |
| 43 | + } | |
| 44 | + | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public int getItemCount() { | |
| 48 | + return list.size(); | |
| 49 | + } | |
| 50 | + | |
| 51 | + class MyViewHolder extends RecyclerView.ViewHolder{ | |
| 52 | + | |
| 53 | + TextView check_raking; | |
| 54 | + TextView my_record; | |
| 55 | +// private DiscussionAvatarView discussionAvatarView; | |
| 56 | + public MyViewHolder(@NonNull View itemView) { | |
| 57 | + super(itemView); | |
| 58 | + check_raking = itemView.findViewById(R.id.check_raking); | |
| 59 | + my_record = itemView.findViewById(R.id.my_record); | |
| 60 | +// discussionAvatarView = itemView.findViewById(R.id.daview); | |
| 61 | + } | |
| 62 | + } | |
| 63 | +} | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/MyRecordFragment.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.fragment; | |
| 2 | + | |
| 3 | + | |
| 4 | +import android.os.Bundle; | |
| 5 | +import android.support.annotation.NonNull; | |
| 6 | +import android.support.annotation.Nullable; | |
| 7 | +import android.view.View; | |
| 8 | + | |
| 9 | +import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; | |
| 10 | +import com.cnlive.moudle.pedometer.frame.presenter.MyRecordPresenter; | |
| 11 | +import com.cnlive.moudle.pedometer.frame.view.MyRecordView; | |
| 12 | +import com.example.moudle_pedometer.R; | |
| 13 | +import com.example.moudle_pedometer.databinding.FragmentMyRecordBinding; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * Created by hanyayun 019/05/30. | |
| 17 | + */ | |
| 18 | +public class MyRecordFragment extends MvpBindingFragment<MyRecordView, MyRecordPresenter,Object, FragmentMyRecordBinding> { | |
| 19 | + | |
| 20 | + | |
| 21 | + public MyRecordFragment() { | |
| 22 | + // Required empty public constructor | |
| 23 | + } | |
| 24 | + | |
| 25 | + @Override | |
| 26 | + protected int getLayoutId() { | |
| 27 | + return R.layout.fragment_my_record; | |
| 28 | + } | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |
| 32 | + super.onViewCreated(view, savedInstanceState); | |
| 33 | + if(getMvpView() != null) getMvpView().initView(); | |
| 34 | + getPresenter().getData(); | |
| 35 | + } | |
| 36 | +} | ... | ... |
moudle_pedometer/src/main/res/drawable-hdpi/default_bg.png
0 → 100644
10.9 KB
moudle_pedometer/src/main/res/drawable-hdpi/erwe.png
0 → 100644
6.6 KB
moudle_pedometer/src/main/res/layout/activity_my_record.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 4 | + xmlns:tools="http://schemas.android.com/tools" | |
| 5 | + android:layout_width="match_parent" | |
| 6 | + android:layout_height="match_parent" | |
| 7 | + android:orientation="vertical" | |
| 8 | + tools:context="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity"> | |
| 9 | + | |
| 10 | + <com.qmuiteam.qmui.widget.QMUITopBar | |
| 11 | + android:id="@+id/topbar" | |
| 12 | + android:layout_width="match_parent" | |
| 13 | + android:layout_height="?attr/qmui_topbar_height" /> | |
| 14 | + | |
| 15 | + <android.support.design.widget.TabLayout | |
| 16 | + android:id="@+id/tabs" | |
| 17 | + android:layout_width="wrap_content" | |
| 18 | + android:layout_height="wrap_content" | |
| 19 | + app:tabIndicatorColor="#23D41E" | |
| 20 | + app:tabIndicatorHeight="2dp" | |
| 21 | + android:background="@color/white" | |
| 22 | + android:layout_gravity="center_horizontal" | |
| 23 | + app:tabMode="scrollable" | |
| 24 | + app:tabSelectedTextColor="#23D41E" | |
| 25 | + app:tabTextColor="#999999" /> | |
| 26 | + | |
| 27 | + <android.support.v4.view.ViewPager | |
| 28 | + android:id="@+id/viewpager" | |
| 29 | + android:layout_width="match_parent" | |
| 30 | + android:layout_height="match_parent" /> | |
| 31 | + | |
| 32 | + | |
| 33 | +</LinearLayout> | ... | ... |
moudle_pedometer/src/main/res/layout/activity_share_record.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 4 | + xmlns:tools="http://schemas.android.com/tools" | |
| 5 | + android:layout_width="match_parent" | |
| 6 | + android:layout_height="match_parent" | |
| 7 | + android:background="#5BC4A4" | |
| 8 | + tools:context="com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity"> | |
| 9 | + | |
| 10 | + <RelativeLayout | |
| 11 | + android:id="@+id/topbar" | |
| 12 | + android:layout_width="match_parent" | |
| 13 | + android:layout_height="48dp"> | |
| 14 | + | |
| 15 | + <ImageView | |
| 16 | + android:id="@+id/share_back" | |
| 17 | + android:layout_width="wrap_content" | |
| 18 | + android:layout_height="wrap_content" | |
| 19 | + android:padding="10dp" | |
| 20 | + android:layout_marginLeft="5dp" | |
| 21 | + android:src="@drawable/back" | |
| 22 | + android:layout_centerVertical="true" | |
| 23 | + /> | |
| 24 | + <TextView | |
| 25 | + android:layout_width="wrap_content" | |
| 26 | + android:layout_height="wrap_content" | |
| 27 | + android:text="@string/share" | |
| 28 | + android:textColor="@color/white" | |
| 29 | + android:textSize="15sp" | |
| 30 | + android:layout_centerInParent="true" | |
| 31 | + /> | |
| 32 | + | |
| 33 | + <TextView | |
| 34 | + android:id="@+id/share" | |
| 35 | + android:layout_width="wrap_content" | |
| 36 | + android:layout_height="wrap_content" | |
| 37 | + android:textColor="@color/white" | |
| 38 | + android:text="@string/containuue" | |
| 39 | + android:padding="10dp" | |
| 40 | + android:layout_marginRight="5dp" | |
| 41 | + android:layout_alignParentRight="true" | |
| 42 | + android:layout_centerVertical="true" | |
| 43 | + /> | |
| 44 | + </RelativeLayout> | |
| 45 | + <RelativeLayout | |
| 46 | + android:id="@+id/ry_cen" | |
| 47 | + android:layout_width="match_parent" | |
| 48 | + android:layout_height="wrap_content" | |
| 49 | + android:layout_below="@id/topbar" | |
| 50 | + android:layout_centerInParent="true" | |
| 51 | + android:layout_marginLeft="15dp" | |
| 52 | + android:layout_marginTop="50dp" | |
| 53 | + android:layout_marginRight="15dp" | |
| 54 | + android:background="#6CE0B6"> | |
| 55 | + | |
| 56 | + <RelativeLayout | |
| 57 | + android:id="@id/tv_pr" | |
| 58 | + android:layout_width="wrap_content" | |
| 59 | + android:layout_height="wrap_content" | |
| 60 | + android:padding="10dp"> | |
| 61 | + | |
| 62 | + <ImageView | |
| 63 | + android:id="@+id/record_icon" | |
| 64 | + android:layout_width="50dp" | |
| 65 | + android:layout_height="50dp" | |
| 66 | + android:src="@drawable/tz_icon" /> | |
| 67 | + | |
| 68 | + <TextView | |
| 69 | + android:id="@+id/record_name" | |
| 70 | + android:layout_width="wrap_content" | |
| 71 | + android:layout_height="wrap_content" | |
| 72 | + android:layout_marginLeft="20dp" | |
| 73 | + android:textColor="@color/white" | |
| 74 | + android:layout_toRightOf="@id/record_icon" | |
| 75 | + android:text="用户昵称" /> | |
| 76 | + | |
| 77 | + <TextView | |
| 78 | + android:id="@+id/record_line" | |
| 79 | + android:layout_width="wrap_content" | |
| 80 | + android:layout_height="wrap_content" | |
| 81 | + android:layout_below="@id/record_name" | |
| 82 | + android:textColor="@color/white" | |
| 83 | + android:layout_marginLeft="20dp" | |
| 84 | + android:layout_toRightOf="@id/record_icon" | |
| 85 | + android:text="我在奥森路线的最佳成绩" /> | |
| 86 | + </RelativeLayout> | |
| 87 | + | |
| 88 | + <LinearLayout | |
| 89 | + android:id="@+id/kilometer_ly" | |
| 90 | + android:layout_width="wrap_content" | |
| 91 | + android:layout_height="wrap_content" | |
| 92 | + android:layout_below="@id/tv_pr" | |
| 93 | + android:layout_marginLeft="10dp" | |
| 94 | + android:layout_marginTop="10dp" | |
| 95 | + android:orientation="vertical"> | |
| 96 | + | |
| 97 | + <TextView | |
| 98 | + android:id="@+id/kilometer" | |
| 99 | + android:layout_width="wrap_content" | |
| 100 | + android:layout_height="wrap_content" | |
| 101 | + android:textColor="@color/white" | |
| 102 | + android:text="1.53" /> | |
| 103 | + | |
| 104 | + <TextView | |
| 105 | + android:layout_width="wrap_content" | |
| 106 | + android:layout_height="wrap_content" | |
| 107 | + android:textColor="@color/white" | |
| 108 | + android:layout_below="@id/kilometer" | |
| 109 | + android:layout_marginTop="2dp" | |
| 110 | + android:text="@string/kilometer" /> | |
| 111 | + </LinearLayout> | |
| 112 | + | |
| 113 | + | |
| 114 | + <LinearLayout | |
| 115 | + android:id="@+id/foot_ly" | |
| 116 | + android:layout_width="wrap_content" | |
| 117 | + android:layout_height="wrap_content" | |
| 118 | + android:layout_below="@id/tv_pr" | |
| 119 | + android:layout_marginLeft="20dp" | |
| 120 | + android:layout_marginTop="10dp" | |
| 121 | + android:layout_toRightOf="@id/kilometer_ly" | |
| 122 | + android:orientation="vertical"> | |
| 123 | + | |
| 124 | + <TextView | |
| 125 | + android:id="@+id/foot" | |
| 126 | + android:layout_width="wrap_content" | |
| 127 | + android:layout_height="wrap_content" | |
| 128 | + android:textColor="@color/white" | |
| 129 | + android:text="1234" /> | |
| 130 | + | |
| 131 | + <TextView | |
| 132 | + android:layout_width="wrap_content" | |
| 133 | + android:layout_height="wrap_content" | |
| 134 | + android:textColor="@color/white" | |
| 135 | + android:layout_gravity="center" | |
| 136 | + android:layout_marginTop="2dp" | |
| 137 | + android:text="@string/foot" /> | |
| 138 | + </LinearLayout> | |
| 139 | + | |
| 140 | + <LinearLayout | |
| 141 | + android:layout_width="wrap_content" | |
| 142 | + android:layout_height="wrap_content" | |
| 143 | + android:layout_below="@id/tv_pr" | |
| 144 | + android:layout_marginLeft="20dp" | |
| 145 | + android:layout_marginTop="10dp" | |
| 146 | + android:layout_toRightOf="@id/foot_ly" | |
| 147 | + android:orientation="vertical"> | |
| 148 | + | |
| 149 | + <TextView | |
| 150 | + android:id="@+id/kilometer_time" | |
| 151 | + android:layout_width="wrap_content" | |
| 152 | + android:layout_height="wrap_content" | |
| 153 | + android:textColor="@color/white" | |
| 154 | + android:text="00:27:23" /> | |
| 155 | + | |
| 156 | + <TextView | |
| 157 | + android:layout_width="wrap_content" | |
| 158 | + android:layout_height="wrap_content" | |
| 159 | + android:textColor="@color/white" | |
| 160 | + android:layout_gravity="center" | |
| 161 | + android:layout_marginTop="2dp" | |
| 162 | + android:text="@string/kilometer" /> | |
| 163 | + </LinearLayout> | |
| 164 | + | |
| 165 | + <RelativeLayout | |
| 166 | + android:layout_width="match_parent" | |
| 167 | + android:layout_height="wrap_content" | |
| 168 | + android:layout_below="@id/kilometer_ly" | |
| 169 | + android:layout_marginTop="30dp" | |
| 170 | + android:background="@color/white" | |
| 171 | + android:padding="20dp"> | |
| 172 | + | |
| 173 | + <TextView | |
| 174 | + android:id="@+id/cord_name" | |
| 175 | + android:layout_width="wrap_content" | |
| 176 | + android:layout_height="wrap_content" | |
| 177 | + android:gravity="left" | |
| 178 | + android:text="用户在奥森南苑路线中的 | |
| 179 | +最佳个人成绩" /> | |
| 180 | + | |
| 181 | + <TextView | |
| 182 | + android:id="@+id/tv_tv" | |
| 183 | + android:layout_width="wrap_content" | |
| 184 | + android:layout_height="wrap_content" | |
| 185 | + android:layout_below="@id/cord_name" | |
| 186 | + android:layout_marginTop="10dp" | |
| 187 | + android:text="#心情标签#" /> | |
| 188 | + | |
| 189 | + <TextView | |
| 190 | + android:layout_width="wrap_content" | |
| 191 | + android:layout_height="wrap_content" | |
| 192 | + android:layout_below="@id/tv_tv" | |
| 193 | + android:layout_marginTop="7dp" | |
| 194 | + android:text="点击这里写下你的心情标签" /> | |
| 195 | + | |
| 196 | + <ImageView | |
| 197 | + android:layout_width="wrap_content" | |
| 198 | + android:layout_height="wrap_content" | |
| 199 | + android:layout_alignParentRight="true" | |
| 200 | + android:src="@drawable/erwe" /> | |
| 201 | + </RelativeLayout> | |
| 202 | + </RelativeLayout> | |
| 203 | + | |
| 204 | + <ImageView | |
| 205 | + android:layout_width="wrap_content" | |
| 206 | + android:layout_height="wrap_content" | |
| 207 | + android:layout_below="@id/ry_cen" | |
| 208 | + android:layout_marginTop="20dp" | |
| 209 | + android:layout_centerHorizontal="true" | |
| 210 | + android:src="@drawable/default_bg" /> | |
| 211 | +</RelativeLayout> | ... | ... |
moudle_pedometer/src/main/res/layout/fragment_my_record.xml
0 → 100644
| 1 | +<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
| 2 | + <RelativeLayout | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <android.support.v7.widget.RecyclerView | |
| 8 | + android:id="@+id/my_record_recy" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="match_parent"/> | |
| 11 | + | |
| 12 | + <com.cnlive.strike.ui.widget.UIEmptyView | |
| 13 | + android:id="@+id/empty" | |
| 14 | + android:layout_width="match_parent" | |
| 15 | + android:layout_height="match_parent" | |
| 16 | + android:visibility="gone" /> | |
| 17 | + </RelativeLayout> | |
| 18 | +</layout> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
moudle_pedometer/src/main/res/layout/fragment_race_recor.xml
| ... | ... | @@ -24,6 +24,7 @@ |
| 24 | 24 | android:id="@+id/tv_pr" |
| 25 | 25 | android:layout_width="wrap_content" |
| 26 | 26 | android:layout_height="wrap_content" |
| 27 | + android:textColor="@color/white" | |
| 27 | 28 | android:text="个人最佳成绩" /> |
| 28 | 29 | |
| 29 | 30 | <LinearLayout |
| ... | ... | @@ -38,11 +39,13 @@ |
| 38 | 39 | android:id="@+id/kilometer" |
| 39 | 40 | android:layout_width="wrap_content" |
| 40 | 41 | android:layout_height="wrap_content" |
| 42 | + android:textColor="@color/white" | |
| 41 | 43 | android:text="1.53" /> |
| 42 | 44 | |
| 43 | 45 | <TextView |
| 44 | 46 | android:layout_width="wrap_content" |
| 45 | 47 | android:layout_height="wrap_content" |
| 48 | + android:textColor="@color/white" | |
| 46 | 49 | android:layout_below="@id/kilometer" |
| 47 | 50 | android:layout_marginTop="2dp" |
| 48 | 51 | android:text="@string/kilometer" /> |
| ... | ... | @@ -63,11 +66,13 @@ |
| 63 | 66 | android:id="@+id/foot" |
| 64 | 67 | android:layout_width="wrap_content" |
| 65 | 68 | android:layout_height="wrap_content" |
| 69 | + android:textColor="@color/white" | |
| 66 | 70 | android:text="1234" /> |
| 67 | 71 | |
| 68 | 72 | <TextView |
| 69 | 73 | android:layout_width="wrap_content" |
| 70 | 74 | android:layout_height="wrap_content" |
| 75 | + android:textColor="@color/white" | |
| 71 | 76 | android:layout_gravity="center" |
| 72 | 77 | android:layout_marginTop="2dp" |
| 73 | 78 | android:text="@string/foot" /> |
| ... | ... | @@ -86,11 +91,13 @@ |
| 86 | 91 | android:id="@+id/kilometer_time" |
| 87 | 92 | android:layout_width="wrap_content" |
| 88 | 93 | android:layout_height="wrap_content" |
| 94 | + android:textColor="@color/white" | |
| 89 | 95 | android:text="00:27:23" /> |
| 90 | 96 | |
| 91 | 97 | <TextView |
| 92 | 98 | android:layout_width="wrap_content" |
| 93 | 99 | android:layout_height="wrap_content" |
| 100 | + android:textColor="@color/white" | |
| 94 | 101 | android:layout_gravity="center" |
| 95 | 102 | android:layout_marginTop="2dp" |
| 96 | 103 | android:text="@string/kilometer" /> | ... | ... |
moudle_pedometer/src/main/res/layout/item_my_record.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="wrap_content" | |
| 6 | + android:layout_margin="10dp" | |
| 7 | + android:background="@color/white" | |
| 8 | + android:orientation="vertical" | |
| 9 | + android:padding="10dp"> | |
| 10 | + | |
| 11 | + <TextView | |
| 12 | + android:layout_width="wrap_content" | |
| 13 | + android:layout_height="wrap_content" | |
| 14 | + android:text="首都师范大学田径场" /> | |
| 15 | + | |
| 16 | + <LinearLayout | |
| 17 | + android:layout_width="match_parent" | |
| 18 | + android:layout_height="wrap_content" | |
| 19 | + android:layout_marginTop="10dp"> | |
| 20 | + | |
| 21 | + <TextView | |
| 22 | + android:layout_width="wrap_content" | |
| 23 | + android:layout_height="wrap_content" | |
| 24 | + android:drawableLeft="@drawable/icon_search" | |
| 25 | + android:drawablePadding="5dp" | |
| 26 | + android:text="@string/record_time" /> | |
| 27 | + | |
| 28 | + <TextView | |
| 29 | + android:layout_width="wrap_content" | |
| 30 | + android:layout_height="wrap_content" | |
| 31 | + android:layout_marginLeft="10dp" | |
| 32 | + android:text="2019.05.01--2019.09.01" /> | |
| 33 | + </LinearLayout> | |
| 34 | + | |
| 35 | + <LinearLayout | |
| 36 | + android:layout_width="match_parent" | |
| 37 | + android:layout_height="wrap_content" | |
| 38 | + android:layout_marginTop="10dp"> | |
| 39 | + | |
| 40 | + <TextView | |
| 41 | + android:layout_width="wrap_content" | |
| 42 | + android:layout_height="wrap_content" | |
| 43 | + android:drawableLeft="@drawable/icon_search" | |
| 44 | + android:drawablePadding="5dp" | |
| 45 | + android:text="@string/record_place" /> | |
| 46 | + | |
| 47 | + <TextView | |
| 48 | + android:layout_width="wrap_content" | |
| 49 | + android:layout_height="wrap_content" | |
| 50 | + android:layout_marginLeft="10dp" | |
| 51 | + android:text="北京 首都师范大学 全长4.42公里" /> | |
| 52 | + </LinearLayout> | |
| 53 | + | |
| 54 | + <LinearLayout | |
| 55 | + android:layout_width="wrap_content" | |
| 56 | + android:layout_height="wrap_content" | |
| 57 | + android:layout_marginTop="10dp"> | |
| 58 | + | |
| 59 | + | |
| 60 | + <TextView | |
| 61 | + android:layout_width="wrap_content" | |
| 62 | + android:layout_height="wrap_content" | |
| 63 | + android:text="123人参与" | |
| 64 | + android:layout_marginLeft="10dp" | |
| 65 | + android:layout_gravity="center"/> | |
| 66 | + | |
| 67 | + </LinearLayout> | |
| 68 | + | |
| 69 | + <RelativeLayout | |
| 70 | + android:layout_width="wrap_content" | |
| 71 | + android:layout_height="wrap_content" | |
| 72 | + android:layout_marginTop="10dp"> | |
| 73 | + | |
| 74 | + <TextView | |
| 75 | + android:layout_width="wrap_content" | |
| 76 | + android:layout_height="wrap_content" | |
| 77 | + android:layout_centerVertical="true" | |
| 78 | + android:text="3天后结束" /> | |
| 79 | + | |
| 80 | + <TextView | |
| 81 | + android:id="@+id/check_raking" | |
| 82 | + android:layout_width="wrap_content" | |
| 83 | + android:layout_height="wrap_content" | |
| 84 | + android:layout_alignParentRight="true" | |
| 85 | + android:padding="10dp" | |
| 86 | + android:text="查看排行榜" | |
| 87 | + android:textColor="#23D41E" /> | |
| 88 | + | |
| 89 | + <TextView | |
| 90 | + android:id="@+id/my_record" | |
| 91 | + android:layout_width="wrap_content" | |
| 92 | + android:layout_height="wrap_content" | |
| 93 | + android:layout_marginRight="10dp" | |
| 94 | + android:layout_toLeftOf="@id/check_raking" | |
| 95 | + android:padding="10dp" | |
| 96 | + android:text="我的成绩" | |
| 97 | + android:textColor="#23D41E" /> | |
| 98 | + | |
| 99 | + </RelativeLayout> | |
| 100 | + | |
| 101 | +</LinearLayout> | |
| 0 | 102 | \ No newline at end of file | ... | ... |
moudle_pedometer/src/main/res/values/strings.xml