FANGLH 8 years ago
parent
commit
1780b82f99

+ 3 - 0
WeiChat/src/main/AndroidManifest.xml

@@ -1042,6 +1042,9 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
+        <activity android:name="com.modular.appmessages.activity.UUSportActivity"
+            android:label="@string/set_sport"/>
+
     </application>
 
 </manifest>

+ 2 - 4
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MessageFragment.java

@@ -40,10 +40,10 @@ import com.lidroid.xutils.view.annotation.ViewInject;
 import com.modular.appmessages.activity.ProcessB2BActivity;
 import com.modular.appmessages.activity.ProcessMsgActivity;
 import com.modular.appmessages.activity.Subscription2Activity;
+import com.modular.appmessages.activity.UUSportActivity;
 import com.modular.appmessages.adapter.MessageAdapter;
 import com.modular.appmessages.presenter.MessagePresenter;
 import com.modular.appmessages.presenter.imp.IMessageView;
-import com.uas.appme.pedometer.view.NewStepActivity;
 import com.uas.appme.settings.Constant.Constant;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.platform.task.TaskActivity;
@@ -333,9 +333,7 @@ public class MessageFragment extends EasyFragment implements IMessageView, View.
 //                startActivityForResult(intent, REQUESTCODE);
 //                break;
             case R.id.uustep_rl:
-//                startActivity(new Intent(mContext, UURanking.class));
-
-                startActivity(new Intent(mContext, NewStepActivity.class));
+                startActivity(new Intent(mContext, UUSportActivity.class));
                 break;
         }
 

+ 1 - 0
app_core/common/src/main/java/com/core/app/AppConstant.java

@@ -69,6 +69,7 @@ public class AppConstant {
     public static final String NEW_FUNCTION_NOTICE = "NEW_FUNCTION_NOTICE";
 
     public static final String UPDATA_UUHELPER = "UPDATA_UUHELPER";
+    public static final String UUSPORT_PUSH = "UUSPORT_PUSH";
 
     public static final int RESULT_CODE = 0x865;
 }

+ 9 - 0
app_core/common/src/main/java/com/core/dao/UUSportDao.java

@@ -0,0 +1,9 @@
+package com.core.dao;
+
+/**
+ * Created by FANGlh on 2017/9/27.
+ * function:
+ */
+
+public class UUSportDao {
+}

+ 9 - 0
app_core/common/src/main/java/com/core/model/UUSportModel.java

@@ -0,0 +1,9 @@
+package com.core.model;
+
+/**
+ * Created by FANGlh on 2017/9/27.
+ * function:
+ */
+
+public class UUSportModel  {
+}

+ 6 - 1
app_modular/appme/src/main/AndroidManifest.xml

@@ -36,7 +36,12 @@
             android:name="com.uas.appme.other.activity.SelectAreaActivity"
             android:screenOrientation="portrait" />
         <activity android:name=".pedometer.view.UURanking"
-            android:label="排行榜"></activity>
+            android:label="排行榜">
+            <intent-filter>
+                <action android:name="com.modular.appme.UURanking"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+            </intent-filter>
+        </activity>
         <activity android:name=".pedometer.view.PersonalPageActivity"/>
     </application>
 </manifest>

+ 1 - 1
app_modular/appme/src/main/java/com/uas/appme/pedometer/view/NewStepActivity.java

