公众号

This commit is contained in:
itgaojian 2023-07-26 14:46:44 +08:00
parent 7738696da9
commit 362c4a89f9
10 changed files with 476 additions and 268 deletions

View File

@ -74,5 +74,7 @@ dependencies {
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
// fragment快速实现
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
//
api 'com.github.mmin18:realtimeblurview:1.2.1'
}

View File

@ -29,8 +29,8 @@ public class PathConfig {
public static final String MODULE_SYS_C = "systemConfig";
public static final String MODULE_VISITOR = "visitor";
public static final String MODULE_PATROL = "patrol";
public static final String WECHAT_APPID="wx3267db0076f8b522";
public static final String WECHAT_SECERT="3d4dcd2a2c2d131f42ed986fa2d5a903";
public static final String WECHAT_APPID = "wxa5c5246b283713de";
public static final String WECHAT_SECERT = "e5b761f20841f81dd73a6d4aad2f8060";
public static final String SECRET = "CMXX_TOKEN_INFOS";//秘钥
public static final String PROJECT_NAME = "locationReal";//TODO ===项目名称==
public static final String ACTION_SYSTEM_MESSAGE = "com.sucstepsoft.hs.message";
@ -40,6 +40,10 @@ public class PathConfig {
public static final String ACTION_STOP_LOCATION = "com.sucstepsoft.realtimelocation.stop_listener";
public static final String ACTION_START_LOCATION = "com.sucstepsoft.realtimelocation.start_listener";
public static final String ACTION_FROM_SOCKET_PUSH_MSG = "com.tenlionsoft.xz_cultural.SOCKET_MSG_PUBLIC_ACTION";
public static final String PUSH_DATA_KEY = "PUBLIC_CODE_KEY";
public static final String USER_TYPE_LEADER = "b01dac8e-c516-4974-b513-f1352ca40202";
public static final String USER_TYPE_P = "e483f019-d971-49ac-b5fa-3314220da703";
public static final String USER_TYPE_N = "bc405346-8714-4ded-89ac-9cc4d755f66a";

View File

@ -0,0 +1,71 @@
package com.sucstepsoft.cm_utils.core.beans;
public class PostWeChatTicketBean {
private JumpWxaBean jump_wxa;
private boolean is_expire;
private int expire_type;
private int expire_interval;
public JumpWxaBean getJump_wxa() {
return jump_wxa;
}
public void setJump_wxa(JumpWxaBean jump_wxa) {
this.jump_wxa = jump_wxa;
}
public boolean isIs_expire() {
return is_expire;
}
public void setIs_expire(boolean is_expire) {
this.is_expire = is_expire;
}
public int getExpire_type() {
return expire_type;
}
public void setExpire_type(int expire_type) {
this.expire_type = expire_type;
}
public int getExpire_interval() {
return expire_interval;
}
public void setExpire_interval(int expire_interval) {
this.expire_interval = expire_interval;
}
public static class JumpWxaBean {
private String path;
private String query;
private String env_version;
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getQuery() {
return query;
}
public void setQuery(String query) {
this.query = query;
}
public String getEnv_version() {
return env_version;
}
public void setEnv_version(String env_version) {
this.env_version = env_version;
}
}
}

View File

@ -8,12 +8,13 @@ package com.sucstepsoft.cm_utils.core.retrofit_net;
public class BaseUrlApi {
// public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 测试IP */
// public static final String IP_URL = "https://www.xzszwhy.cn/";/* 测试IP */
public static final String IP_URL = "http://192.168.0.120:8081/";/* 测试IP */
public static final String IP_URL = "https://www.xzszwhy.cn/";/* 测试IP */
// public static final String IP_URL = "http://192.168.0.120:8081/";/* 测试IP */
public static final String BASE_SYSTEM_IP = "http://192.168.0.120:8081/xzszwhy/";/*测试IP*/
// public static final String BASE_SYSTEM_IP = "http://192.168.0.120:8081/xzszwhy/";/*测试IP*/
// public static final String BASE_SYSTEM_IP = "http://v3.xzszwhy.cn/xzszwhy/";/*正式IP*/
// public static final String BASE_SYSTEM_IP = "https://www.xzszwhy.cn/xzszwhy/";/*正式IP*/
public static final String BASE_SYSTEM_IP = "https://www.xzszwhy.cn/xzszwhy/";/*正式IP*/
public static final String BASE_SYSTEM_SOCKET_IP = "wss://www.xzszwhy.cn/xzszwhy/";/*正式IP*/
public static final String PROJECT_NAME = "app/";
public static final String BASE_URL = BASE_SYSTEM_IP;
@ -87,7 +88,7 @@ public class BaseUrlApi {
public static final String APK_DOWNLOAD_URL = "downloadUrl";
public static final String UPDATE_URL = "version.json";
public static final String SOCKET_IP = BASE_SYSTEM_IP + "app/wxeventrelease/";
public static final String SOCKET_IP = BASE_SYSTEM_SOCKET_IP + "app/wxeventrelease/";

View File

@ -23,6 +23,10 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
@ -193,6 +197,8 @@ public class CommonWebActivity extends BaseActivity {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(openlink));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
setResult(RESULT_OK);
finish();
} catch (Exception e) {
e.printStackTrace();
}
@ -201,10 +207,17 @@ public class CommonWebActivity extends BaseActivity {
private RequestBody buildRequestBody() {
PostWeChatTicketBean bean = new PostWeChatTicketBean();
PostWeChatTicketBean.JumpWxaBean subBean = new PostWeChatTicketBean.JumpWxaBean();
subBean.setEnv_version("release");//默认 release 正式版 trial 体验版 develop 开发版
// subBean.setPath("/pages/commonQrCode/commonQrCode");
subBean.setPath("/pages/heritage/heritage");
subBean.setQuery("");
subBean.setEnv_version("trial");//默认 release 正式版 trial 体验版 develop 开发版
subBean.setPath("/pages/commonQrCode/commonQrCode");
String query = "";
String str = "userId=" + UserLgUtils.getUserId();
try {
query = URLEncoder.encode(str, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
subBean.setQuery(query);
bean.setJump_wxa(subBean);
bean.setIs_expire(true);
bean.setExpire_type(1);

View File

@ -210,6 +210,7 @@ public class MainActivity extends BaseActivity {
doCheckPermission();
checkAppVersion();
getUserInfo();
getUserIsPublicCode();
if (!TextUtils.isEmpty(UserLgUtils.getUserId())) {
String params = mActivity.getResources().getString(R.string.big_data_str, "USER", UserLgUtils.getUserId(), "");
bigDataRead(params);
@ -278,6 +279,39 @@ public class MainActivity extends BaseActivity {
fragment.notifyData();
}
/**
* 获取是否关注公众号
*/
private void getUserIsPublicCode() {
if (!TextUtils.isEmpty(UserLgUtils.getUserId())) {
RetrofitManager.getInstance()
.create(BaseApiService.class)
.getIsPublicCode(UserLgUtils.getUserId())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<Boolean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(Boolean baseSuccessBean) {
UserLgUtils.putIsPublicCode(baseSuccessBean);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
}
/**
* 获取用户信息
*/

View File

@ -2,7 +2,10 @@ package com.tengshisoft.mudulemain.cultural.activitys.news;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.graphics.Color;
import android.net.Uri;
@ -20,11 +23,14 @@ import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.core.content.FileProvider;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
@ -44,6 +50,7 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BannerImageTextAllAdapter;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.core.widget.base.CommonWebActivity;
import com.sucstepsoft.cm_utils.core.widget.views.BottomDialogShareView;
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogCommentView;
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
@ -169,6 +176,10 @@ public class NewsLocalDetailActivity extends BaseActivity {
ImageView mIvImgLeft;
@BindView(R2.id.iv_banner_right)
ImageView mIvImgRight;
@BindView(R2.id.btn_public)
Button mBtnPublic;
@BindView(R2.id.rl_public_code)
RelativeLayout mRlPublicCode;
private AddPhotoBean mCurrentBean;
private String mPicPath;
private Unbinder mBind;
@ -191,6 +202,8 @@ public class NewsLocalDetailActivity extends BaseActivity {
private String mPhoto;
private File mDestFile;
private NewsCategoryAdapter mCategoryAdapter;
private ActivityResultLauncher<Intent> mResultLauncher;
private SocketMsg mSocketMsg;
@Override
protected int setLayoutId() {
@ -318,6 +331,20 @@ public class NewsLocalDetailActivity extends BaseActivity {
.navigation();
}
});
mResultLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),
result -> {
int resultCode = result.getResultCode();
if (RESULT_OK == resultCode) {
//打开微信成功
} else {
finish();
}
});
mSocketMsg = new SocketMsg();
IntentFilter filter = new IntentFilter();
filter.addAction(PathConfig.ACTION_FROM_SOCKET_PUSH_MSG);
registerReceiver(mSocketMsg, filter);
getNewsDetail();
String read = String.format(getResources().getString(R.string.big_data_str), "", mNId, "新闻");
bigDataRead(read);
@ -342,6 +369,7 @@ public class NewsLocalDetailActivity extends BaseActivity {
@Override
public void onNext(NewsDetailBean newsDetailBean) {
if (!"".equals(newsDetailBean.getNewsContentId())) {
if (TextUtils.isEmpty(newsDetailBean.getNewsViewAuth())) {
setDataToView(newsDetailBean);
} else {
@ -397,12 +425,17 @@ public class NewsLocalDetailActivity extends BaseActivity {
*/
private void showPublicCodeDialog(NewsDetailBean newsDetailBean) {
if (!UserLgUtils.getIsPublicCode()) {
mRlPublicCode.setVisibility(View.VISIBLE);
mBtnPublic.setOnClickListener(v -> {
Intent intent = new Intent(mActivity, CommonWebActivity.class);
mResultLauncher.launch(intent);
});
} else {
setDataToView(newsDetailBean);
}
}
/**
* 加载详情数据
*
@ -1498,6 +1531,19 @@ public class NewsLocalDetailActivity extends BaseActivity {
}
}
public class SocketMsg extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (PathConfig.ACTION_FROM_SOCKET_PUSH_MSG.equals(action)) {
//关注公众号
String strData = intent.getStringExtra(PathConfig.PUSH_DATA_KEY);
LogUtils.e("二维码返回:" + strData);
}
}
}
@Override
protected void onDestroy() {
mContentView = null;
@ -1505,6 +1551,9 @@ public class NewsLocalDetailActivity extends BaseActivity {
mAudio.pause();
mAudio.release();
}
if (mSocketMsg != null) {
unregisterReceiver(mSocketMsg);
}
if (mVideo != null) {
mVideo.pause();
mVideo.release();

View File

@ -1,12 +1,16 @@
package com.tengshisoft.mudulemain.cultural.socket;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.tengshisoft.mudulemain.cultural.utils.AesUtil;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
@ -307,24 +311,13 @@ public class WsManager implements IWsManager {
}
private void sendNotify(String jsonStr) {
// if (!TextUtils.isEmpty(jsonStr)) {
// LogUtils.e("收到消息:" + jsonStr);
// Intent broadCstIntent = new Intent();
// if (PathConfig.IS_SECRET) {
// try {
// String msg = AesUtil.aesCommonDecoder(PathConfig.SOCKET_MSG_SECRET, jsonStr);
// broadCstIntent.setAction(PathConfig.ACTION_FROM_SOCKET_PUSH_MSG);
// broadCstIntent.putExtra(StatusCode.PUSH_DATA_KEY, msg);
// mContext.sendBroadcast(broadCstIntent);
// } catch (Exception e) {
// e.printStackTrace();
// }
// } else {
// broadCstIntent.setAction(PathConfig.ACTION_FROM_SOCKET_PUSH_MSG);
// broadCstIntent.putExtra(StatusCode.PUSH_DATA_KEY, jsonStr);
// mContext.sendBroadcast(broadCstIntent);
// }
// }
if (!TextUtils.isEmpty(jsonStr)) {
LogUtils.e("收到消息:" + jsonStr);
Intent broadCstIntent = new Intent();
broadCstIntent.setAction(PathConfig.ACTION_FROM_SOCKET_PUSH_MSG);
broadCstIntent.putExtra(PathConfig.PUSH_DATA_KEY, jsonStr);
mContext.sendBroadcast(broadCstIntent);
}
}
public static final class Builder {

View File

@ -8,277 +8,317 @@
tools:context=".cultural.activitys.news.NewsDetailActivity">
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="45dp">
android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView
android:id="@+id/nsl_content"
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:fillViewport="true"
android:scrollbars="none">
android:layout_marginBottom="45dp">
<LinearLayout
<androidx.core.widget.NestedScrollView
android:id="@+id/nsl_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout
android:id="@+id/ll_news_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_title_view"
android:id="@+id/ll_news_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:visibility="gone">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="20dp"
android:paddingRight="20dp"
app:text_type_cus="2"
tools:text="新闻标题" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center"
android:orientation="horizontal">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_source"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/gray_text"
android:textSize="12sp"
tools:text="新闻来源:网络" />
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:textColor="@color/gray_text"
android:textSize="12sp"
tools:text="发布时间:2022-22-22" />
</LinearLayout>
</LinearLayout>
<!--====================视频===========================-->
<LinearLayout
android:id="@+id/ll_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:orientation="vertical">
<com.tengshisoft.moduleijkplayer.player.VideoView
android:id="@+id/vv_video"
android:layout_width="match_parent"
android:layout_height="240dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="目录"
android:textColor="@color/white"
app:text_type_cus="2" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_video_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:padding="5dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_catelog_indic_line"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:text="视频详情"
app:text_type_cus="1" />
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_video_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:layout_marginTop="10dp"
android:text="视频详情"
app:text_type_cus="1" />
</LinearLayout>
</LinearLayout>
<!--====================图片===========================-->
<RelativeLayout
android:id="@+id/rl_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<com.youth.banner.Banner
android:id="@+id/bn_img"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/iv_banner_left"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:src="@drawable/ic_img_arrow_left" />
<ImageView
android:id="@+id/iv_banner_right"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/ic_img_arrow_right" />
</RelativeLayout>
<!--====================音频===========================-->
<LinearLayout
android:id="@+id/ll_audio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="240dp">
<com.tengshisoft.moduleijkplayer.player.VideoView
android:id="@+id/vv_audio"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="目录"
android:textColor="@color/white"
app:text_type_cus="2" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_audio_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp" />
</LinearLayout>
</LinearLayout>
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_title_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp">
android:visibility="gone">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_catelog_indic_line"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:text="音频详情"
app:text_type_cus="1" />
android:gravity="center"
android:paddingLeft="20dp"
android:paddingRight="20dp"
app:text_type_cus="2"
tools:text="新闻标题" />
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_audio_txt"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:layout_marginTop="10dp"
android:text="音频内容"
app:text_type_cus="1" />
android:layout_marginTop="15dp"
android:gravity="center"
android:orientation="horizontal">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_source"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/gray_text"
android:textSize="12sp"
tools:text="新闻来源:网络" />
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:textColor="@color/gray_text"
android:textSize="12sp"
tools:text="发布时间:2022-22-22" />
</LinearLayout>
</LinearLayout>
<!--====================视频===========================-->
<LinearLayout
android:id="@+id/ll_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:orientation="vertical">
<com.tengshisoft.moduleijkplayer.player.VideoView
android:id="@+id/vv_video"
android:layout_width="match_parent"
android:layout_height="240dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="目录"
android:textColor="@color/white"
app:text_type_cus="2" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_video_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:padding="5dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_catelog_indic_line"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:text="视频详情"
app:text_type_cus="1" />
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_video_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:layout_marginTop="10dp"
android:text="视频详情"
app:text_type_cus="1" />
</LinearLayout>
</LinearLayout>
<!--====================图片===========================-->
<RelativeLayout
android:id="@+id/rl_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<com.youth.banner.Banner
android:id="@+id/bn_img"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/iv_banner_left"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:src="@drawable/ic_img_arrow_left" />
<ImageView
android:id="@+id/iv_banner_right"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/ic_img_arrow_right" />
</RelativeLayout>
<!--====================音频===========================-->
<LinearLayout
android:id="@+id/ll_audio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="240dp">
<com.tengshisoft.moduleijkplayer.player.VideoView
android:id="@+id/vv_audio"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="目录"
android:textColor="@color/white"
app:text_type_cus="2" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_audio_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_catelog_indic_line"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:text="音频详情"
app:text_type_cus="1" />
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
android:id="@+id/tv_audio_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:layout_marginTop="10dp"
android:text="音频内容"
app:text_type_cus="1" />
</LinearLayout>
</LinearLayout>
<!--====================文章===========================-->
<com.sucstepsoft.cm_utils.core.widget.views.NestedScrollWebView
android:id="@+id/nwv_content"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scrollbars="none"
android:visibility="gone" />
</LinearLayout>
<!--====================文章===========================-->
<com.sucstepsoft.cm_utils.core.widget.views.NestedScrollWebView
android:id="@+id/nwv_content"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_comment"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scrollbars="none"
android:visibility="gone" />
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
<include
android:id="@+id/ll_input_comment"
layout="@layout/layout_bottom_comment" />
</RelativeLayout>
<include
android:id="@+id/ll_input_comment"
layout="@layout/layout_bottom_comment" />
<RelativeLayout
android:id="@+id/rl_public_code"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="match_parent">
<com.github.mmin18.widget.RealtimeBlurView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:realtimeBlurRadius="20dp"
app:realtimeOverlayColor="#8000" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="关注公众号继续阅读"
android:textColor="@color/white"
android:textSize="@dimen/text_20"
android:textStyle="bold" />
<Button
android:id="@+id/btn_public"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/sel_btn_submit_no_size"
android:text="去关注"
android:textColor="@color/white" />
</RelativeLayout>
</RelativeLayout>

View File

@ -174,6 +174,7 @@ public class SettingActivity extends BaseActivity {
*/
private void loginOut() {
UserLgUtils.setToken("");
UserLgUtils.setId("");
isLogin = false;
mTvLoginOut.setText("登录");
ToastUtils.showShort("退出成功");