113
-        });
92
+        sessionsRecyclerView.setVisibility(android.view.View.GONE);
93
+        noDataLayout.setVisibility(android.view.View.VISIBLE);
114 94
 
115 95
     }
116 96
 
117 97
     @Override
118 98
     public void showSessionViews() {
119
-        runOnUiThread(new Runnable() {
120
-            @Override
121
-            public void run() {
122
-                noDataLayout.setVisibility(android.view.View.GONE);
123
-                sessionsRecyclerView.setVisibility(android.view.View.VISIBLE);
124
-            }
125
-        });
126
-
99
+        noDataLayout.setVisibility(android.view.View.GONE);
100
+        sessionsRecyclerView.setVisibility(android.view.View.VISIBLE);
127 101
     }
128 102
 
129 103
     @Override
@@ -133,21 +107,12 @@ public class UploadActivity extends BaseActivity implements UploadContract.View
133 107
 
134 108
     @Override
135 109
     public void refreshSessionViews(final ArrayList<SessionBean> sessionList) {
136
-        runOnUiThread(new Runnable() {
137
-            @Override
138
-            public void run() {
139
-                adapter.clear();
140
-                adapter.addSessionBeans(sessionList);
141
-            }
142
-        });
110
+        adapter.clear();
111
+        adapter.addSessionBeans(sessionList);
143 112
     }
144 113
 
145 114
 
