Commit 4e9e3f4551a9ee95f97f7d72252b8b5208ce0ab2

Authored by 卢小曼
1 parent dda03cc1

用户Demo添加查询多个用户方法和更新文档

.idea/gradle.xml
... ... @@ -3,8 +3,9 @@
3 3 <component name="GradleSettings">
4 4 <option name="linkedExternalProjectsSettings">
5 5 <GradleProjectSettings>
6   - <option name="distributionType" value="DEFAULT_WRAPPED" />
  6 + <option name="distributionType" value="LOCAL" />
7 7 <option name="externalProjectPath" value="$PROJECT_DIR$" />
  8 + <option name="gradleHome" value="E:\AndroidStudio\android_studio\gradle\gradle-3.3" />
8 9 <option name="modules">
9 10 <set>
10 11 <option value="$PROJECT_DIR$" />
... ...
.idea/modules.xml
... ... @@ -3,6 +3,8 @@
3 3 <component name="ProjectModuleManager">
4 4 <modules>
5 5 <module fileurl="file://$PROJECT_DIR$/CNUserDemo.iml" filepath="$PROJECT_DIR$/CNUserDemo.iml" />
  6 + <module fileurl="file://$PROJECT_DIR$/CNUserDemo.iml" filepath="$PROJECT_DIR$/CNUserDemo.iml" />
  7 + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
6 8 <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
7 9 </modules>
8 10 </component>
... ...
app/build.gradle
... ... @@ -2,7 +2,7 @@ apply plugin: &#39;com.android.application&#39;
2 2  
3 3 android {
4 4 compileSdkVersion 24
5   - buildToolsVersion "24.0.2"
  5 + buildToolsVersion '25.0.0'
6 6  
7 7 defaultConfig {
8 8 applicationId "com.cnlive.libs"
... ...
app/libs/libcnliveuser.jar
No preview for this file type
app/src/main/java/com/cnlive/libs/OtherActivity.java
... ... @@ -30,7 +30,7 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener
30 30  
31 31 private EditText feedbackMsg;
32 32 private Button feedback, uploadFace;
33   - private TextView modifyMobile, updateUserExtInfo, queryUserInfo, modifyUserInfo, modifyPwdWithMobile, bindThird, sendMessage;
  33 + private TextView modifyMobile, updateUserExtInfo, queryUserInfo, modifyUserInfo, modifyPwdWithMobile, bindThird, sendMessage,queryMoreUserInfo;
34 34  
35 35  
36 36 private String uid;
... ... @@ -81,6 +81,10 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener
81 81 // 找回或修改密码前发手机验证码
82 82 sendMessage = (TextView) findViewById(R.id.send_message);
83 83 sendMessage.setOnClickListener(this);
  84 +
  85 + //查询多条用户信息
  86 + queryMoreUserInfo = (TextView) findViewById(R.id.query_more_user_info);
  87 + queryMoreUserInfo.setOnClickListener(this);
84 88 }
85 89  
86 90 @Override
... ... @@ -484,6 +488,40 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener
484 488 }
485 489 }
486 490 });
  491 + break;
  492 + case R.id.query_more_user_info:
  493 + /**
  494 + * 查询多条用户信息
  495 + *
  496 + * @param uid 用户ID
  497 + * @param srcUids 被查询多个用户IDs(多个ID以英文,号分割)
  498 + * @param callback 回调
  499 + */
  500 + UserUtil.queryMoreUserInfo(uid, uid, new Callback() {
  501 + @Override
  502 + public void onState(int what, String extra, Object obj) {
  503 + switch (what){
  504 + case IUserService.SUCCESS:
  505 + //成功 obj返回用户信息
  506 + userData = (UserData) obj;
  507 + break;
  508 + case IUserService.ERROR_PARAM:
  509 + Log.e(TAG_QUERY_USER_INFO, IUserService.message_error_param);
  510 + break;
  511 + case IUserService.ERROR_TOKEN_INVALID:
  512 + Log.e(TAG_QUERY_USER_INFO, IUserService.message_error_token_invalid);
  513 + break;
  514 + case IUserService.ERROR_TOKEN_CHECKING:
  515 + Log.e(TAG_QUERY_USER_INFO, IUserService.message_error_token_checking);
  516 + break;
  517 + case IUserService.ERROR_NOT_FOUND_RECORD:
  518 + Log.e(TAG_QUERY_USER_INFO, IUserService.message_error_not_found_record);
  519 + break;
  520 + }
  521 +
  522 + }
  523 + });
  524 + break;
487 525 }
488 526 }
489 527 }
... ...
app/src/main/res/layout/activity_other.xml
... ... @@ -133,4 +133,21 @@
133 133  
134 134 </LinearLayout>
135 135  
  136 + <LinearLayout
  137 + android:layout_width="match_parent"
  138 + android:layout_height="wrap_content"
  139 + android:layout_below="@id/bottom_layout"
  140 + android:layout_marginTop="10dp"
  141 + android:orientation="horizontal">
  142 +
  143 + <TextView
  144 + android:id="@+id/query_more_user_info"
  145 + android:layout_width="0dp"
  146 + android:layout_height="wrap_content"
  147 + android:layout_weight="1"
  148 + android:text="查询多条用户信息"
  149 + android:textColor="#0000ff" />
  150 +
  151 + </LinearLayout>
  152 +
136 153 </RelativeLayout>
... ...
build.gradle
... ... @@ -5,7 +5,7 @@ buildscript {
5 5 jcenter()
6 6 }
7 7 dependencies {
8   - classpath 'com.android.tools.build:gradle:2.2.2'
  8 + classpath 'com.android.tools.build:gradle:2.3.0'
9 9  
10 10 // NOTE: Do not place your application dependencies here; they belong
11 11 // in the individual module build.gradle files
... ...
doc/用户Android+SDK+说明文档.pdf
No preview for this file type
gradle/wrapper/gradle-wrapper.properties
1   -#Mon Sep 26 10:33:04 CST 2016
  1 +#Thu Mar 23 17:32:33 CST 2017
2 2 distributionBase=GRADLE_USER_HOME
3 3 distributionPath=wrapper/dists
4 4 zipStoreBase=GRADLE_USER_HOME
5 5 zipStorePath=wrapper/dists
6   -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
  6 +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
... ...