引言
本周恰巧是开发周期的中期,我们按部就班有条不紊的按照原计划进行开发,这一阶段我们主要的任务有以下几个方面:
- DAO层的代码重写与解耦
- 评论功能+我的消息
我的主要功能工作就是与客户端的开发人员及时进行沟通并且进行页面调整,详细状况如下:
评论功能+我的消息
1、评价界面可以让监督flag的好友们对flag进行评价,包括是否完成以及评语,
xml文件如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
android:padding="0dp">
<ImageButton
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentLeft="true"
android:background="@drawable/toolbar_back_bg"
android:onClick="CommentBack"
android:src="?attr/homeAsUpIndicator" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="评论"
android:textColor="@color/black"
android:textSize="19sp" />
</RelativeLayout>
<ListView
android:id="@+id/comment_lv"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
视图:
我的好友消息的Activity为SuperViseJudgeActivity
这段代码是从服务器获取数据后的回掉函数,根据服务器返回的参数不同,进行不同的操作,如返回1,即评论成功,返回2即为已经评论过。
2、@我的消息界面:
@我的消息界面显示的是邀请我作为flag监督人的好友请求。
Xml代码如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/activity_bg_gray"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
android:padding="0dp">
<ImageButton
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentLeft="true"
android:background="@drawable/toolbar_back_bg"
android:onClick="myMessageSuperviseBack"
android:src="?attr/homeAsUpIndicator" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="\@我的消息"
android:textColor="@color/black"
android:textSize="19sp" />
</RelativeLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/supervise_swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp">
<ListView
android:id="@+id/myMessageSuperViseListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:background="@color/white" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
代码中包含一个SwipeRefreshLayout,用于刷新ListView,ListView中显示具体的消息,主视图与具体的item如下:
主视图 | Item |
---|---|
@我的消息界面Activity为SuperViseDetailActivity,功能:
在请求成功后,会取得服务器返回的每条数据信息,然后将每一条数据包装在bean中,传到listview的adapter中,从而可以创建每一个item视图,然后显示出来。
代码编写完后,我们进行了代码互测,针对不同的输入信息,设计了多组测试数据,然后在真机上对每一组数据进行实际测试,检查后台返回数据是否,直到这两个功能的测试都运行无误。
同时,我也进行着MenuPath的移植工作,但是还没筛选出具体选用的步骤。
总结
本周的工作中,与客户端设计人员沟通交流的状况进展不叫顺利,但是在我MenuPath的移植过程中出现了一些兼容性的问题,比较头疼,希望下一周能够解决。