Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
LuckyFarm
Commits
a4d3a63b
Commit
a4d3a63b
authored
Oct 16, 2020
by
wangxuewei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # app/src/main/java/com/ym/game/GameActivity.kt
parents
5e18878e
725d1edc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1025 additions
and
71 deletions
+1025
-71
GameActivity.kt
app/src/main/java/com/ym/game/GameActivity.kt
+10
-3
FlyBoxEntity.kt
app/src/main/java/com/ym/game/module/FlyBoxEntity.kt
+5
-0
TurntableDialog.kt
app/src/main/java/com/ym/game/view/TurntableDialog.kt
+4
-0
MainActivity.kt
app/src/main/java/com/ym/muisc/activity/MainActivity.kt
+1
-1
CenterDialog.kt
app/src/main/java/com/ym/muisc/utils/CenterDialog.kt
+2
-2
AndroidManifest.xml
library/src/main/AndroidManifest.xml
+14
-2
Constant.java
library/src/main/java/com/ym/library/Constant.java
+5
-1
JavaInterface.kt
...ry/src/main/java/com/ym/library/activity/JavaInterface.kt
+857
-0
WebViewActivity.java
...rc/main/java/com/ym/library/activity/WebViewActivity.java
+57
-28
IUserApi.kt
library/src/main/java/com/ym/library/net/IUserApi.kt
+18
-0
RounterApi.kt
library/src/main/java/com/ym/library/router/RounterApi.kt
+2
-1
RxBusConstant.java
...ary/src/main/java/com/ym/library/rxbus/RxBusConstant.java
+2
-0
JumpUtils.java
library/src/main/java/com/ym/library/utils/JumpUtils.java
+3
-3
icon_webview_back.png
library/src/main/res/drawable/icon_webview_back.png
+0
-0
activity_webview.xml
library/src/main/res/layout/activity_webview.xml
+39
-0
colors.xml
library/src/main/res/values/colors.xml
+1
-0
AndroidManifest.xml
userinfo/src/main/AndroidManifest.xml
+0
-11
SettingActivity.kt
...n/java/com/ym/userinfo/module/activity/SettingActivity.kt
+3
-3
UserDiaLog.kt
...src/main/java/com/ym/userinfo/module/widget/UserDiaLog.kt
+2
-2
activity_webview.xml
userinfo/src/main/res/layout/activity_webview.xml
+0
-14
No files found.
app/src/main/java/com/ym/game/GameActivity.kt
View file @
a4d3a63b
...
@@ -13,11 +13,14 @@ import com.ym.game.net.GameApiClient
...
@@ -13,11 +13,14 @@ import com.ym.game.net.GameApiClient
import
com.ym.game.view.SiginDropsPopupwindow
import
com.ym.game.view.SiginDropsPopupwindow
import
com.ym.game.view.TurntableDialog
import
com.ym.game.view.TurntableDialog
import
com.ym.library.AppliContext
import
com.ym.library.AppliContext
import
com.ym.library.module.AdEntity
import
com.ym.library.Constant
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.RxSchedulers
import
com.ym.library.net.RxSchedulers
import
com.ym.library.rxbus.RxBusConstant
import
com.ym.library.rxbus.RxBusConstant
import
com.ym.library.rxbus.RxBusUtil
import
com.ym.library.rxbus.RxBusUtil
import
com.ym.library.utils.SettingPreference
import
com.ym.library.utils.SettingPreference
import
com.ym.library.utils.JumpUtils
import
com.ym.library.utils.Utils
import
com.ym.library.utils.Utils
import
com.ym.library.widget.LoadingDialog
import
com.ym.library.widget.LoadingDialog
import
com.ym.module.toponad.AdID
import
com.ym.module.toponad.AdID
...
@@ -84,6 +87,8 @@ class GameActivity : UnityPlayerActivity() {
...
@@ -84,6 +87,8 @@ class GameActivity : UnityPlayerActivity() {
*/
*/
fun
ranklistClick
()
{
fun
ranklistClick
()
{
Log
.
d
(
"wxw"
,
"上榜赚钱"
)
Log
.
d
(
"wxw"
,
"上榜赚钱"
)
//JumpUtils.h5Jump("上榜赚钱", Constant.Param.RankList)
JumpUtils
.
h5Jump
(
"水滴排行榜"
,
Constant
.
Param
.
RankList
,
false
)
}
}
/**
/**
...
@@ -91,6 +96,7 @@ class GameActivity : UnityPlayerActivity() {
...
@@ -91,6 +96,7 @@ class GameActivity : UnityPlayerActivity() {
*/
*/
fun
oneveryDayWelfareClick
()
{
fun
oneveryDayWelfareClick
()
{
Log
.
d
(
"wxw"
,
"每日福利"
)
Log
.
d
(
"wxw"
,
"每日福利"
)
JumpUtils
.
h5Jump
(
"每日福利"
,
Constant
.
Param
.
WelfareCenter
,
false
)
}
}
...
@@ -99,6 +105,7 @@ class GameActivity : UnityPlayerActivity() {
...
@@ -99,6 +105,7 @@ class GameActivity : UnityPlayerActivity() {
*/
*/
fun
clockInMakeMoney
()
{
fun
clockInMakeMoney
()
{
Log
.
d
(
"wxw"
,
"打卡提现"
)
Log
.
d
(
"wxw"
,
"打卡提现"
)
JumpUtils
.
h5Jump
(
"打卡提现"
,
Constant
.
Param
.
PunchRecord
,
false
)
}
}
/**
/**
...
@@ -131,7 +138,7 @@ class GameActivity : UnityPlayerActivity() {
...
@@ -131,7 +138,7 @@ class GameActivity : UnityPlayerActivity() {
/**
/**
* 打开飞行宝箱
* 打开飞行宝箱
*/
*/
fun
openFlyBox
()
{
fun
open
Ad
FlyBox
()
{
}
}
...
@@ -315,7 +322,8 @@ class GameActivity : UnityPlayerActivity() {
...
@@ -315,7 +322,8 @@ class GameActivity : UnityPlayerActivity() {
//看视频领取加速剂
//看视频领取加速剂
fun
getVideoAcceleratorsReceive
(
callback
:
IUnitySendMessageCallback
?,
id
:
Int
)
{
fun
getVideoAcceleratorsReceive
(
callback
:
IUnitySendMessageCallback
?,
id
:
Int
)
{
GameApiClient
.
gameApi
.
getVideoAcceleratorsReceive
(
id
).
compose
(
RxSchedulers
.
observableIO2Main
())
GameApiClient
.
gameApi
.
getVideoAcceleratorsReceive
(
id
)
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
StatusEntity
>()
{
.
subscribe
(
object
:
BaseObserver
<
StatusEntity
>()
{
override
fun
onSuccess
(
result
:
StatusEntity
?)
{
override
fun
onSuccess
(
result
:
StatusEntity
?)
{
Log
.
d
(
"wxw"
,
"看视频领取加速剂"
+
Utils
.
obj2Str
(
result
))
Log
.
d
(
"wxw"
,
"看视频领取加速剂"
+
Utils
.
obj2Str
(
result
))
...
@@ -330,5 +338,4 @@ class GameActivity : UnityPlayerActivity() {
...
@@ -330,5 +338,4 @@ class GameActivity : UnityPlayerActivity() {
}
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/module/FlyBoxEntity.kt
View file @
a4d3a63b
...
@@ -3,4 +3,9 @@ package com.ym.game.module
...
@@ -3,4 +3,9 @@ package com.ym.game.module
class
FlyBoxEntity
{
class
FlyBoxEntity
{
var
type
:
Int
?=
0
var
type
:
Int
?=
0
var
awardNum
:
Int
?=
0
var
awardNum
:
Int
?=
0
var
seedList
:
MutableList
<
SeedList
>
=
ArrayList
()
class
SeedList
{
var
id
:
Int
=
0
var
num
:
Int
=
0
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/view/TurntableDialog.kt
View file @
a4d3a63b
...
@@ -19,6 +19,10 @@ import com.ym.library.utils.EventUtils
...
@@ -19,6 +19,10 @@ import com.ym.library.utils.EventUtils
import
com.ym.library.utils.LogUtils
import
com.ym.library.utils.LogUtils
import
com.ym.library.utils.Utils
import
com.ym.library.utils.Utils
import
com.ym.xync.R
import
com.ym.xync.R
import
com.ym.module.toponad.AdID
import
com.ym.module.toponad.ToponManager
import
com.ym.module.toponad.listener.ToponRewardListener
/**
/**
*Craeted by ${junqi.li}
*Craeted by ${junqi.li}
...
...
app/src/main/java/com/ym/muisc/activity/MainActivity.kt
View file @
a4d3a63b
...
@@ -137,7 +137,7 @@ class MainActivity : BaseActivity(), NavigationBottomView.OnTabSelectedListener,
...
@@ -137,7 +137,7 @@ class MainActivity : BaseActivity(), NavigationBottomView.OnTabSelectedListener,
}
}
//怎么玩
//怎么玩
findViewById
<
ImageView
>(
R
.
id
.
iv_how_to_play
)
?.
setOnClickListener
{
findViewById
<
ImageView
>(
R
.
id
.
iv_how_to_play
)
?.
setOnClickListener
{
JumpUtils
.
h5Jump
(
"怎么玩"
,
Constant
.
PLAY_URL
)
JumpUtils
.
h5Jump
(
"怎么玩"
,
Constant
.
PLAY_URL
,
false
)
}
}
}
}
...
...
app/src/main/java/com/ym/muisc/utils/CenterDialog.kt
View file @
a4d3a63b
...
@@ -41,12 +41,12 @@ object CenterDialog:BaseDialog() {
...
@@ -41,12 +41,12 @@ object CenterDialog:BaseDialog() {
.
setOnClickListener
{
activity
.
finish
()
}
.
setOnClickListener
{
activity
.
finish
()
}
val
clickUa
:
ClickableSpan
=
object
:
ClickableSpan
()
{
val
clickUa
:
ClickableSpan
=
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
)
{
override
fun
onClick
(
widget
:
View
)
{
JumpUtils
.
h5Jump
(
"隐私政策"
,
NetConfig
.
H5
.
WEB_URL_PRIVACY
)
JumpUtils
.
h5Jump
(
"隐私政策"
,
NetConfig
.
H5
.
WEB_URL_PRIVACY
,
false
)
}
}
}
}
val
clickPrivat
:
ClickableSpan
=
object
:
ClickableSpan
()
{
val
clickPrivat
:
ClickableSpan
=
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
)
{
override
fun
onClick
(
widget
:
View
)
{
JumpUtils
.
h5Jump
(
"用户协议"
,
NetConfig
.
H5
.
WEB_URL_USER
)
JumpUtils
.
h5Jump
(
"用户协议"
,
NetConfig
.
H5
.
WEB_URL_USER
,
false
)
}
}
}
}
// 《隐私政策》和《用户协议》,请您在使用前仔细阅读并了解
// 《隐私政策》和《用户协议》,请您在使用前仔细阅读并了解
...
...
library/src/main/AndroidManifest.xml
View file @
a4d3a63b
...
@@ -62,14 +62,26 @@
...
@@ -62,14 +62,26 @@
android:resource="@xml/bd_file_path" />
android:resource="@xml/bd_file_path" />
</provider>-->
</provider>-->
<activity
<activity
android:name=
"com.ym.library.net.PermissionsActivity"
android:name=
"com.ym.library.net.PermissionsActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:screenOrientation=
"unspecified"
android:screenOrientation=
"unspecified"
android:theme=
"@android:style/Theme.Translucent.NoTitleBar"
/>
android:theme=
"@android:style/Theme.Translucent.NoTitleBar"
/>
<activity
android:name=
"com.ym.library.activity.WebViewActivity"
android:exported=
"true"
android:screenOrientation=
"portrait"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:host=
"web"
android:scheme=
"luckyfarm"
/>
</intent-filter>
</activity>
<!--全屏广告,激励视频-->
<!--全屏广告,激励视频-->
<!-- <activity
<!-- <activity
...
...
library/src/main/java/com/ym/library/Constant.java
View file @
a4d3a63b
...
@@ -15,7 +15,7 @@ import java.util.List;
...
@@ -15,7 +15,7 @@ import java.util.List;
public
class
Constant
{
public
class
Constant
{
public
static
int
REQUEST_CODE_ASK_PERMISSIONS
=
0x0101
;
public
static
int
REQUEST_CODE_ASK_PERMISSIONS
=
0x0101
;
public
static
final
String
scheme
=
"
quweiguesssong
"
;
public
static
final
String
scheme
=
"
luckyfarm
"
;
public
static
final
String
withdraw_right_top
=
"withdraw_right_top"
;
public
static
final
String
withdraw_right_top
=
"withdraw_right_top"
;
public
static
final
String
sign_in_again_video
=
"sign_in_again_video"
;
public
static
final
String
sign_in_again_video
=
"sign_in_again_video"
;
...
@@ -452,6 +452,10 @@ public class Constant {
...
@@ -452,6 +452,10 @@ public class Constant {
public
static
String
district
=
""
;
public
static
String
district
=
""
;
public
static
String
street
=
""
;
public
static
String
street
=
""
;
public
static
String
makingMoneyUrl
=
""
;
public
static
String
makingMoneyUrl
=
""
;
public
static
String
WelfareCenter
=
"https://h5v3.zhangxinzhixun.com/huayuan/Welfare"
;
//福利中心
public
static
String
PunchRecord
=
"https://h5v3.zhangxinzhixun.com/huayuan/ClockIn"
;
//打卡记录
public
static
String
RankList
=
"https://h5v3.zhangxinzhixun.com/huayuan/Ranking"
;
//排行榜
}
}
public
static
class
SdkKey
{
public
static
class
SdkKey
{
...
...
library/src/main/java/com/ym/library/activity/JavaInterface.kt
0 → 100644
View file @
a4d3a63b
This diff is collapsed.
Click to expand it.
userinfo/src/main/java/com/ym/userinfo/module
/activity/WebViewActivity.java
→
library/src/main/java/com/ym/library
/activity/WebViewActivity.java
View file @
a4d3a63b
package
com
.
ym
.
userinfo
.
module
.
activity
;
package
com
.
ym
.
library
.
activity
;
import
android.graphics.Color
;
import
android.app.Activity
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.WebSettings
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
android.webkit.WebViewClient
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
com.ym.library.R
;
import
com.ym.library.net.BaseActivity
;
import
com.ym.library.net.BaseActivity
;
import
com.ym.library.rxbus.RxBusConstant
;
import
com.ym.library.rxbus.RxBusUtil
;
import
com.ym.library.utils.StatusBarUtil
;
import
com.ym.library.utils.StatusBarUtil
;
import
com.ym.module.userinfo.R
;
import
com.ym.library.utils.Utils
;
import
com.ym.module.toponad.AdID
;
import
com.ym.module.toponad.ToponManager
;
import
org.apache.poi.hssf.record.formula.functions.Int
;
import
org.jetbrains.annotations.NotNull
;
public
class
WebViewActivity
extends
BaseActivity
{
public
class
WebViewActivity
extends
BaseActivity
{
private
String
url
;
private
String
url
;
private
String
title
;
private
String
title
;
private
LinearLayout
layout
;
private
WebView
webView
;
private
WebView
webView
;
@Override
@Override
...
@@ -34,33 +44,28 @@ public class WebViewActivity extends BaseActivity {
...
@@ -34,33 +44,28 @@ public class WebViewActivity extends BaseActivity {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
url
=
getIntent
().
getData
().
getQueryParameter
(
"url"
);
url
=
getIntent
().
getData
().
getQueryParameter
(
"url"
);
// url = getIntent().getStringExtra("url");
// title = getIntent().getStringExtra("title");
title
=
getIntent
().
getData
().
getQueryParameter
(
"title"
);
title
=
getIntent
().
getData
().
getQueryParameter
(
"title"
);
RelativeLayout
rl
=
findViewById
(
R
.
id
.
id_rl_toolbar
);
if
(
getIntent
().
getData
().
getBooleanQueryParameter
(
"showToolbar"
,
true
))
{
rl
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
rl
.
setVisibility
(
View
.
GONE
);
}
layout
=
findViewById
(
R
.
id
.
activity_webview_layout
);
initWebView
();
initWebView
();
initTitle
();
initTitle
();
}
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
MobclickAgent
.
onResume
(
this
);
}
@Override
protected
void
onPause
()
{
super
.
onPause
();
MobclickAgent
.
onPause
(
this
);
}
private
void
initWebView
()
{
private
void
initWebView
()
{
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
webView
=
findViewById
(
R
.
id
.
activity_webview
);
webView
=
new
WebView
(
this
);
webView
.
setBackgroundColor
(
getResources
().
getColor
(
R
.
color
.
color_FEDA83
));
//设置WebView的宽高
//设置WebView的宽高
webView
.
setLayoutParams
(
layoutParams
);
//把webView添加到容器中
//把webView添加到容器中
layout
.
addView
(
webView
);
webView
.
getSettings
().
setUseWideViewPort
(
true
);
webView
.
getSettings
().
setUseWideViewPort
(
true
);
webView
.
getSettings
().
setLoadWithOverviewMode
(
true
);
webView
.
getSettings
().
setLoadWithOverviewMode
(
true
);
// webView.getSettings().setDefaultFontSize(56);
// webView.getSettings().setDefaultFontSize(56);
...
@@ -86,7 +91,7 @@ public class WebViewActivity extends BaseActivity {
...
@@ -86,7 +91,7 @@ public class WebViewActivity extends BaseActivity {
// },"android");
// },"android");
// webView.addJavascriptInterface(new WebJavaInterface(this,webView).);
// webView.addJavascriptInterface(new WebJavaInterface(this,webView).);
webView
.
addJavascriptInterface
(
new
WebJavaInterface
(),
"android"
);
webView
.
addJavascriptInterface
(
new
WebJavaInterface
(
this
,
webView
),
"android"
);
webView
.
setWebViewClient
(
new
WebViewClient
()
{
webView
.
setWebViewClient
(
new
WebViewClient
()
{
@Override
@Override
...
@@ -100,14 +105,35 @@ public class WebViewActivity extends BaseActivity {
...
@@ -100,14 +105,35 @@ public class WebViewActivity extends BaseActivity {
}
}
private
void
initTitle
()
{
private
void
initTitle
()
{
findViewById
(
R
.
id
.
i
v_user_toolbar
_back
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
i
d_iv
_back
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
view
)
{
public
void
onClick
(
View
view
)
{
finish
();
finish
();
}
}
});
});
TextView
tv_title
=
findViewById
(
R
.
id
.
tv_user_toolbar_title
);
TextView
tv_title
=
findViewById
(
R
.
id
.
tv_user_toolbar_title
);
tv_title
.
setText
(
title
+
""
);
tv_title
.
setText
(
title
);
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
if
(
webView
!=
null
)
{
webView
.
loadUrl
(
"javascript:onResume()"
);
}
MobclickAgent
.
onResume
(
this
);
// ToponManager.INSTANCE.initNativeAd(this, AdID.AD_WELFARE_CENTER_BIGIMAGE);
}
@Override
protected
void
onPause
()
{
super
.
onPause
();
if
(
webView
!=
null
)
{
webView
.
loadUrl
(
"javascript:onPause()"
);
}
MobclickAgent
.
onPause
(
this
);
RxBusUtil
.
getDefault
()
.
send
(
RxBusConstant
.
RX_MAIN_HIGH_WATER_DROP_UPDATE
);
}
}
@Override
@Override
...
@@ -118,13 +144,16 @@ public class WebViewActivity extends BaseActivity {
...
@@ -118,13 +144,16 @@ public class WebViewActivity extends BaseActivity {
webView
.
removeAllViews
();
webView
.
removeAllViews
();
webView
.
destroy
();
webView
.
destroy
();
webView
=
null
;
webView
=
null
;
layout
.
removeView
(
webView
);
}
}
}
}
class
WebJavaInterface
{
class
WebJavaInterface
extends
JavaInterface
{
@JavascriptInterface
public
void
finishH5
(
)
{
public
WebJavaInterface
(
@NotNull
Activity
act
,
@NotNull
WebView
web
)
{
finish
(
);
super
(
act
,
web
);
}
}
}
}
}
}
library/src/main/java/com/ym/library/net/IUserApi.kt
View file @
a4d3a63b
...
@@ -2,6 +2,7 @@ package com.ym.library.net
...
@@ -2,6 +2,7 @@ package com.ym.library.net
import
com.ym.library.module.*
import
com.ym.library.module.*
import
io.reactivex.Observable
import
io.reactivex.Observable
import
okhttp3.ResponseBody
import
retrofit2.http.*
import
retrofit2.http.*
/**
/**
...
@@ -40,4 +41,21 @@ interface IUserApi {
...
@@ -40,4 +41,21 @@ interface IUserApi {
@GET
(
NetConfig
.
User
.
URL_USER_WITHDRAW_BIND_WX
)
@GET
(
NetConfig
.
User
.
URL_USER_WITHDRAW_BIND_WX
)
fun
bindWx
(
@Query
(
"openId"
)
oppenid
:
String
,
@Query
(
"token"
)
token
:
String
):
Observable
<
Response
<
WxBindEntity
>>
fun
bindWx
(
@Query
(
"openId"
)
oppenid
:
String
,
@Query
(
"token"
)
token
:
String
):
Observable
<
Response
<
WxBindEntity
>>
/**
* h5-post接口
* @param
* @param
* @return
*/
@POST
fun
webApiPost
(
@Url
url
:
String
):
Observable
<
retrofit2
.
Response
<
ResponseBody
>>
/**
* h5-get接口
* @param
* @param
* @return
*/
@GET
fun
webApiGet
(
@Url
url
:
String
):
Observable
<
retrofit2
.
Response
<
ResponseBody
>>
}
}
\ No newline at end of file
library/src/main/java/com/ym/library/router/RounterApi.kt
View file @
a4d3a63b
...
@@ -25,7 +25,8 @@ interface RounterApi {
...
@@ -25,7 +25,8 @@ interface RounterApi {
@RounterUri
(
Constant
.
scheme
+
"://web"
)
@RounterUri
(
Constant
.
scheme
+
"://web"
)
fun
getIntentActivityWeb
(
fun
getIntentActivityWeb
(
@RounterParam
(
"title"
)
title
:
String
,
@RounterParam
(
"title"
)
title
:
String
,
@RounterParam
(
"url"
)
url
:
String
@RounterParam
(
"url"
)
url
:
String
,
@RounterParam
(
"showToolbar"
)
showToolbar
:
Boolean
):
Intent
):
Intent
@RounterUri
(
Constant
.
scheme
+
"://adshare"
)
@RounterUri
(
Constant
.
scheme
+
"://adshare"
)
...
...
library/src/main/java/com/ym/library/rxbus/RxBusConstant.java
View file @
a4d3a63b
...
@@ -38,4 +38,6 @@ public class RxBusConstant {
...
@@ -38,4 +38,6 @@ public class RxBusConstant {
public
final
static
int
RX_MAIN_UPDATE_HOME_INFO
=
10005
;
public
final
static
int
RX_MAIN_UPDATE_HOME_INFO
=
10005
;
//MainFragment 每日水滴领取后刷新
//MainFragment 每日水滴领取后刷新
public
final
static
int
RX_MAIN_WATER_DROP_UPDATE
=
10008
;
public
final
static
int
RX_MAIN_WATER_DROP_UPDATE
=
10008
;
//MainFragment 高额水滴领取后刷新
public
final
static
int
RX_MAIN_HIGH_WATER_DROP_UPDATE
=
10004
;
}
}
library/src/main/java/com/ym/library/utils/JumpUtils.java
View file @
a4d3a63b
...
@@ -30,9 +30,9 @@ public class JumpUtils {
...
@@ -30,9 +30,9 @@ public class JumpUtils {
}
}
}
}
public
static
void
h5Jump
(
String
title
,
String
url
)
{
public
static
void
h5Jump
(
String
title
,
String
url
,
boolean
showToolbar
)
{
try
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentActivityWeb
(
title
,
url
);
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentActivityWeb
(
title
,
url
,
showToolbar
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
AppliContext
.
get
().
startActivity
(
intent
);
AppliContext
.
get
().
startActivity
(
intent
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -348,7 +348,7 @@ public class JumpUtils {
...
@@ -348,7 +348,7 @@ public class JumpUtils {
data
.
getDeep_url_re
()
data
.
getDeep_url_re
()
);
);
}
else
{
}
else
{
h5Jump
(
data
.
getTitle
(),
data
.
getUrl
());
h5Jump
(
data
.
getTitle
(),
data
.
getUrl
()
,
false
);
}
}
}
else
if
(
data
.
getOpentype
()
==
NewsEntity
.
AD_TYPE_APPMODEL
&&
data
.
getStatus
()
!=
2
)
{
}
else
if
(
data
.
getOpentype
()
==
NewsEntity
.
AD_TYPE_APPMODEL
&&
data
.
getStatus
()
!=
2
)
{
if
(
appmodelId
==
59
)
{
if
(
appmodelId
==
59
)
{
...
...
library/src/main/res/drawable/icon_webview_back.png
0 → 100644
View file @
a4d3a63b
10.9 KB
library/src/main/res/layout/activity_webview.xml
0 → 100644
View file @
a4d3a63b
<?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:id=
"@+id/id_rl_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"90dp"
android:background=
"#994B00"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_alignParentBottom=
"true"
>
<ImageView
android:id=
"@+id/id_iv_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_webview_back"
android:layout_marginLeft=
"14dp"
android:layout_centerVertical=
"true"
/>
<TextView
android:id=
"@+id/tv_user_toolbar_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#ffffffff"
android:textSize=
"18sp"
android:textStyle=
"bold"
android:layout_centerInParent=
"true"
/>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:id=
"@+id/activity_webview_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
/>
</LinearLayout>
library/src/main/res/values/colors.xml
View file @
a4d3a63b
...
@@ -23,4 +23,5 @@
...
@@ -23,4 +23,5 @@
<color
name=
"transparent"
>
#00000000
</color>
<color
name=
"transparent"
>
#00000000
</color>
<color
name=
"transparent75"
>
#60000000
</color>
<color
name=
"transparent75"
>
#60000000
</color>
<color
name=
"color_FEDA83"
>
#FEDA83
</color>
</resources>
</resources>
userinfo/src/main/AndroidManifest.xml
View file @
a4d3a63b
...
@@ -34,17 +34,6 @@
...
@@ -34,17 +34,6 @@
android:scheme=
"quweiguesssong"
/>
android:scheme=
"quweiguesssong"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
"com.ym.userinfo.module.activity.WebViewActivity"
android:exported=
"true"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:host=
"web"
android:scheme=
"quweiguesssong"
/>
</intent-filter>
</activity>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
userinfo/src/main/java/com/ym/userinfo/module/activity/SettingActivity.kt
View file @
a4d3a63b
...
@@ -23,15 +23,15 @@ class SettingActivity : BaseActivity() {
...
@@ -23,15 +23,15 @@ class SettingActivity : BaseActivity() {
tv_user_toolbar_title
.
text
=
"设置"
tv_user_toolbar_title
.
text
=
"设置"
//用户协议
//用户协议
tv_setting_user_agreement
.
setOnClickListener
{
tv_setting_user_agreement
.
setOnClickListener
{
JumpUtils
.
h5Jump
(
"用户协议"
,
Constant
.
Param
.
USER
)
JumpUtils
.
h5Jump
(
"用户协议"
,
Constant
.
Param
.
USER
,
false
)
}
}
//隐私条款
//隐私条款
tv_setting_privacy_policy
.
setOnClickListener
{
tv_setting_privacy_policy
.
setOnClickListener
{
JumpUtils
.
h5Jump
(
"隐私条款"
,
Constant
.
Param
.
PRIVACY
)
JumpUtils
.
h5Jump
(
"隐私条款"
,
Constant
.
Param
.
PRIVACY
,
false
)
}
}
//关于我们
//关于我们
tv_setting_about_us
.
setOnClickListener
{
tv_setting_about_us
.
setOnClickListener
{
JumpUtils
.
h5Jump
(
"关于我们"
,
Constant
.
Param
.
ABOUTUS
)
JumpUtils
.
h5Jump
(
"关于我们"
,
Constant
.
Param
.
ABOUTUS
,
false
)
}
}
//版本升级
//版本升级
id_setting_update_version
.
setOnClickListener
{
id_setting_update_version
.
setOnClickListener
{
...
...
userinfo/src/main/java/com/ym/userinfo/module/widget/UserDiaLog.kt
View file @
a4d3a63b
...
@@ -119,10 +119,10 @@ object UserDiaLog {
...
@@ -119,10 +119,10 @@ object UserDiaLog {
// mDialog.dismiss()
// mDialog.dismiss()
// }
// }
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
tv_wx_login_user
).
setOnClickListener
{
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
tv_wx_login_user
).
setOnClickListener
{
JumpUtils
.
h5Jump
(
"隐私条款"
,
Constant
.
Param
.
USER
)
JumpUtils
.
h5Jump
(
"隐私条款"
,
Constant
.
Param
.
USER
,
false
)
}
}
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
tv_wx_login_privacy
).
setOnClickListener
{
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
tv_wx_login_privacy
).
setOnClickListener
{
JumpUtils
.
h5Jump
(
"隐私条款"
,
Constant
.
Param
.
PRIVACY
)
JumpUtils
.
h5Jump
(
"隐私条款"
,
Constant
.
Param
.
PRIVACY
,
false
)
}
}
...
...
userinfo/src/main/res/layout/activity_webview.xml
deleted
100644 → 0
View file @
5e18878e
<?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"
>
<include
layout=
"@layout/layout_user_toolbar"
/>
<WebView
android:id=
"@+id/activity_webview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_FEDA83"
/>
</LinearLayout>
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