146
-    public void jumpToSelectedSession(SessionBean sessionBean) {
147
-        sessionBean.lensmanId = Preferences.getInstance(this).getLensManId();
148
-        sessionBean.sessionDate=20160813;
149
-        sessionBean.sessionSeq = new Random().nextInt(10000);
150
-        sessionBean.sessionId ="chengzhenyu_test"+sessionBean.sessionSeq;
115
+    private void jumpToSelectedSession(SessionBean sessionBean) {
151 116
         Intent intent = new Intent(this, SessionActivity.class);
152 117
         intent.putExtra("session",sessionBean);
153 118
         startActivity(intent);

+ 3 - 3
app/src/main/java/ai/pai/lensman/upload/UploadContract.java

@@ -14,8 +14,8 @@ public class UploadContract {
14 14
     interface View extends BaseView {
15 15
 
16 16
         void addNewSessionView(SessionBean bean);
17
-        void showBTDisconnectedView();
18
-        void showBTConnectedView();
17
+        void showBoxDisconnectedView();
18
+        void showBoxConnectedView();
19 19
         void showEmptyView();
20 20
         void showSessionViews();
21 21
         void updateSessionUploadView(SessionBean bean);
@@ -23,7 +23,7 @@ public class UploadContract {
23 23
     }
24 24
 
25 25
     interface Presenter extends BasePresenter{
26
-
26
+        SessionBean createNewSession();
27 27
     }
28 28
 
29 29
 }

+ 15 - 2
app/src/main/java/ai/pai/lensman/upload/UploadPresenter.java

@@ -8,10 +8,12 @@ public class UploadPresenter implements UploadContract.Presenter {
8 8
 
9 9
     private UploadContract.View uploadView;
10 10
     private ArrayList<SessionBean> sessionList;
11
+    private String lensmanId;
12
+    private int sessionSeq;
11 13
 
12
-
13
-    public UploadPresenter( UploadContract.View view){
14
+    public UploadPresenter(UploadContract.View view,String lensmanId){
14 15
         this.uploadView = view;
16
+        this.lensmanId = lensmanId;
15 17
         sessionList = new ArrayList<>();
16 18
     }
17 19
 
@@ -24,6 +26,7 @@ public class UploadPresenter implements UploadContract.Presenter {
24 26
             uploadView.showSessionViews();
25 27
             uploadView.refreshSessionViews(sessionList);
26 28
         }
29
+        sessionSeq = sessionList.size();
27 30
     }
28 31
 
29 32
     @Override
@@ -31,4 +34,14 @@ public class UploadPresenter implements UploadContract.Presenter {
31 34
 
32 35
     }
33 36
 
37
+    @Override
38
+    public SessionBean createNewSession() {
39
+        SessionBean sessionBean = new SessionBean();
40
+        sessionBean.lensmanId = lensmanId;
41
+        sessionBean.sessionDate=20160813;
42
+        sessionBean.sessionSeq = sessionSeq+1;
43
+        sessionBean.sessionId ="chengzhenyu_test"+sessionBean.sessionSeq;
44
+        sessionList.add(sessionBean);
45
+        return sessionBean;
46
+    }
34 47
 }

+ 3 - 10
app/src/main/res/layout/activity_session.xml

@@ -76,17 +76,10 @@
76 76
         android:layout_height="match_parent"
77 77
         android:layout_below="@id/title_bar_with_back_btn">
78 78
 
79
-        <android.support.v4.widget.SwipeRefreshLayout
80
-            android:id="@+id/refresh_layout"
79
+        <android.support.v7.widget.RecyclerView
80
+            android:id="@+id/recycler_view_photos"
81 81
             android:layout_width="match_parent"
82
-            android:layout_height="match_parent">
83
-
84
-            <android.support.v7.widget.RecyclerView
85
-                android:id="@+id/recycler_view_photos"
86
-                android:layout_width="match_parent"
87
-                android:layout_height="match_parent" />
88
-
89
-        </android.support.v4.widget.SwipeRefreshLayout>
82
+            android:layout_height="match_parent" />
90 83
 
91 84
         <ImageButton
92 85
             android:id="@+id/btn_session_complete"

+ 7 - 13
app/src/main/res/layout/activity_upload.xml

@@ -21,7 +21,7 @@
21 21
                 android:layout_height="32dp"
22 22
                 android:layout_gravity="center_vertical"
23 23
                 android:layout_marginLeft="6dp"
24
-                android:src="@drawable/ic_launcher" />
24
+                android:src="@drawable/logo" />
25 25
 
26 26
             <TextView
27 27
                 android:layout_width="0dp"
@@ -43,18 +43,12 @@
43 43
         android:layout_centerInParent="true"
44 44
         android:src="@drawable/no_photo_tip" />
45 45
 
46
-    <android.support.v4.widget.SwipeRefreshLayout
47
-        android:id="@+id/swipe_refresh_layout_sessions"
46
+    <android.support.v7.widget.RecyclerView
47
+        android:id="@+id/recycler_view_sessions"
48 48
         android:layout_width="match_parent"
49 49
         android:layout_height="match_parent"
50
-        android:layout_below="@id/title_layout">
50
+        android:layout_below="@id/title_layout"/>
51 51
 
52
-        <android.support.v7.widget.RecyclerView
53
-            android:id="@+id/recycler_view_sessions"
54
-            android:layout_width="match_parent"
55
-            android:layout_height="match_parent" />
56
-
57
-    </android.support.v4.widget.SwipeRefreshLayout>
58 52
 
59 53
     <RelativeLayout
60 54
         android:layout_width="match_parent"
@@ -75,7 +69,7 @@
75 69
                 android:gravity="center_horizontal">
76 70
 
77 71
                 <ImageView
78
-                    android:id="@+id/iv_bt_status"
72
+                    android:id="@+id/iv_box_status"
79 73
                     android:layout_width="24dp"
80 74
                     android:layout_height="24dp"
81 75
                     android:layout_centerHorizontal="true"
@@ -83,10 +77,10 @@
83 77
                     android:src="@drawable/wifi_connect" />
84 78
 
85 79
                 <TextView
86
-                    android:id="@+id/tv_bt_status"
80
+                    android:id="@+id/tv_box_status"
87 81
                     android:layout_width="wrap_content"
88 82
                     android:layout_height="wrap_content"
89
-                    android:layout_below="@id/iv_bt_status"
83
+                    android:layout_below="@id/iv_box_status"
90 84
                     android:layout_centerHorizontal="true"
91 85
                     android:text="@string/bt_connected"
92 86
                     android:textColor="@color/grey"

kodo - Gogs: Go Git Service

暂无描述

contactus.html 4.9KB

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title>拍爱 PAI.AI 联系我们</title> <meta name="keywords" content="摄影 图片 影像 分享 交流 社交 交友 摄影师 女性 孩子 亲子 旅行 旅游 约拍 iphone android app" /> <link href="css/layout.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.min.js"></script> <style> .my-map { margin: 0 auto 30px auto; width: 550px; height: 350px;float:left} .my-map .icon { background: url(http://lbs.amap.com/console/public/show/marker.png) no-repeat; } .my-map .icon-cir { height: 31px; width: 28px; } .my-map .icon-cir-red { background-position: -11px -5px; } </style> </head> <body> <div id="header"> <div class="content"> <a href="index.html" target="_self" class="logo"></a> <div class="navigation"> <a href="contactus.html" target="_self" class="current">联系我们</a> <a href="joinus.html" target="_self" >加入拍爱</a> <a href="aboutus.html" target="_self" >关于我们</a> <a href="index.html" target="_self" >首页</a> </div> </div> </div> <div id="container" ><div class="content contactus"> <div id="wrap" class="my-map map"> <div id="mapContainer"></div> </div> <script src="http://webapi.amap.com/maps?v=1.2&key=8325164e247e15eea68b59e89200988b"></script> <script> !function(){ var infoWindow, map, level = 16, center = {lng: 116.284361, lat: 39.931229}, features = [{type: "Marker", name: "拍爱 PAI.AI", desc: "北京市海淀区西八里庄路玲珑商务楼", color: "red", icon: "cir", offset: {x: -9, y: -31}, lnglat: {lng: 116.28449, lat: 39.930834}}]; function loadFeatures(){ for(var feature, data, i = 0, len = features.length, j, jl, path; i < len; i++){ data = features[i]; switch(data.type){ case "Marker": feature = new AMap.Marker({ map: map, position: new AMap.LngLat(data.lnglat.lng, data.lnglat.lat), zIndex: 3, extData: data, offset: new AMap.Pixel(data.offset.x, data.offset.y), title: data.name, content: '<div class="icon icon-' + data.icon + ' icon-'+ data.icon +'-' + data.color +'"></div>' }); break; case "Polyline": for(j = 0, jl = data.lnglat.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.lnglat[j].lng, data.lnglat[j].lat)); } feature = new AMap.Polyline({ map: map, path: path, extData: data, zIndex: 2, strokeWeight: data.strokeWeight, strokeColor: data.strokeColor, strokeOpacity: data.strokeOpacity }); break; case "Polygon": for(j = 0, jl = data.lnglat.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.lnglat[j].lng, data.lnglat[j].lat)); } feature = new AMap.Polygon({ map: map, path: path, extData: data, zIndex: 1, strokeWeight: data.strokeWeight, strokeColor: data.strokeColor, strokeOpacity: data.strokeOpacity, fillColor: data.fillColor, fillOpacity: data.fillOpacity }); break; default: feature = null; } if(feature){ AMap.event.addListener(feature, "click", mapFeatureClick); } } } function mapFeatureClick(e){ if(!infoWindow){ infoWindow = new AMap.InfoWindow({autoMove: true}); } var extData = e.target.getExtData(); infoWindow.setContent("<h5>" + extData.name + "</h5><div>" + extData.desc + "</div>"); infoWindow.open(map, e.lnglat); } map = new AMap.Map("mapContainer", {center: new AMap.LngLat(center.lng, center.lat), level: level}); loadFeatures(); map.plugin(["AMap.ToolBar", "AMap.OverView", "AMap.Scale"], function(){ map.addControl(new AMap.ToolBar); map.addControl(new AMap.OverView({isOpen: true})); map.addControl(new AMap.Scale); }); }(); </script> <p style="width:400px;float:right"><img src="img/weixin_qr.png" ><br><strong>关注拍爱 官方微信:</strong>pai_ai</p> <p style="width:400px;float:right"> <strong>商务合作:</strong>partner@pai.ai<br> <strong>用户反馈及帮助:</strong>feedback@pai.ai<br> <strong>公司地址:</strong>北京市海淀区西八里庄路玲珑商务楼 </p> </div></div> <div id="footer"> <div class="content foot"> <a href="aboutus.html" target="_self" >关于我们</a> <span>|</span> <a href="contactus.html" target="_self" >联系我们</a> ©2016 拍爱 PAI.AI 琼ICP备16000076号 </div> </div> </body> </html>