Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
1f09bb8e
Commit
1f09bb8e
authored
Sep 29, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Im 会员中心初次修改
parent
b55d27fc
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
239 additions
and
495 deletions
+239
-495
build.gradle
RvClient/build.gradle
+2
-2
WelcomeActivity.java
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
+29
-8
BaseActivity.java
...rc/main/java/com/ruiwenliu/wrapper/base/BaseActivity.java
+2
-9
OkHttpCreate.java
...rc/main/java/com/ruiwenliu/wrapper/http/OkHttpCreate.java
+0
-1
MemberCenterActivity.java
...ber/src/main/java/com/rv.member/MemberCenterActivity.java
+77
-76
shape_rv_bg_circle_white.xml
...member/src/main/res/drawable/shape_rv_bg_circle_white.xml
+5
-0
shape_rv_bg_top_unlogin.xml
..._member/src/main/res/drawable/shape_rv_bg_top_unlogin.xml
+10
-0
activity_member.xml
plugin_member/src/main/res/layout/activity_member.xml
+114
-399
No files found.
RvClient/build.gradle
View file @
1f09bb8e
...
...
@@ -8,8 +8,8 @@ android {
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
flavorDimensions
"default"
versionCode
1
46
versionName
"1.
4.6
"
versionCode
1
53
versionName
"1.
5.3
"
multiDexEnabled
true
...
...
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
View file @
1f09bb8e
...
...
@@ -7,6 +7,8 @@ import android.os.Bundle;
import
android.support.annotation.Nullable
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.base.utils.tools.android.NetworkUtil
;
import
com.ruiwenliu.wrapper.SPConstance
;
import
com.ruiwenliu.wrapper.base.BaseActivity
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -20,7 +22,9 @@ import com.rv.im.AppConfig;
import
com.rv.im.bean.ImConfig
;
import
com.rv.im.bean.ImConfigBean
;
import
com.yuyife.okgo.OkGoUtil
;
import
java.util.concurrent.TimeUnit
;
import
io.reactivex.Flowable
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.annotations.NonNull
;
...
...
@@ -30,6 +34,8 @@ import io.reactivex.functions.Consumer;
public
class
WelcomeActivity
extends
BaseActivity
<
CommonPresenter
>
{
private
Disposable
mDisposable
=
null
;
private
boolean
isImInitOk
=
false
;
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
if
(
requestType
==
0
)
{
...
...
@@ -37,6 +43,7 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
ImConfig
config
;
if
(
bean
!=
null
&&
bean
.
resultCode
==
1
&&
((
ImConfigBean
)
result
).
getData
()
!=
null
)
{
LogUtil
.
e
(
"zq"
,
"获取网络配置成功,使用服务端返回的配置并更新本地配置"
);
isImInitOk
=
true
;
config
=
bean
.
getData
();
AppConfig
appConfig
=
AppConfig
.
initConfig
(
config
);
RvCache
.
getInstance
().
save
(
appConfig
,
CacheEnum
.
IM_CONFIG
);
...
...
@@ -44,6 +51,18 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
}
}
@Override
public
void
onShowError
(
String
errorMsg
,
int
errorType
)
{
AppConfig
appConfig
=
(
AppConfig
)
RvCache
.
getInstance
().
get
(
CacheEnum
.
IM_CONFIG
);
if
(
appConfig
==
null
)
{
if
(!
NetworkUtil
.
isNetworkAvailable
(
getApplicationContext
()))
{
showToast
(
"网络异常,im初始化失败,请退出重进"
);
}
return
;
}
isImInitOk
=
true
;
}
@Override
protected
int
setLayout
()
{
return
R
.
layout
.
rv_act_weclome
;
...
...
@@ -97,15 +116,17 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
e
.
printStackTrace
();
}
SharedPreferences
preferences
=
getSharedPreferences
(
"first_open"
,
MODE_PRIVATE
);
if
(
preferences
.
getBoolean
(
"first"
,
true
))
{
preferences
.
edit
().
putBoolean
(
"first"
,
false
).
commit
();
startActivity
(
GuideActivity
.
getIntent
(
mActivity
));
}
else
{
startActivity
(
MainActivity
.
getIntent
(
mActivity
));
if
(
isImInitOk
)
{
SharedPreferences
preferences
=
getSharedPreferences
(
"first_open"
,
MODE_PRIVATE
);
if
(
preferences
.
getBoolean
(
"first"
,
true
))
{
preferences
.
edit
().
putBoolean
(
"first"
,
false
).
commit
();
startActivity
(
GuideActivity
.
getIntent
(
mActivity
));
}
else
{
startActivity
(
MainActivity
.
getIntent
(
mActivity
));
}
mDisposable
.
dispose
();
finish
();
}
mDisposable
.
dispose
();
finish
();
}
});
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/BaseActivity.java
View file @
1f09bb8e
...
...
@@ -29,7 +29,6 @@ import java.lang.reflect.ParameterizedType;
public
abstract
class
BaseActivity
<
P
extends
MvpPresenter
>
extends
BaseWrapperActivity
implements
BaseView
,
NetWorkReceiver
.
NetChangListener
{
protected
P
mPresenter
;
private
LoadingDialog
mLoadingDialog
;
private
boolean
isLoadData
=
false
;
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -45,10 +44,7 @@ public abstract class BaseActivity<P extends MvpPresenter> extends BaseWrapperAc
}
mPresenter
.
attachView
(
this
);
mLoadingDialog
=
createLoadingDialog
();
if
(
NetworkUtil
.
isNetworkAvailable
(
mActivity
))
{
isLoadData
=
true
;
loadData
(
savedInstanceState
,
getIntent
());
}
loadData
(
savedInstanceState
,
getIntent
());
NetWorkReceiver
.
getInstance
().
register
(
this
);
}
...
...
@@ -123,10 +119,7 @@ public abstract class BaseActivity<P extends MvpPresenter> extends BaseWrapperAc
@Override
public
void
netAvailable
()
{
if
(!
isLoadData
)
{
loadData
(
null
,
getIntent
());
isLoadData
=
true
;
}
loadData
(
null
,
getIntent
());
}
@Override
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/http/OkHttpCreate.java
View file @
1f09bb8e
package
com
.
ruiwenliu
.
wrapper
.
http
;
import
android.os.Build
;
import
android.os.Environment
;
import
com.ruiwenliu.wrapper.BuildConfig
;
...
...
plugin_member/src/main/java/com/rv.member/MemberCenterActivity.java
View file @
1f09bb8e
This diff is collapsed.
Click to expand it.
plugin_member/src/main/res/drawable/shape_rv_bg_circle_white.xml
0 → 100644
View file @
1f09bb8e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/size_30"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
plugin_member/src/main/res/drawable/shape_rv_bg_top_unlogin.xml
0 → 100644
View file @
1f09bb8e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"5dp"
/>
<gradient
android:startColor=
"#E5B895"
android:endColor=
"#F8D3B8"
android:angle=
"90"
/>
</shape>
\ No newline at end of file
plugin_member/src/main/res/layout/activity_member.xml
View file @
1f09bb8e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment