新闻添加链接新闻 newContentContent:链接字段 newsContentType=6
This commit is contained in:
parent
27c4b092a1
commit
0a40007ebd
@ -31,5 +31,10 @@
|
||||
<option name="name" value="MavenLocal" />
|
||||
<option name="url" value="file:$USER_HOME$/.m2/repository" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenLocal" />
|
||||
<option name="name" value="MavenLocal" />
|
||||
<option name="url" value="file:$USER_HOME$/.m2/repository/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -12,7 +12,7 @@
|
||||
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_VERSION" value="true" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":10,"versionName":"1.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":12,"versionName":"1.1.2","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}]
|
@ -54,8 +54,8 @@ ext {
|
||||
gCompileSdkVersion = 29
|
||||
gMinSdkVersion = 16
|
||||
gTargetSdkVersion = 29
|
||||
gVersionCode = 10
|
||||
gVersionName = '1.1.0'
|
||||
gVersionCode = 12
|
||||
gVersionName = '1.1.2'
|
||||
gBuildToolsVersion = "29.0.2"
|
||||
// gVersionCode=26
|
||||
// gVersionName='1.3.0'
|
||||
|
@ -100,6 +100,8 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_MAIN_FORGAT_PWD = "/modulemain/activity/forgetpwd";
|
||||
|
||||
public static final String PATH_MODULE_MAIN_CHOOSE_CITY = "/modulemain/activity/choosecity";//选择城市
|
||||
|
||||
public static final String PATH_MODULE_MAIN_NEWS_WEB = "/modulemain/activity/newsweb";//连接新闻页
|
||||
//======================Map==================================================
|
||||
public static final String PATH_MODULE_MAP_NAVIGATION = "/modulemap/activity/navigation";//地图
|
||||
public static final String PATH_MODULE_MAP_SHOW_ICON = "/modulemap/activity/showicon";//文化地图
|
||||
|
@ -24,6 +24,26 @@ public class BaseImageBean {
|
||||
private String title;
|
||||
private int newsType;
|
||||
|
||||
private String newContentContent;
|
||||
|
||||
private String newsContentType;
|
||||
|
||||
public String getNewContentContent() {
|
||||
return newContentContent;
|
||||
}
|
||||
|
||||
public void setNewContentContent(String newContentContent) {
|
||||
this.newContentContent = newContentContent;
|
||||
}
|
||||
|
||||
public String getNewsContentType() {
|
||||
return newsContentType;
|
||||
}
|
||||
|
||||
public void setNewsContentType(String newsContentType) {
|
||||
this.newsContentType = newsContentType;
|
||||
}
|
||||
|
||||
public int getNewsType() {
|
||||
return newsType;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class BaseUrlApi {
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
// public static final String IP = "https://www.wgink.ink/usercenter/";/* 正式IP */
|
||||
public static final String IP = "https://www.xzszwhy.cn/usercenter/";/* 正式IP */
|
||||
// public static final String BASE_SYSTEM_IP = "http://192.168.0.115:8082/";
|
||||
// public static final String BASE_SYSTEM_IP = "http://192.168.0.115:8082/";
|
||||
public static final String BASE_SYSTEM_IP = "https://www.xzszwhy.cn/";
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
public static final String PROJECT_NAME = "app/";
|
||||
@ -37,12 +37,13 @@ public class BaseUrlApi {
|
||||
public static final String BASE_LIVE_IP = BASE_SYSTEM_IP + "live/";
|
||||
public static final String BASE_LIVE_URL = BASE_SYSTEM_IP;//直播回放视频url
|
||||
public static final String BASE_PLACE_IP = BASE_SYSTEM_IP + "venuebooking/";/* 场馆 */
|
||||
// public static final String BASE_PLACE_IP = TEMP_IP + "venuebooking/";/* 场馆 */
|
||||
// public static final String BASE_PLACE_IP = TEMP_IP + "venuebooking/";/* 场馆 */
|
||||
public static final String BASE_PLACE_IMG_IP = BASE_PLACE_IP + "route/file/downloadfile/true/";/* 场馆 */
|
||||
public static final String BASE_CULTURAL_IP = BASE_SYSTEM_IP + "culturalactivity/";/* 文化URL */
|
||||
public static final String BASE_MINE = "http://192.168.0.108:8080/culturalactivity/";/* 我的URL */
|
||||
public static final String BASE_CULTURAL_SHARE = BASE_SYSTEM_IP + "social/";/* 文化分享 */
|
||||
public static final String BASE_NEWS_IP = BASE_SYSTEM_IP + "news/";//新闻
|
||||
// public static final String BASE_NEWS_IP = "http://192.168.0.115:8084/news/";//TODO 新闻本地地址
|
||||
public static final String BASE_LEGACY_IP = BASE_SYSTEM_IP + "library/";//非遗数据库
|
||||
// public static final String BASE_NEWS_DETAIL = "http://192.168.0.104/";//新闻
|
||||
public static final String BASE_NEWS_DETAIL = BASE_SYSTEM_IP;//新闻
|
||||
|
@ -43,7 +43,8 @@ public class BannerImageTextAdapter extends BannerAdapter<BaseImageBean, BannerT
|
||||
.placeholder(R.drawable.ic_img_default_banner)
|
||||
.transform(roundedCornersTransform)
|
||||
.skipMemoryCache(false)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.fitCenter();
|
||||
Glide.with(holder.itemView.getContext())
|
||||
.asBitmap()
|
||||
.load(data.getImgUrl())
|
||||
|
@ -86,8 +86,9 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
protected TextView mTvNotify;
|
||||
protected RelativeLayout mRlTitleBar1;
|
||||
private RelativeLayout mRlTrTitleBar;
|
||||
private Button mBtnTrBack;
|
||||
protected Button mBtnTrBack;
|
||||
private TextView mTvTrTitle;
|
||||
protected LinearLayout mLlTitleBar;
|
||||
protected TypeFaceTextView mTvAppBack;
|
||||
// protected BoomMenuButton mBbMenu;
|
||||
|
||||
@ -235,6 +236,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
* 初始化标题布局
|
||||
*/
|
||||
private void baseActivityInitViews() {
|
||||
mLlTitleBar = findViewById(R.id.ll_title_bar);
|
||||
mRlTrTitleBar = findViewById(R.id.rl_tr_app_title);
|
||||
mBtnTrBack = findViewById(R.id.ib_tr_app_back);
|
||||
mTvTrTitle = findViewById(R.id.tv_app_tr_title);
|
||||
|
@ -7,127 +7,133 @@
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
<!-- ===========标题============= -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_title_bar"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/transparent">
|
||||
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_base_app_activity_title_back"
|
||||
android:id="@+id/rl_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/titleBar"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible">
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/transparent">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_app_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/ib_app_back"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_back_white"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_app_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:maxLength="8"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"
|
||||
tools:text="地址选择地址选择地址选择地址选择地址选择" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_app_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:clickable="true"
|
||||
android:ellipsize="end"
|
||||
android:maxEms="15"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
tools:text="内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_app_publish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:clickable="true"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="@string/app_name" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_app_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/rl_base_app_activity_title_back"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/titleBar"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_img"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_app_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/ib_app_back"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_back_white"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_app_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:maxLength="8"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"
|
||||
tools:text="地址选择地址选择地址选择地址选择地址选择" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_app_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:clickable="true"
|
||||
android:ellipsize="end"
|
||||
android:maxEms="10"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
tools:text="内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙内蒙" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_app_publish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:clickable="true"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/ic_back_white" />
|
||||
tools:text="@string/app_name" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_app_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_img"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/ic_back_white" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_into"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/ic_map_icon" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_into"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/ic_map_icon" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ===========内容============= -->
|
||||
<RelativeLayout
|
||||
|
@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="status_bar_height">25dp</dimen>
|
||||
<dimen name="status_bar_height">50dp</dimen>
|
||||
</resources>
|
||||
|
@ -29,6 +29,11 @@
|
||||
<application
|
||||
android:maxAspectRatio="2.4"
|
||||
android:resizeableActivity="true">
|
||||
<activity
|
||||
android:name=".cultural.activitys.news.NewsWebActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".cultural.activitys.news.NewsPdfActivity"
|
||||
android:launchMode="singleTop"
|
||||
|
@ -14,6 +14,8 @@ import com.baidu.location.BDAbstractLocationListener;
|
||||
import com.baidu.location.BDLocation;
|
||||
import com.baidu.location.LocationClient;
|
||||
import com.baidu.location.LocationClientOption;
|
||||
import com.gyf.immersionbar.BarHide;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.constant.PermissionConstants;
|
||||
@ -113,6 +115,13 @@ public class MainActivity extends BaseActivity {
|
||||
mBnv.setOnNavigationItemSelectedListener(item -> {
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == R.id.tab_home) {
|
||||
ImmersionBar.with(this)
|
||||
.titleBar(mLlTitleBar)
|
||||
.keyboardEnable(false)
|
||||
.statusBarColor(R.color.titleBar)
|
||||
.statusBarDarkFont(false)
|
||||
.init();
|
||||
mLlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar1.setVisibility(View.VISIBLE);
|
||||
mIvInto.setVisibility(View.GONE);
|
||||
@ -123,7 +132,14 @@ public class MainActivity extends BaseActivity {
|
||||
mTvAppBack.setText(city);
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_activity) {
|
||||
ImmersionBar.with(this)
|
||||
.titleBar(mLlTitleBar)
|
||||
.keyboardEnable(false)
|
||||
.statusBarColor(R.color.titleBar)
|
||||
.statusBarDarkFont(false)
|
||||
.init();
|
||||
//活动
|
||||
mLlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar1.setVisibility(View.VISIBLE);
|
||||
mVpContent.setCurrentItem(1, false);
|
||||
@ -133,6 +149,13 @@ public class MainActivity extends BaseActivity {
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_place) {
|
||||
//场馆
|
||||
ImmersionBar.with(this)
|
||||
.titleBar(mLlTitleBar)
|
||||
.keyboardEnable(false)
|
||||
.statusBarColor(R.color.titleBar)
|
||||
.statusBarDarkFont(false)
|
||||
.init();
|
||||
mLlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar1.setVisibility(View.VISIBLE);
|
||||
mLlImg.setVisibility(View.VISIBLE);
|
||||
@ -145,6 +168,13 @@ public class MainActivity extends BaseActivity {
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_cultural) {
|
||||
//文化
|
||||
ImmersionBar.with(this)
|
||||
.titleBar(mLlTitleBar)
|
||||
.keyboardEnable(false)
|
||||
.statusBarColor(R.color.titleBar)
|
||||
.statusBarDarkFont(false)
|
||||
.init();
|
||||
mLlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar1.setVisibility(View.VISIBLE);
|
||||
mIvInto.setVisibility(View.GONE);
|
||||
@ -154,6 +184,11 @@ public class MainActivity extends BaseActivity {
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_mine) {
|
||||
//我的
|
||||
ImmersionBar.with(this)
|
||||
.transparentStatusBar()
|
||||
.fullScreen(true)
|
||||
.init();
|
||||
mLlTitleBar.setVisibility(View.GONE);
|
||||
mRlTitleBar.setVisibility(View.GONE);
|
||||
mRlTitleBar1.setVisibility(View.GONE);
|
||||
mIvInto.setVisibility(View.GONE);
|
||||
|
@ -252,34 +252,42 @@ public class NewsListActivity extends BaseActivity {
|
||||
|
||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||
String url = "";
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
if ("6".equals(rowsBean.getNewsContentType())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||
.withString("url", rowsBean.getNewsContentContent())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.navigation();
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
private void getNewsListByTypeToken(int page) {
|
||||
|
@ -0,0 +1,159 @@
|
||||
package com.tengshisoft.mudulemain.cultural.activitys.news;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import android.webkit.HttpAuthHandler;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.WebBackForwardList;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.StringUtils;
|
||||
import com.tengshisoft.mudulemain.R;
|
||||
import com.tengshisoft.mudulemain.R2;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||
public class NewsWebActivity extends BaseActivity {
|
||||
@BindView(R2.id.rl_content)
|
||||
LinearLayout mRlContent;
|
||||
private Unbinder mBind;
|
||||
private String mUrl;
|
||||
private WebView mWebView;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_news_web;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
ImmersionBar.with(this)
|
||||
.init();
|
||||
mRlTitleBar.setVisibility(View.GONE);
|
||||
mRlTitleBar1.setVisibility(View.GONE);
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
initWebView();
|
||||
}
|
||||
|
||||
private void initWebView() {
|
||||
mWebView = new WebView(mActivity);
|
||||
mWebView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
|
||||
WebSettings settings = mWebView.getSettings();
|
||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
settings.setAppCacheEnabled(true);
|
||||
settings.setJavaScriptEnabled(true);//启用JS
|
||||
settings.setBlockNetworkImage(true);//阻塞页面图片加载
|
||||
settings.setDomStorageEnabled(true);
|
||||
settings.setUseWideViewPort(true);
|
||||
settings.setLoadWithOverviewMode(true);
|
||||
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
||||
mWebView.requestFocus();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
handler.proceed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
view.getSettings().setBlockNetworkImage(false);//开启页面图片加载
|
||||
runOnUiThread(() -> mWebView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
|
||||
super.onReceivedHttpAuthRequest(view, handler, host, realm);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (Build.VERSION.SDK_INT < 26) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
mUrl = getIntent().getStringExtra("url");
|
||||
mWebView.loadUrl(mUrl);
|
||||
mWebView.addJavascriptInterface(NewsWebActivity.this, "android");
|
||||
mRlContent.addView(mWebView);
|
||||
|
||||
}
|
||||
|
||||
//PORTRAIT 竖屏
|
||||
//LANDSCAPE 横屏
|
||||
@JavascriptInterface
|
||||
public void changeOrientation(String orientation) {
|
||||
LogUtils.e(orientation);
|
||||
if ("portrait".equals(orientation)) {
|
||||
runOnUiThread(() -> {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
String url = mWebView.getUrl();
|
||||
if (url.contains(mUrl)) {
|
||||
mRlContent.removeAllViews();
|
||||
mWebView.clearCache(true);
|
||||
mWebView.clearHistory();
|
||||
mWebView.destroy();
|
||||
mWebView = null;
|
||||
initWebView();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
runOnUiThread(() -> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (mBind != null) {
|
||||
mBind.unbind();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mWebView.canGoBack()) {
|
||||
mWebView.goBack();
|
||||
WebBackForwardList webBackForwardList = mWebView.copyBackForwardList();
|
||||
if (webBackForwardList != null && webBackForwardList.getSize() == 2) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
mRlContent.removeAllViews();
|
||||
mWebView.clearCache(true);
|
||||
mWebView.clearHistory();
|
||||
mWebView.destroy();
|
||||
mWebView = null;
|
||||
initWebView();
|
||||
}
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -86,6 +86,15 @@ public class NewsItemBean {
|
||||
private String newsConfigDescriptionText;
|
||||
private String newsConfigWebSwitch;
|
||||
private String newsContentCollectStatus;
|
||||
private String newsContentContent;
|
||||
|
||||
public String getNewsContentContent() {
|
||||
return newsContentContent;
|
||||
}
|
||||
|
||||
public void setNewsContentContent(String newsContentContent) {
|
||||
this.newsContentContent = newsContentContent;
|
||||
}
|
||||
|
||||
public String getNewsContentCollectStatus() {
|
||||
return newsContentCollectStatus;
|
||||
|
@ -21,6 +21,7 @@ import com.sucstepsoft.cm_utils.core.widget.base.BannerImageTextAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ItemSplitDivider;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.moduleactivity.beans.ActivityListBeans;
|
||||
@ -43,6 +44,8 @@ import com.tengshisoft.mudulemain.cultural.net.HomeApi;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.transformer.ScaleInTransformer;
|
||||
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@ -197,18 +200,26 @@ public class HomeFragment extends BaseFragment {
|
||||
getBannerData();
|
||||
mBanner.setOnBannerListener((data, position) -> {
|
||||
BaseImageBean bean = (BaseImageBean) data;
|
||||
if (!TextUtils.isEmpty(bean.getId())) {
|
||||
if ("6".equals(bean.getNewsContentType())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", bean.getId())
|
||||
.withString("url", bean.getUrl())
|
||||
.withString("isComment", bean.getIsComment())//是否可以评论
|
||||
.withString("isCommentImg", bean.getIsCommentImg())//评论是否可以上传图片
|
||||
.withString("isCollect", bean.getIsCollect())
|
||||
.withString("photo", bean.getPhoto())
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||
.withString("title", bean.getTitle())
|
||||
.withInt("type", bean.getNewsType())
|
||||
.withString("url", bean.getNewContentContent())
|
||||
.navigation();
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(bean.getId())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", bean.getId())
|
||||
.withString("url", bean.getUrl())
|
||||
.withString("isComment", bean.getIsComment())//是否可以评论
|
||||
.withString("isCommentImg", bean.getIsCommentImg())//评论是否可以上传图片
|
||||
.withString("isCollect", bean.getIsCollect())
|
||||
.withString("photo", bean.getPhoto())
|
||||
.withString("title", bean.getTitle())
|
||||
.withInt("type", bean.getNewsType())
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
});
|
||||
// ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_NEWS_MAIN).navigation()
|
||||
@ -356,34 +367,42 @@ public class HomeFragment extends BaseFragment {
|
||||
*/
|
||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||
String url = "";
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
if ("6".equals(rowsBean.getNewsContentType())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withString("url", rowsBean.getNewsContentContent())
|
||||
.navigation();
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
private void getBannerData() {
|
||||
@ -416,6 +435,8 @@ public class HomeFragment extends BaseFragment {
|
||||
bean.setIsComment(rowsBean.getNewsConfigComment());
|
||||
bean.setIsCollect(rowsBean.getNewsContentCollectStatus());
|
||||
bean.setTitle(rowsBean.getNewsContentTitle());
|
||||
bean.setNewsContentType(rowsBean.getNewsContentType());
|
||||
bean.setNewContentContent(rowsBean.getNewsContentContent());
|
||||
bean.setNewsType(0);
|
||||
bean.setPhoto(BaseUrlApi.BASE_NEWS_IMG_URL + newsContentCoverId);
|
||||
mBannerList.add(bean);
|
||||
|
@ -95,7 +95,9 @@ public class NewsFragment extends BaseFragment {
|
||||
} else {
|
||||
getNewsListByType(mCurrentPage);
|
||||
}
|
||||
|
||||
mRlvNewsContent.setFocusableInTouchMode(false);
|
||||
mRlvNewsContent.setFocusable(false);
|
||||
mRlvNewsContent.setHasFixedSize(true);
|
||||
}
|
||||
|
||||
private void openNewsList(NewsTabBean newsTabBean) {
|
||||
@ -108,34 +110,42 @@ public class NewsFragment extends BaseFragment {
|
||||
|
||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||
String url = "";
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
if ("6".equals(rowsBean.getNewsContentType())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||
.withString("url", rowsBean.getNewsContentContent())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.navigation();
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
private void getNewsListByTypeToken(int page) {
|
||||
|
12
modulemain/src/main/res/layout/activity_news_web.xml
Normal file
12
modulemain/src/main/res/layout/activity_news_web.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".cultural.activitys.news.NewsWebActivity">
|
||||
|
||||
|
||||
</LinearLayout>
|
4
modulemain/src/main/res/values-v19/dimens.xml
Normal file
4
modulemain/src/main/res/values-v19/dimens.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<dimen name="status_bar_height">50dp</dimen>
|
||||
</resources>
|
@ -3,4 +3,5 @@
|
||||
<dimen name="design_bottom_navigation_active_text_size" tools:override="true">12sp</dimen>
|
||||
<dimen name="design_bottom_navigation_text_size" tools:override="true">12sp</dimen>
|
||||
<dimen name="news_title_text_size" tools:override="true">15sp</dimen>
|
||||
<dimen name="status_bar_height">0dp</dimen>
|
||||
</resources>
|
@ -67,34 +67,42 @@ public class CollectActivity extends BaseActivity {
|
||||
|
||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||
String url = "";
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
if ("6".equals(rowsBean.getNewsContentType())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withString("url", rowsBean.getNewsContentContent())
|
||||
.navigation();
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
int newsType = 0;
|
||||
if (type == 1) {
|
||||
//1自定义列表
|
||||
//3列表详情
|
||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||
//列表
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
newsType = 0;
|
||||
} else {
|
||||
//内容
|
||||
url = rowsBean.getNewsConfigDescriptionText();
|
||||
newsType = 1;
|
||||
}
|
||||
} else {
|
||||
newsType = 0;
|
||||
url = rowsBean.getTemplateRecordUrl();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
||||
.withString("id", rowsBean.getNewsContentId())
|
||||
.withString("url", url)
|
||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||
.withString("title", rowsBean.getNewsContentTitle())
|
||||
.withInt("type", newsType)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
private void getCollectList(int page) {
|
||||
|
BIN
modulemine/src/main/res/drawable-xhdpi/ic_mine_main_bg.jpg
Normal file
BIN
modulemine/src/main/res/drawable-xhdpi/ic_mine_main_bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
@ -20,8 +20,8 @@
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="210dp"
|
||||
android:background="@drawable/ic_mine_center_bg" />
|
||||
android:layout_height="240dp"
|
||||
android:background="@drawable/ic_mine_main_bg" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
Loading…
Reference in New Issue
Block a user