Skip to content

Commit

Permalink
更新活动群设置的管理
Browse files Browse the repository at this point in the history
  • Loading branch information
luhuajcdd authored and luhuajcdd committed Aug 3, 2015
1 parent 068e6b5 commit 2a832b9
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 24 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/parttime/IM/ChatActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ public void more(View view) {
btnContainer.setVisibility(View.VISIBLE);
emojiIconContainer.setVisibility(View.GONE);
hideKeyboard();
btnMore.setBackgroundResource(R.drawable.search_clear_pressed);
//btnMore.setBackgroundResource(R.drawable.search_clear_pressed);
} else {
if (emojiIconContainer.getVisibility() == View.VISIBLE) {
emojiIconContainer.setVisibility(View.GONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.text.TextUtils;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
Expand All @@ -31,7 +32,7 @@
/**
* 简历容器
*/
public class ResumeContentContainer implements View.OnClickListener{
public class ResumeContentContainer implements View.OnClickListener, CompoundButton.OnCheckedChangeListener{
public RelativeLayout appraiseContainer; //评价title容器

public LinearLayout appraiseValueContainer,//评价容器
Expand Down Expand Up @@ -92,9 +93,10 @@ public void initView(View view){
cancelResume.setOnClickListener(this);
reject.setOnClickListener(this);
pass.setOnClickListener(this);
checkBox.setOnClickListener(this);
loadingMore.setOnClickListener(this);

checkBox.setOnCheckedChangeListener(this);

}

@Override
Expand Down Expand Up @@ -133,6 +135,9 @@ public void onClick(View v) {
new DefaultCallback(){
@Override
public void success(Object obj) {
reject.setEnabled(false);
pass.setEnabled(false);
cancelResume.setEnabled(false);
userDetailPagerAdapter.userIds.remove(userDetailFragment.userId);
userDetailPagerAdapter.cache.remove(userDetailFragment.userId);
activity.adapter.notifyDataSetChanged();
Expand All @@ -159,23 +164,40 @@ public void success(Object obj) {
case R.id.loading_more:
loadData();
break;

}
}


@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
switch (buttonView.getId()){
case R.id.expend_checked:
//网络加载数据,动态加载
appraiseValueContainer.setVisibility(View.VISIBLE);
loadingMore.setVisibility(View.VISIBLE);
loadData();
if(isChecked) {
//网络加载数据,动态加载
appraiseValueContainer.setVisibility(View.VISIBLE);
//loadingMore.setVisibility(View.VISIBLE);
loadData();
}else{
//网络加载数据,动态加载
appraiseValueContainer.setVisibility(View.GONE);
loadingMore.setVisibility(View.GONE);
}
break;
}
}


private void loadData() {
if(pager == null) {
pager = new Pager();
}else{
//if()
}

activity.showWait(true);
new UserDetailRequest().commentPage(userDetailFragment.userId,
pager.currentPage ++ , pager.pageCount,
pager.currentPage , pager.pageCount,
activity.queue,
new DefaultCallback(){
@Override
Expand All @@ -184,6 +206,7 @@ public void success(Object obj) {
CommentPage commentPage = (CommentPage)obj;
List<CommentPage.DetailItem> list = commentPage.list;
if(list != null){
pager.currentPage ++;
ArrayList<CommentVO> commentVOs = new ArrayList<>();
for (CommentPage.DetailItem detailItem : list){
if(detailItem == null){
Expand All @@ -196,11 +219,13 @@ public void success(Object obj) {
commentVOs.add(commentVO);
}
addCommentView(commentVOs);
if(commentPage.totalPage == commentPage.pageNumber){
loadingMore.setVisibility(View.GONE);
}else{
loadingMore.setVisibility(View.VISIBLE);
}

}
if(commentPage.totalPage == commentPage.pageNumber ||
commentPage.totalPage < commentPage.pageNumber){
loadingMore.setVisibility(View.GONE);
}else{
loadingMore.setVisibility(View.VISIBLE);
}
}
activity.showWait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
final UserDetailViewHelper helper = new UserDetailViewHelper(this, userDetailPagerAdapter);
UserDetailViewHelper.InitContent initContent = null;
if (BuildConfig.DEBUG) { //for test
userDetailPagerAdapter.fromAndStatus = UserDetailActivity.FromAndStatus.FROM_ACTIVITY_GROUP_AND_NOT_FINISH;
//userDetailPagerAdapter.fromAndStatus = UserDetailActivity.FromAndStatus.FROM_ACTIVITY_GROUP_AND_NOT_FINISH;
}
if (UserDetailActivity.FromAndStatus.FROM_NORMAL_GROUP_AND_FRIEND == userDetailPagerAdapter.fromAndStatus) {
initContent = UserDetailViewHelper.InitContent.INIT_FRIEND;
Expand Down
12 changes: 8 additions & 4 deletions app/src/main/java/com/parttime/net/GroupSettingRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void success(Object obj) {
callback.failed("");
return ;
}
try {
try {//unapproved_count=2
AppliantResult appliantResult = new AppliantResult();
appliantResult.approvedCount = js.getInt("approved_count");
appliantResult.unApprovedCount = js.getInt("unapproved_count");
Expand All @@ -65,10 +65,14 @@ public void success(Object obj) {
userVO.isCommented = jsonObject.getInt("is_commented");
userVO.earnestMoney = jsonObject.getInt("earnest_money");
userVO.certification = jsonObject.getInt("certification");
if(userVO.apply != UserVO.APPLY_REJECT) {
userVOs.add(userVO);
if(appliantResult.isEnd == AppliantResult.NO_END){
if(userVO.apply != UserVO.APPLY_REJECT) {
userVOs.add(userVO);
}else {
appliantResult.unApprovedCount--;
}
}else{
appliantResult.unApprovedCount --;
userVOs.add(userVO);
}
}
appliantResult.userList = userVOs;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_common_head.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="@dimen/height_top_bar"
android:background="@color/top_bar_normal_bg"
android:background="@drawable/shape_top_background"
android:gravity="center_vertical" >

<include layout="@layout/commom_back_btn" android:id="@+id/left_back"/>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/activity_group_setting_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
android:text=""
android:id="@+id/button"
android:layout_centerInParent="true"
android:layout_alignParentRight="true"
style="@style/ButtonInForm.BlueGray"
android:visibility="gone"/>

Expand All @@ -138,6 +139,7 @@
android:text=""
android:id="@+id/checkBox"
android:layout_centerInParent="true"
android:visibility="gone"/>
android:visibility="gone"
android:layout_alignParentRight="true" />
</RelativeLayout>
</LinearLayout>
15 changes: 12 additions & 3 deletions app/src/main/res/layout/activity_send_admit_to_email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@

<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/title_height"
android:layout_height="31dp"
android:text="@string/your_email"
android:paddingLeft="15dp"
android:layout_gravity="center_horizontal"
android:textSize="13sp"
android:gravity="center_vertical"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/form_item_height"
android:inputType="textEmailAddress"
android:ems="10"
android:id="@+id/email"
android:paddingLeft="15dp"
android:textSize="15sp"
android:background="@color/white"
android:hint="@string/enter_email"
android:layout_gravity="center_horizontal" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="40dp"
android:text="@string/done"
style="@style/FormOrangeButton"
android:paddingLeft="70dp"
android:paddingRight="70dp"
android:layout_marginTop="20dp"
android:id="@+id/done"
android:layout_gravity="center_horizontal" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_height="match_parent"
tools:context="com.parttime.addresslist.userdetail.UserDetailActivity"
android:orientation="vertical"
android:visibility="visible">
android:visibility="gone">


<TextView
Expand Down

0 comments on commit 2a832b9

Please sign in to comment.