@@ -271,7 +271,7 @@ public class NewStepActivity extends BaseActivity implements Handler.Callback {
         stepEntityList.addAll(stepDataDao.getAllDatas());
         // TODO: 在这里获取历史记录条数,当条数达到7条或以上时,显示更多历史记录
 //        if (stepEntityList.size() >= 7) {
-//            steps_history_ll.setVisibility(View.VISIBLE);
+            steps_history_ll.setVisibility(View.GONE);
 //        }else {
 //            steps_history_ll.setVisibility(View.GONE);
 //        }

BIN
app_modular/appme/src/main/res/drawable-xxhdpi/rankb.jpg


+ 2 - 1
app_modular/appme/src/main/res/layout/personal_page_activity.xml

@@ -158,7 +158,8 @@
             android:layout_marginTop="20dp"
             android:layout_width="match_parent"
             android:layout_height="300dp"
-            android:background="#48D1CC">
+            android:background="#48D1CC"
+            android:layout_marginBottom="20dp">
             <lecho.lib.hellocharts.view.LineChartView
                 android:id="@+id/line_chart"
                 android:layout_width="match_parent"

+ 79 - 0
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/UUSportActivity.java

@@ -0,0 +1,79 @@
+package com.modular.appmessages.activity;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Bundle;
+import android.support.v4.content.LocalBroadcastManager;
+import android.support.v7.widget.DefaultItemAnimator;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+
+import com.core.app.AppConstant;
+import com.core.base.BaseActivity;
+import com.core.model.UUSportModel;
+import com.modular.appmessages.R;
+import com.modular.appmessages.adapter.UUSportAdapter;
+
+import java.util.List;
+
+/**
+ * Created by FANGlh on 2017/9/27.
+ * function:
+ */
+
+public class UUSportActivity extends BaseActivity implements View.OnClickListener {
+    private RecyclerView contentRV;
+    private UUSportAdapter mAdapter;
+    private BroadcastReceiver updateReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            initData();
+        }
+    };
+    private LinearLayoutManager manager;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_uusport);
+        LocalBroadcastManager.getInstance(this).registerReceiver(updateReceiver, new IntentFilter(AppConstant.UUSPORT_PUSH));
+        initView();
+        initData();
+    }
+
+    private void initData() {
+//        List<UUSportModel> models = UUSportDao.getInstance().getAllModels();
+        List<UUSportModel> models = null;
+        showModel(models);
+    }
+    private void showModel(final List<UUSportModel> models) {
+        if (mAdapter == null) {
+            mAdapter = new UUSportAdapter(ct, models);
+            contentRV.setAdapter(mAdapter);
+        } else {
+            mAdapter.setModels(models);
+            mAdapter.notifyDataSetChanged();
+        }
+//        ViewUtils.move2Position(manager, contentRV, ListUtils.getSize(models) - 1);
+    }
+    private void initView() {
+        contentRV = (RecyclerView) findViewById(R.id.contentRV);
+        contentRV.setItemAnimator(new DefaultItemAnimator());
+        manager = new LinearLayoutManager(ct);
+        contentRV.setLayoutManager(manager);
+
+        findViewById(R.id.step_rank_ll).setOnClickListener(this);
+    }
+
+    @Override
+    public void onClick(View v) {
+       if (v.getId() == R.id.step_rank_ll){
+           startActivity(new Intent("com.modular.appme.UURanking"));
+           ToastMessage("step_rank_ll");
+       }
+    }
+}

+ 55 - 0
app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/UUSportAdapter.java

@@ -0,0 +1,55 @@
+package com.modular.appmessages.adapter;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.ViewGroup;
+
+import com.core.model.UUSportModel;
+
+import java.util.List;
+
+/**
+ * Created by FANGlh on 2017/9/27.
+ * function:
+ */
+
+public class UUSportAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+    private Context ct;
+    private List<UUSportModel> models;
+    private LayoutInflater inflater;
+
+    public UUSportAdapter(Context ct, List<UUSportModel> models) {
+        this.ct = ct;
+        this.models = models;
+    }
+
+    public List<UUSportModel> getModels() {
+        return models;
+    }
+    public void setModels(List<UUSportModel> models) {
+        this.models = models;
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return position;
+    }
+
+
+
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        return null;
+    }
+
+    @Override
+    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
+
+    }
+
+    @Override
+    public int getItemCount() {
+        return 0;
+    }
+}

+ 36 - 0
app_modular/appmessages/src/main/res/layout/activity_uusport.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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"
+    android:background="@color/base_bg"
+   >
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/contentRV"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="10dp"
+        android:layout_above="@id/operationLL"
+        android:layout_alignParentTop="true" />
+
+    <LinearLayout
+        android:id="@+id/step_rank_ll"
+        android:layout_alignParentBottom="true"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:orientation="vertical">
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line"/>
+        <TextView
+            android:id="@+id/invite_friends_tv"
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:text="步数排行榜"
+            android:gravity="center"
+            android:textColor="@color/black"
+            />
+    </LinearLayout>
+</RelativeLayout>