Merge branch 'feat/GHZS-3502' into 'dev'
feat: APP备案的相关调整 https://jira.shanqu.cc/browse/GHZS-3502 See merge request halo/android/assistant-android!1401
This commit is contained in:
@ -188,7 +188,8 @@ android {
|
||||
buildConfigField "String", "DEV_VAPI_HOST", "\"${DEV_VAPI_HOST}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${DEV_QUICK_LOGIN_APPID}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${DEV_QUICK_LOGIN_APPKEY}\""
|
||||
buildConfigField "String", "CSJ_APPID", "\"${DEV_CSJ_APPID}\""
|
||||
buildConfigField "String", "DEV_CSJ_APPID", "\"${DEV_CSJ_APPID}\""
|
||||
buildConfigField "String", "CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
}
|
||||
|
||||
// publish, 发布时候使用的 flavor,接口仅包含正式环境
|
||||
@ -200,6 +201,7 @@ android {
|
||||
buildConfigField "String", "DEV_VAPI_HOST", "\"${VAPI_HOST}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${QUICK_LOGIN_APPID}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${QUICK_LOGIN_APPKEY}\""
|
||||
buildConfigField "String", "DEV_CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
buildConfigField "String", "CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
}
|
||||
|
||||
@ -211,6 +213,7 @@ android {
|
||||
buildConfigField "String", "DEV_VAPI_HOST", "\"${VAPI_HOST}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${QUICK_LOGIN_APPID}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${QUICK_LOGIN_APPKEY}\""
|
||||
buildConfigField "String", "DEV_CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
buildConfigField "String", "CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
|
||||
manifestPlaceholders.put("APPLOG_SCHEME", "rangersapplog.byAx6uYt".toLowerCase())
|
||||
@ -224,6 +227,7 @@ android {
|
||||
buildConfigField "String", "DEV_VAPI_HOST", "\"${VAPI_HOST}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${QUICK_LOGIN_APPID}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${QUICK_LOGIN_APPKEY}\""
|
||||
buildConfigField "String", "DEV_CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
buildConfigField "String", "CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
}
|
||||
|
||||
@ -235,6 +239,7 @@ android {
|
||||
buildConfigField "String", "DEV_VAPI_HOST", "\"${VAPI_HOST}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${QUICK_LOGIN_APPID}\""
|
||||
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${QUICK_LOGIN_APPKEY}\""
|
||||
buildConfigField "String", "DEV_CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
buildConfigField "String", "CSJ_APPID", "\"${CSJ_APPID}\""
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +87,8 @@ object AdDelegateHelper {
|
||||
if (mCsjAdImpl == null) {
|
||||
mCsjAdImpl =
|
||||
ARouter.getInstance().build(RouteConsts.provider.csjAd).navigation() as? ICsjAdProvider
|
||||
mCsjAdImpl?.initSDK(context, BuildConfig.CSJ_APPID, HaloApp.getInstance().oaid)
|
||||
val csjAppId = if (EnvHelper.isDevEnv) BuildConfig.DEV_CSJ_APPID else BuildConfig.CSJ_APPID
|
||||
mCsjAdImpl?.initSDK(context, csjAppId, HaloApp.getInstance().oaid)
|
||||
// 监听亮色/暗色模式切换
|
||||
DarkModeUtils.registerModeChangeListener {
|
||||
val topActivity = CurrentActivityHolder.getCurrentActivity() ?: return@registerModeChangeListener
|
||||
@ -347,7 +348,9 @@ object AdDelegateHelper {
|
||||
val jumpBtn: View = startAdContainer.findViewById(R.id.jumpBtn)
|
||||
val jumpDetailBtn: TextView = startAdContainer.findViewById(R.id.jumpDetailBtn)
|
||||
val adImage: SimpleDraweeView = startAdContainer.findViewById(R.id.adImage)
|
||||
val icpContainer: View? = startAdContainer.findViewById(R.id.startAdIcpContainer)
|
||||
startAdContainer.visibility = View.VISIBLE
|
||||
icpContainer?.visibility = View.VISIBLE
|
||||
jumpDetailBtn.text = ad.desc
|
||||
jumpDetailBtn.setDrawableEnd(
|
||||
AppCompatResources.getDrawable(
|
||||
|
||||
@ -120,6 +120,10 @@ class DirectProviderImpl : IDirectProvider {
|
||||
return DirectUtils.directToQGameHome(context)
|
||||
}
|
||||
|
||||
override fun directToExternalBrowser(context: Context, url: String) {
|
||||
DirectUtils.directToExternalBrowser(context, url)
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@ -21,10 +21,6 @@ class WebProviderImpl : IWebProvider {
|
||||
return WebActivity.getBindWechatIntent(context)
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent {
|
||||
return WebActivity.getSecurityCertificationIntent(context)
|
||||
}
|
||||
|
||||
override fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
|
||||
@ -516,7 +516,9 @@ public class MainActivity extends BaseActivity {
|
||||
FrameLayout adsFl = findViewById(R.id.adsFl);
|
||||
|
||||
int screenWidthInPx = DisplayUtils.getScreenWidth(this);
|
||||
int screenHeightInPx = DisplayUtils.getScreenHeight(this) + DisplayUtils.getStatusBarHeight(this.getResources());
|
||||
int screenHeightInPx = DisplayUtils.getScreenHeight(this)
|
||||
+ DisplayUtils.getStatusBarHeight(this.getResources())
|
||||
- ExtensionsKt.dip2px(112F);
|
||||
float screenWidthInDp = DisplayUtils.px2dip(this, screenWidthInPx);
|
||||
float screenHeightInDp = DisplayUtils.px2dip(this, screenHeightInPx);
|
||||
|
||||
@ -584,6 +586,12 @@ public class MainActivity extends BaseActivity {
|
||||
AdDelegateHelper.INSTANCE.cancelSplashAd(this);
|
||||
}
|
||||
|
||||
View startSdkAdIcpContainer = findViewById(R.id.sdkStartAdIcpContainer);
|
||||
if (startSdkAdIcpContainer != null) {
|
||||
startSdkAdIcpContainer.setVisibility(View.GONE);
|
||||
ExtensionsKt.removeFromParent(startSdkAdIcpContainer);
|
||||
}
|
||||
|
||||
// 通知优先级高的弹窗可以显示了
|
||||
AppExecutor.getUiExecutor().execute(() -> {
|
||||
mMainWrapperFragment.showDialog();
|
||||
|
||||
@ -132,26 +132,6 @@ open class WebActivity : ToolBarActivity() {
|
||||
)
|
||||
}
|
||||
|
||||
// 获取安全认证页
|
||||
@JvmStatic
|
||||
fun getSecurityCertificationIntent(context: Context): Intent {
|
||||
val bundle = Bundle()
|
||||
bundle.putString(
|
||||
EntranceConsts.KEY_GAMENAME,
|
||||
context.getString(R.string.comment_security_certification)
|
||||
)
|
||||
bundle.putString(
|
||||
EntranceConsts.KEY_URL,
|
||||
context.getString(R.string.comment_security_certification_url)
|
||||
)
|
||||
bundle.putBoolean(WebFragment.KEY_IS_SECURITY_CERTIFICATION, true)
|
||||
return getTargetIntent(
|
||||
context,
|
||||
WebActivity::class.java,
|
||||
WebFragment::class.java, bundle
|
||||
)
|
||||
}
|
||||
|
||||
// 获取工具箱页面
|
||||
@JvmStatic
|
||||
fun getWebByCollectionTools(
|
||||
|
||||
@ -90,6 +90,9 @@ class GameDetailInfoItemAdapter(
|
||||
if (gameInfo.recommendAge.isNotEmpty()) {
|
||||
datas.add(GameInfoItemData(title = "适龄等级", info = gameInfo.recommendAge))
|
||||
}
|
||||
if (gameInfo.icp != null) {
|
||||
datas.add(GameInfoItemData(title = "ICP备案号", info = gameInfo.icp?.number ?: ""))
|
||||
}
|
||||
if (!gameInfo.permissions.isNullOrEmpty()) {
|
||||
datas.add(GameInfoItemData(title = "权限及用途", info = "查看"))
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/bg_splash_bottom.webp
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/bg_splash_bottom.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_launcher_pack.webp
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_launcher_pack.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
@ -79,40 +79,30 @@
|
||||
android:layout_height="0dp"
|
||||
android:tint="#01000000"
|
||||
app:actualImageScaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/startAdIcpContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logoIv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="66dp"
|
||||
android:src="@drawable/ic_start_ad_logo"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/jumpBtn"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="66dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/button_round_black_alpha_50"
|
||||
android:gravity="center"
|
||||
android:text="跳过 3"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/secondary_size"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/logoIv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/logoIv" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/jumpDetailBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/button_round_black_alpha_50_stroke_white_20"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
@ -122,30 +112,47 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/primary_text_size"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/startAdIcpContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
android:id="@+id/startAdIcpContainer"
|
||||
layout="@layout/piece_ad_icp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/sdkStartAdContainer"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/launcher_background"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/adsFl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/sdkStartAdContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/sdkStartAdIcpContainer"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/adsFl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/sdkStartAdIcpContainer"
|
||||
layout="@layout/piece_ad_icp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="112dp"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -82,17 +82,30 @@
|
||||
android:id="@+id/descTv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="1.5dp"
|
||||
android:text="如您同意以上内容,请点击“同意”,开始使用我们的产品和服务!"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="@dimen/primary_text_size"
|
||||
app:layout_constraintBottom_toTopOf="@id/refuseTv"
|
||||
app:layout_constraintBottom_toTopOf="@id/icpTv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_goneMarginTop="16dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/icpTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/icp_serial_numb_desc"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="@dimen/little_secondary_size"
|
||||
app:layout_constraintBottom_toTopOf="@id/refuseTv"
|
||||
app:layout_constraintStart_toStartOf="@id/descTv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/refuseTv"
|
||||
android:layout_width="126dp"
|
||||
|
||||
31
app/src/main/res/layout/piece_ad_icp.xml
Normal file
31
app/src/main/res/layout/piece_ad_icp.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="112dp"
|
||||
android:background="@color/background_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:showIn="@layout/activity_main">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:src="@drawable/ic_launcher_pack"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@string/icp_serial_numb_desc"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="@dimen/little_secondary_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -199,8 +199,6 @@
|
||||
<string name="third_party_sdk_title">光环助手接入第三方SDK目录</string>
|
||||
<string name="third_party_sdk_statement_url">https://resource.ghzs.com/page/third_party_sdk/index.html</string>
|
||||
<string name="comment_rules_title">光环助手评论规则</string>
|
||||
<string name="comment_security_certification">安全认证</string>
|
||||
<string name="comment_security_certification_url">https://credit.cecdc.com/CX20190909718761807395238.html</string>
|
||||
<string name="comment_rules_url">https://resource.ghzs.com/page/rule_page/comment_rules.html</string>
|
||||
<string name="collection_cancel">取消收藏</string>
|
||||
<string name="collection_cancel_failure">取消收藏失败</string>
|
||||
|
||||
@ -121,6 +121,10 @@ class DirectProviderImpl : IDirectProvider {
|
||||
ToastUtils.toast("调用->DirectProviderImpl.directToQGame")
|
||||
}
|
||||
|
||||
override fun directToExternalBrowser(context: Context, url: String) {
|
||||
ToastUtils.toast("调用->DirectProviderImpl.directToExternalBrowser")
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@ -20,10 +20,6 @@ class WebProviderImpl : IWebProvider {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
|
||||
@ -121,6 +121,10 @@ class DirectProviderImpl : IDirectProvider {
|
||||
ToastUtils.toast("调用->DirectProviderImpl.directToQGame")
|
||||
}
|
||||
|
||||
override fun directToExternalBrowser(context: Context, url: String) {
|
||||
ToastUtils.toast("调用->DirectProviderImpl.directToExternalBrowser")
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@ -20,10 +20,6 @@ class WebProviderImpl : IWebProvider {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
package com.gh.gamecenter.common.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.gh.gamecenter.common.R;
|
||||
|
||||
public class LongPressView extends View {
|
||||
private int mLastMotionX, mLastMotionY;
|
||||
// 是否移动了
|
||||
private boolean isMoved;
|
||||
// 是否释放了
|
||||
private boolean isReleased;
|
||||
// 计数器,防止多次点击导致最后一次形成longpress的时间变短
|
||||
private int mCounter;
|
||||
// 长按的runnable
|
||||
private Runnable mLongPressRunnable;
|
||||
// 移动的阈值
|
||||
private static final int TOUCH_SLOP = 60;
|
||||
private int longPressTimeout = ViewConfiguration.getLongPressTimeout();
|
||||
|
||||
public LongPressView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LongPressView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context, attrs);
|
||||
}
|
||||
|
||||
public LongPressView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context, attrs);
|
||||
}
|
||||
|
||||
private void init(Context context, AttributeSet attrs) {
|
||||
if (attrs != null) {
|
||||
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.LongPressViewStyle);
|
||||
longPressTimeout = ta.getInteger(R.styleable.LongPressViewStyle_timeout, longPressTimeout);
|
||||
ta.recycle();
|
||||
}
|
||||
mLongPressRunnable = () -> {
|
||||
mCounter--;
|
||||
if (mCounter > 0 || isReleased || isMoved)
|
||||
return;
|
||||
performLongClick();// 回调长按事件
|
||||
};
|
||||
}
|
||||
|
||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||
int x = (int) event.getX();
|
||||
int y = (int) event.getY();
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
mLastMotionX = x;
|
||||
mLastMotionY = y;
|
||||
mCounter++;
|
||||
isReleased = false;
|
||||
isMoved = false;
|
||||
postDelayed(mLongPressRunnable, longPressTimeout);
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
if (isMoved)
|
||||
break;
|
||||
if (Math.abs(mLastMotionX - x) > TOUCH_SLOP
|
||||
|| Math.abs(mLastMotionY - y) > TOUCH_SLOP) {
|
||||
isMoved = true;
|
||||
}
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
isReleased = true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -46,6 +46,11 @@
|
||||
<string name="privacy_policy_title">隐私政策</string>
|
||||
<string name="privacy_policy_url">https://resource.ghzs.com/page/privacy_policies/privacy_policies.html</string>
|
||||
|
||||
<string name="icp">备案查询入口</string>
|
||||
<string name="icp_url">https://beian.miit.gov.cn/</string>
|
||||
<string name="icp_serial_number">粤ICP备17080876号-5A</string>
|
||||
<string name="icp_serial_numb_desc">APP备案号:粤ICP备17080876号-5A</string>
|
||||
|
||||
<string name="loading">加载中...</string>
|
||||
<string name="loading_more_hint">上拉加载</string>
|
||||
<string name="loading_failed_retry">加载失败,点击重试</string>
|
||||
|
||||
@ -72,4 +72,6 @@ interface IDirectProvider : IProvider {
|
||||
fun directToWinOrderDetail(context: Context, orderId: String, activityId: String)
|
||||
|
||||
fun directToQGame(context: Context)
|
||||
|
||||
fun directToExternalBrowser(context: Context, url: String)
|
||||
}
|
||||
@ -11,8 +11,6 @@ interface IWebProvider : IProvider {
|
||||
|
||||
fun getBindWechatIntent(context: Context): Intent?
|
||||
|
||||
fun getSecurityCertificationIntent(context: Context): Intent?
|
||||
|
||||
fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
|
||||
@ -31,5 +31,10 @@ class GameInfo(
|
||||
var developer: String = "",//manufacturer_type 值为 manufacturer / developer,或该字段值为空时,不返回该字段
|
||||
var supplier: String = "",//供应商
|
||||
@SerializedName("credit_code")
|
||||
var creditCode: String = ""//统一社会信用代码
|
||||
) : Parcelable
|
||||
var creditCode: String = "",//统一社会信用代码
|
||||
@SerializedName("ICP")
|
||||
var icp: ICP? = null, // APP 备案相关
|
||||
) : Parcelable {
|
||||
@Parcelize
|
||||
class ICP(val number: String): Parcelable
|
||||
}
|
||||
@ -20,10 +20,6 @@ class WebProviderImpl : IWebProvider {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
|
||||
@ -20,10 +20,6 @@ class WebProviderImpl : IWebProvider {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
package com.gh.gamecenter.setting.view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Message
|
||||
import android.preference.PreferenceManager
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.gh.gamecenter.common.base.fragment.ToolbarFragment
|
||||
import com.gh.gamecenter.common.constant.Constants
|
||||
@ -170,22 +167,10 @@ class AboutFragment : ToolbarFragment() {
|
||||
directUtils?.directDouyin(requireContext(), "1402577827140941")
|
||||
}
|
||||
}
|
||||
mBinding.aboutBottom.setOnLongClickListener {
|
||||
MtaHelper.onEvent("我的光环_设置", "关于光环", "底部长按")
|
||||
if (context == null) return@setOnLongClickListener true
|
||||
if (context is Activity && (context as Activity).isFinishing) return@setOnLongClickListener true
|
||||
startActivity(webActivity?.getSecurityCertificationIntent(requireContext()))
|
||||
true
|
||||
}
|
||||
mBinding.aboutTvVersion.setOnLongClickListener {
|
||||
// String tinkerId = TinkerManager.getNewTinkerId();
|
||||
// if (!TextUtils.isEmpty(tinkerId)) {
|
||||
// mVersionName.setText(("V" + PackageUtils.getVersionName() + "." + tinkerId));
|
||||
// } else {
|
||||
|
||||
toastLong(R.string.toast_upload_latest)
|
||||
// }
|
||||
false
|
||||
mBinding.icpTv.setOnClickListener {
|
||||
val directUtils = ARouter.getInstance().build(RouteConsts.provider.directUtils).navigation() as? IDirectProvider
|
||||
directUtils?.directToExternalBrowser(requireContext(), requireContext().getString(R.string.icp_url))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@ -45,33 +45,33 @@
|
||||
|
||||
<include
|
||||
android:id="@+id/updateItem"
|
||||
layout="@layout/layout_setting_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_setting_item" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<include layout="@layout/piece_setting_divider" />
|
||||
|
||||
<include
|
||||
android:id="@+id/userProtocolItem"
|
||||
layout="@layout/layout_setting_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_setting_item" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<include layout="@layout/piece_setting_divider" />
|
||||
|
||||
<include
|
||||
android:id="@+id/privacyPolicyItem"
|
||||
layout="@layout/layout_setting_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_setting_item" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<include layout="@layout/piece_setting_divider" />
|
||||
|
||||
<include
|
||||
android:id="@+id/douyinItem"
|
||||
layout="@layout/layout_setting_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_setting_item" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -99,19 +99,45 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:gravity="center"
|
||||
android:text="Copyright 2019 GHZhuShou Team All Rights Reserved."
|
||||
android:textColor="@color/content"
|
||||
android:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.gh.gamecenter.common.view.LongPressView
|
||||
android:id="@+id/about_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:timeout="5000" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/icp_serial_numb_desc"
|
||||
android:textColor="@color/content"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/icpTv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/icp"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="@dimen/little_secondary_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@ -121,6 +121,10 @@ class DirectProviderImpl : IDirectProvider {
|
||||
ToastUtils.toast("调用->DirectProviderImpl.directToQGame")
|
||||
}
|
||||
|
||||
override fun directToExternalBrowser(context: Context, url: String) {
|
||||
ToastUtils.toast("调用->DirectProviderImpl.directToExternalBrowser")
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@ -34,12 +34,6 @@ class WebProviderImpl : IWebProvider {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent? {
|
||||
return Intent(Intent.ACTION_VIEW).apply {
|
||||
data = Uri.parse(SECURITY_CERTIFICATION_URL)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getQAIntent(
|
||||
context: Context?,
|
||||
url: String?,
|
||||
@ -63,8 +57,4 @@ class WebProviderImpl : IWebProvider {
|
||||
override fun init(context: Context?) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val SECURITY_CERTIFICATION_URL = "https://credit.cecdc.com/CX20190909718761807395238.html"
|
||||
}
|
||||
}
|
||||
@ -19,6 +19,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.constraintlayout.compose.ChainStyle
|
||||
import androidx.constraintlayout.compose.ConstraintLayout
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.gh.gamecenter.common.constant.EntranceConsts
|
||||
@ -184,7 +185,7 @@ class ComposeAboutActivity : ComposeBaseActivity() {
|
||||
.fillMaxWidth()
|
||||
.fillMaxHeight()
|
||||
) {
|
||||
val (copyrightCN, copyrightEn) = createRefs()
|
||||
val (copyrightCN, copyrightEn, icpDesc, icpHref) = createRefs()
|
||||
val serverTime = PreferenceManager.getDefaultSharedPreferences(this@ComposeAboutActivity)
|
||||
.getLong("server_time", 1587693163L)
|
||||
val year = TimeUtils.getFormatTime(serverTime, "yyyy")
|
||||
@ -192,19 +193,55 @@ class ComposeAboutActivity : ComposeBaseActivity() {
|
||||
fontSize = 11.sp,
|
||||
color = HaloTheme.colors.textSubtitleDesc,
|
||||
modifier = Modifier.constrainAs(copyrightEn) {
|
||||
bottom.linkTo(parent.bottom, 25.dp)
|
||||
bottom.linkTo(icpDesc.top, 16.dp)
|
||||
start.linkTo(parent.start)
|
||||
end.linkTo(parent.end)
|
||||
})
|
||||
|
||||
Text(text = "光环工作室 版权所有",
|
||||
fontSize = 11.sp,
|
||||
color = HaloTheme.colors.textSubtitleDesc,
|
||||
modifier = Modifier
|
||||
.constrainAs(copyrightCN) {
|
||||
bottom.linkTo(copyrightEn.top, 17.dp)
|
||||
bottom.linkTo(copyrightEn.top, 16.dp)
|
||||
start.linkTo(parent.start)
|
||||
end.linkTo(parent.end)
|
||||
})
|
||||
|
||||
Text(text = getString(R.string.icp_serial_numb_desc),
|
||||
fontSize = 11.sp,
|
||||
color = HaloTheme.colors.textSubtitleDesc,
|
||||
modifier = Modifier
|
||||
.constrainAs(icpDesc) {
|
||||
bottom.linkTo(parent.bottom, 32.dp)
|
||||
start.linkTo(parent.start)
|
||||
end.linkTo(icpHref.start)
|
||||
})
|
||||
|
||||
Text(text = getString(R.string.icp),
|
||||
fontSize = 11.sp,
|
||||
color = HaloTheme.colors.themeFont,
|
||||
modifier = Modifier
|
||||
.padding(start = 8.dp)
|
||||
.constrainAs(icpHref) {
|
||||
bottom.linkTo(parent.bottom, 32.dp)
|
||||
start.linkTo(icpDesc.end)
|
||||
end.linkTo(parent.end)
|
||||
top.linkTo(icpDesc.top)
|
||||
}
|
||||
.clickable {
|
||||
val directUtils =
|
||||
ARouter
|
||||
.getInstance()
|
||||
.build(RouteConsts.provider.directUtils)
|
||||
.navigation() as? IDirectProvider
|
||||
directUtils?.directToExternalBrowser(
|
||||
this@ComposeAboutActivity,
|
||||
getString(R.string.icp_url)
|
||||
)
|
||||
})
|
||||
|
||||
createHorizontalChain(icpDesc, icpHref, chainStyle = ChainStyle.Packed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,17 +31,7 @@ class WebProviderImpl : IWebProvider {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getSecurityCertificationIntent(context: Context): Intent? {
|
||||
return Intent(Intent.ACTION_VIEW).apply {
|
||||
data = Uri.parse(SECURITY_CERTIFICATION_URL)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val SECURITY_CERTIFICATION_URL = "https://credit.cecdc.com/CX20190909718761807395238.html"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user