合并分支,选择地区
This commit is contained in:
commit
0160828b0e
@ -52,7 +52,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(':cm_utils')
|
||||
implementation project(':camera')
|
||||
implementation files('libs/tbs.jar')
|
||||
// implementation files('libs/tbs.jar')
|
||||
implementation files('libs/BaiduLBS_Android.jar')
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
BIN
app/libs/tbs.jar
BIN
app/libs/tbs.jar
Binary file not shown.
@ -9,7 +9,6 @@ import com.baidu.mapapi.SDKInitializer;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.refresh.CustomRefreshHeader;
|
||||
import com.tencent.smtt.sdk.QbSdk;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
import cn.jiguang.share.android.api.JShareInterface;
|
||||
|
@ -49,6 +49,11 @@ public class PathConfig {
|
||||
public static final String NEWS_BANNER_ID = "eab0ca3c-d35d-4c02-9397-ace2bdd10fc1";
|
||||
|
||||
public static final String PLACE_TYPE_ID = "df8b758c-f6d8-465a-9aa8-c451fde47076";//场馆类型字典
|
||||
public static final String CITY_DEFAULT_CODE = "640675";
|
||||
public static final String CITY_DEFAULT_NAME = "日喀则市";
|
||||
public static final int CITY_DEFAULT_LEVEL = 3;
|
||||
|
||||
public static final String DID_CITY_CODE = "640675";//日喀则市编码
|
||||
//新闻类型
|
||||
public static final int NEWS_TYPE_MULTI_PIC = 2332;//key_1 三图; key_2 一图左;key_3 一图右;key_4 一图下;key_5 纯文字;key_6 视频;key_7 音频;
|
||||
public static final int NEWS_TYPE_SINGLE_PIC_LEFT = 2333;//一图左
|
||||
@ -89,6 +94,8 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_MAIN_NEWS_MAIN = "/modulemain/activity/newsmain";
|
||||
|
||||
public static final String PATH_MODULE_MAIN_FORGAT_PWD = "/modulemain/activity/forgetpwd";
|
||||
|
||||
public static final String PATH_MODULE_MAIN_CHOOSE_CITY = "/modulemain/activity/choosecity";//选择城市
|
||||
//======================Map==================================================
|
||||
public static final String PATH_MODULE_MAP_NAVIGATION = "/modulemap/activity/navigation";//地图
|
||||
public static final String PATH_MODULE_MAP_SHOW_ICON = "/modulemap/activity/showicon";//文化地图
|
||||
@ -213,4 +220,5 @@ public class PathConfig {
|
||||
//====================Player=======================
|
||||
public static final String PATH_MODULE_PLAYER_SIMPLE_VIDEO = "/moduleplayer/activity/simpleplayer";//单纯播放器
|
||||
|
||||
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ import retrofit2.http.GET;
|
||||
*/
|
||||
public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://219.147.99.164:8081/";/* 正式IP */
|
||||
public static final String IP = "https://www.wgink.ink/usercenter/";/* 测试IP */
|
||||
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 BASE_SYSTEM_IP = "https://www.wgink.ink/";
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
public static final String PROJECT_NAME = "app/";
|
||||
|
@ -15,6 +15,7 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.bean.VersionBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.ApiException;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.BaseObserver;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.BaseUrlInterceptor;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.CommInterceptor;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.RxTransformer;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.download.DownloadUtils;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.listener.DownloadListener;
|
||||
@ -71,7 +72,7 @@ public class RetrofitManager {
|
||||
builder.readTimeout(TIMEOUT, TimeUnit.SECONDS);
|
||||
builder.writeTimeout(TIMEOUT, TimeUnit.SECONDS);
|
||||
//封装公共参数
|
||||
// builder.addInterceptor(new CommInterceptor());
|
||||
builder.addInterceptor(new CommInterceptor());
|
||||
//多BaseUrl连接器
|
||||
builder.addInterceptor(new BaseUrlInterceptor());
|
||||
OkHttpClient client = builder.build();
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.conver;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
@ -33,20 +37,37 @@ public class CommInterceptor implements Interceptor {
|
||||
RequestBody oldBody = oldRequest.body();
|
||||
if (oldBody instanceof FormBody) {
|
||||
FormBody.Builder formBodyBuilder = new FormBody.Builder();
|
||||
// formBodyBuilder.add("token", UserInfoSPUtils.getToken());
|
||||
int cityLevel = UserLgUtils.getCityLevel();
|
||||
if (cityLevel == -1) {
|
||||
cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
}
|
||||
String name = "area" + cityLevel;
|
||||
String areaId = UserLgUtils.getCurrentCityCode();
|
||||
if (TextUtils.isEmpty(areaId)) {
|
||||
areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
}
|
||||
formBodyBuilder.add(name, areaId);
|
||||
newRequestBuild = oldRequest.newBuilder();
|
||||
RequestBody formBody = formBodyBuilder.build();
|
||||
postBodyString = bodyToString(oldRequest.body());
|
||||
postBodyString += ((postBodyString.length() > 0) ? "&" : "") + bodyToString(formBody);
|
||||
// newRequestBuild.post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded;charset=UTF-8"), postBodyString));
|
||||
newRequestBuild.post(RequestBody.create(MediaType.parse("application/json;charset=UTF-8"), postBodyString));
|
||||
} else if (oldBody instanceof MultipartBody) {
|
||||
MultipartBody oldBodyMultipart = (MultipartBody) oldBody;
|
||||
List<MultipartBody.Part> oldPartList = oldBodyMultipart.parts();
|
||||
MultipartBody.Builder builder = new MultipartBody.Builder();
|
||||
builder.setType(MultipartBody.FORM);
|
||||
RequestBody requestBody1 = RequestBody.create(MediaType.parse("text/plain"), "token");
|
||||
MultipartBody.Part partBody = MultipartBody.Part.createFormData("token", UserInfoSPUtils.getToken(), requestBody1);
|
||||
int cityLevel = UserLgUtils.getCityLevel();
|
||||
if (cityLevel == -1) {
|
||||
cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
}
|
||||
String name = "area" + cityLevel;
|
||||
RequestBody requestBody1 = RequestBody.create(MediaType.parse("text/plain"), name);
|
||||
String areaId = UserLgUtils.getCurrentCityCode();
|
||||
if (TextUtils.isEmpty(areaId)) {
|
||||
areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
}
|
||||
MultipartBody.Part partBody = MultipartBody.Part.createFormData(name, areaId, requestBody1);
|
||||
for (MultipartBody.Part part : oldPartList) {
|
||||
builder.addPart(part);
|
||||
postBodyString += (bodyToString(part.body()) + "\n");
|
||||
@ -59,16 +80,35 @@ public class CommInterceptor implements Interceptor {
|
||||
newRequestBuild = oldRequest.newBuilder();
|
||||
FormBody.Builder formBodyBuilder = new FormBody.Builder();
|
||||
formBodyBuilder.addEncoded("Content-Type", "application/json;charset=UTF-8");
|
||||
FormBody token = formBodyBuilder.add("token", UserInfoSPUtils.getToken()).build();
|
||||
int cityLevel = UserLgUtils.getCityLevel();
|
||||
if (cityLevel == -1) {
|
||||
cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
}
|
||||
String name = "area" + cityLevel;
|
||||
String areaId = UserLgUtils.getCurrentCityCode();
|
||||
if (TextUtils.isEmpty(areaId)) {
|
||||
areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
}
|
||||
FormBody token = formBodyBuilder.add(name, areaId).build();
|
||||
newRequestBuild.post(token);
|
||||
}
|
||||
} else {
|
||||
// 添加新的参数
|
||||
int cityLevel = UserLgUtils.getCityLevel();
|
||||
if (cityLevel == -1) {
|
||||
cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
}
|
||||
String name = "area" + cityLevel;
|
||||
String areaId = UserLgUtils.getCurrentCityCode();
|
||||
if (TextUtils.isEmpty(areaId)) {
|
||||
areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
}
|
||||
|
||||
HttpUrl.Builder commonParamsUrlBuilder = oldRequest.url()
|
||||
.newBuilder()
|
||||
.scheme(oldRequest.url().scheme())
|
||||
.host(oldRequest.url().host())
|
||||
.addQueryParameter("token", UserInfoSPUtils.getToken());
|
||||
.addQueryParameter(name, areaId);
|
||||
newRequestBuild = oldRequest.newBuilder()
|
||||
.method(oldRequest.method(), oldRequest.body())
|
||||
.url(commonParamsUrlBuilder.build());
|
||||
|
@ -88,6 +88,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
private RelativeLayout mRlTrTitleBar;
|
||||
private Button mBtnTrBack;
|
||||
private TextView mTvTrTitle;
|
||||
protected TypeFaceTextView mTvAppBack;
|
||||
// protected BoomMenuButton mBbMenu;
|
||||
|
||||
@Override
|
||||
@ -252,6 +253,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
mRlBack = findViewById(R.id.rl_app_back);
|
||||
mRlNotify = findViewById(R.id.rl_notify);
|
||||
mIvNotify = findViewById(R.id.iv_nootify_point);
|
||||
mTvAppBack = findViewById(R.id.tv_app_back);
|
||||
mBtnTrBack.setOnClickListener(v -> {
|
||||
hideSoftKeyboard();
|
||||
finish();
|
||||
|
@ -16,6 +16,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.sucstepsoft.cm_utils.R;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@ -152,8 +153,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// @Override
|
||||
// public void onDetach() {
|
||||
// super.onDetach();
|
||||
// try {
|
||||
|
@ -148,6 +148,22 @@ public class UserLgUtils {
|
||||
return SPUtils.getInstance(SP_USER_INFO).getString("city");
|
||||
}
|
||||
|
||||
public static void setCurrentCity(String city) {
|
||||
SPUtils.getInstance(SP_USER_INFO).put("currentCity", city);
|
||||
}
|
||||
|
||||
public static String getCurrentCity() {
|
||||
return SPUtils.getInstance(SP_USER_INFO).getString("currentCity");
|
||||
}
|
||||
|
||||
public static String getCurrentCityCode() {
|
||||
return SPUtils.getInstance(SP_USER_INFO).getString("currentCityCode");
|
||||
}
|
||||
|
||||
public static void setCurrentCityCode(String code) {
|
||||
SPUtils.getInstance(SP_USER_INFO).put("currentCityCode", code);
|
||||
}
|
||||
|
||||
public static void setLocationAddress(String address) {
|
||||
SPUtils.getInstance(SP_USER_INFO).put("address", address);
|
||||
}
|
||||
@ -171,4 +187,12 @@ public class UserLgUtils {
|
||||
public static void setLocationCityCode(String code) {
|
||||
SPUtils.getInstance(SP_USER_INFO).put("cityCode", code);
|
||||
}
|
||||
|
||||
public static int getCityLevel() {
|
||||
return SPUtils.getInstance(SP_USER_INFO).getInt("cityLevel");
|
||||
}
|
||||
|
||||
public static void setCityLevel(int level) {
|
||||
SPUtils.getInstance(SP_USER_INFO).put("cityLevel", level);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/gray_f1" />
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/gray_f1" />
|
||||
<corners android:radius="80dp" />
|
||||
</shape>
|
@ -24,8 +24,8 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_app_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center">
|
||||
@ -44,6 +44,22 @@
|
||||
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
|
||||
|
@ -8,6 +8,7 @@
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
android.useDeprecatedNdk=true
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
|
@ -38,7 +38,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(':moduleijkplayer')
|
||||
implementation project(':cm_utils')
|
||||
implementation files('libs/tbs.jar')
|
||||
// implementation files('libs/tbs.jar')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
|
Binary file not shown.
@ -2,16 +2,11 @@ package com.tengshisoft.moduleactivity.activity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.PaintDrawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.view.TextureView;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
@ -19,9 +14,7 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseImageBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||
@ -35,8 +28,6 @@ import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tencent.smtt.sdk.WebSettings;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tengshisoft.moduleactivity.R;
|
||||
import com.tengshisoft.moduleactivity.R2;
|
||||
import com.tengshisoft.moduleactivity.beans.ActivityDetail;
|
||||
@ -44,14 +35,12 @@ import com.tengshisoft.moduleactivity.net.ApiActivity;
|
||||
import com.tengshisoft.moduleijkplayer.controller.CompleteView;
|
||||
import com.tengshisoft.moduleijkplayer.controller.ErrorView;
|
||||
import com.tengshisoft.moduleijkplayer.controller.GestureView;
|
||||
import com.tengshisoft.moduleijkplayer.controller.LiveControlView;
|
||||
import com.tengshisoft.moduleijkplayer.controller.PrepareView;
|
||||
import com.tengshisoft.moduleijkplayer.controller.StandardVideoController;
|
||||
import com.tengshisoft.moduleijkplayer.controller.TitleView;
|
||||
import com.tengshisoft.moduleijkplayer.controller.VodControlView;
|
||||
import com.tengshisoft.moduleijkplayer.player.VideoView;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.adapter.BannerAdapter;
|
||||
import com.youth.banner.config.IndicatorConfig;
|
||||
import com.youth.banner.indicator.CircleIndicator;
|
||||
import com.youth.banner.transformer.DepthPageTransformer;
|
||||
|
@ -25,6 +25,7 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.tengshisoft.moduleactivity.R;
|
||||
import com.tengshisoft.moduleactivity.R2;
|
||||
import com.tengshisoft.moduleactivity.adapter.ActivityAdapter;
|
||||
@ -114,7 +115,12 @@ public class ActivityMainFragment extends BaseFragment {
|
||||
mSrlContent.finishRefresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mSrlContent.autoRefresh();
|
||||
}
|
||||
|
||||
private void getTypeList() {
|
||||
|
@ -35,7 +35,7 @@ android {
|
||||
}
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation files('libs/tbs.jar')
|
||||
// implementation files('libs/tbs.jar')
|
||||
implementation project(':cm_utils')
|
||||
implementation project(':moduleplace')
|
||||
implementation project(':moduleactivity')
|
||||
@ -57,6 +57,8 @@ dependencies {
|
||||
implementation "com.scwang.smartrefresh:SmartRefreshLayout:${rootProject.ext.gSmartRefreshLayoutVersion}"
|
||||
//角标
|
||||
implementation 'q.rorbin:badgeview:1.1.3'
|
||||
//流布局
|
||||
implementation 'com.beloo.widget:ChipsLayoutManager:0.3.7@aar'
|
||||
//Rxjava
|
||||
implementation "io.reactivex.rxjava2:rxjava:${rootProject.ext.gRxJavaVersion}"
|
||||
implementation "io.reactivex.rxjava2:rxandroid:${rootProject.ext.gRxAndroid}"
|
||||
|
Binary file not shown.
@ -29,7 +29,14 @@
|
||||
<application
|
||||
android:maxAspectRatio="2.4"
|
||||
android:resizeableActivity="true">
|
||||
<activity android:name=".cultural.activitys.news.NewsPdfActivity"></activity>
|
||||
<activity
|
||||
android:name=".cultural.activitys.news.NewsPdfActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".cultural.activitys.base.ChooseCityActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".cultural.activitys.base.ForgatPwdActivity"
|
||||
android:launchMode="singleTop"
|
||||
|
@ -0,0 +1,499 @@
|
||||
package com.tengshisoft.mudulemain.cultural.activitys.base;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.beloo.widget.chipslayoutmanager.ChipsLayoutManager;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.SPUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.mudulemain.R;
|
||||
import com.tengshisoft.mudulemain.R2;
|
||||
import com.tengshisoft.mudulemain.cultural.adapter.AreaListAdapter;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.AreaListBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.SearchBean;
|
||||
import com.tengshisoft.mudulemain.cultural.net.HomeApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_MAIN_CHOOSE_CITY)
|
||||
public class ChooseCityActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.tv_search)
|
||||
TypeFaceTextView mTvSearch;
|
||||
@BindView(R2.id.tv_current_area)
|
||||
TextView mTvCurrentArea;
|
||||
@BindView(R2.id.rlv_area_1_content)
|
||||
RecyclerView mRlvArea1Content;
|
||||
@BindView(R2.id.tv_area_1_hint)
|
||||
TextView mTvArea1Hint;
|
||||
@BindView(R2.id.rlv_area_2_content)
|
||||
RecyclerView mRlvArea2Content;
|
||||
@BindView(R2.id.tv_area_2_hint)
|
||||
TextView mTvArea2Hint;
|
||||
@BindView(R2.id.rlv_area_3_content)
|
||||
RecyclerView mRlvArea3Content;
|
||||
@BindView(R2.id.tv_area_3_hint)
|
||||
TextView mTvArea3Hint;
|
||||
@BindView(R2.id.rlv_area_4_content)
|
||||
RecyclerView mRlvArea4Content;
|
||||
@BindView(R2.id.tv_area_4_hint)
|
||||
TextView mTvArea4Hint;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
@BindView(R2.id.et_search_text)
|
||||
EditText mEtSearch;
|
||||
@BindView(R2.id.ll_search)
|
||||
LinearLayout mLlSearch;
|
||||
private Unbinder mBind;
|
||||
private String mCurrentCityName = "";
|
||||
private String mCurrentCityCode = "";
|
||||
private AreaListAdapter mArea1Adapter;
|
||||
private AreaListAdapter mArea2Adapter;
|
||||
private AreaListAdapter mArea3Adapter;
|
||||
private AreaListAdapter mArea4Adapter;
|
||||
private List<AreaListBean> mArea1List;
|
||||
private List<AreaListBean> mArea2List;
|
||||
private List<AreaListBean> mArea3List;
|
||||
private List<AreaListBean> mArea4List;
|
||||
private String mCurrentArea1Name = "";
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("地区选择");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("确定");
|
||||
mTvCurrentArea.setText(mCurrentCityName);
|
||||
mTvPublish.setOnClickListener(v -> doChooseArea());
|
||||
if (!TextUtils.isEmpty(UserLgUtils.getCurrentCity())) {
|
||||
mCurrentCityName = UserLgUtils.getCurrentCity();
|
||||
} else {
|
||||
mCurrentCityName = PathConfig.CITY_DEFAULT_NAME;
|
||||
}
|
||||
mTvCurrentArea.setText(mCurrentCityName);
|
||||
mCurrentCityCode = UserLgUtils.getCurrentCityCode();
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
ChipsLayoutManager area1Manager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.setMaxViewsInRow(4)
|
||||
.build();
|
||||
ChipsLayoutManager area2Manager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.setMaxViewsInRow(4)
|
||||
.build();
|
||||
ChipsLayoutManager area3Manager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.setMaxViewsInRow(4)
|
||||
.build();
|
||||
ChipsLayoutManager area4Manager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.setMaxViewsInRow(4)
|
||||
.build();
|
||||
mArea1List = new ArrayList<>();
|
||||
mArea2List = new ArrayList<>();
|
||||
mArea3List = new ArrayList<>();
|
||||
mArea4List = new ArrayList<>();
|
||||
mRlvArea1Content.setLayoutManager(area1Manager);
|
||||
mRlvArea2Content.setLayoutManager(area2Manager);
|
||||
mRlvArea3Content.setLayoutManager(area3Manager);
|
||||
mRlvArea4Content.setLayoutManager(area4Manager);
|
||||
|
||||
mArea1Adapter = new AreaListAdapter(mActivity, mArea1List);
|
||||
mArea2Adapter = new AreaListAdapter(mActivity, mArea2List);
|
||||
mArea3Adapter = new AreaListAdapter(mActivity, mArea3List);
|
||||
mArea4Adapter = new AreaListAdapter(mActivity, mArea4List);
|
||||
|
||||
mRlvArea1Content.setAdapter(mArea1Adapter);
|
||||
mRlvArea2Content.setAdapter(mArea2Adapter);
|
||||
mRlvArea3Content.setAdapter(mArea3Adapter);
|
||||
mRlvArea4Content.setAdapter(mArea4Adapter);
|
||||
|
||||
mArea1Adapter.addOnItemClickListener(areaListBean -> {
|
||||
for (int i = 0; i < mArea1List.size(); i++) {
|
||||
mArea1List.get(i).setCheckEd(areaListBean.getAreaId().equals(mArea1List.get(i).getAreaId()) ? true : false);
|
||||
}
|
||||
mCurrentArea1Name = areaListBean.getAreaName();
|
||||
mArea1Adapter.setData(mArea1List);
|
||||
getArea2List(areaListBean.getAreaId());
|
||||
setCurrentCity(areaListBean, 1);
|
||||
});
|
||||
mArea2Adapter.addOnItemClickListener(areaListBean -> {
|
||||
for (int i = 0; i < mArea2List.size(); i++) {
|
||||
mArea2List.get(i).setCheckEd(areaListBean.getAreaId().equals(mArea2List.get(i).getAreaId()) ? true : false);
|
||||
}
|
||||
mArea2Adapter.setData(mArea2List);
|
||||
setCurrentCity(areaListBean, 2);
|
||||
getArea3List(areaListBean.getAreaId());
|
||||
});
|
||||
mArea3Adapter.addOnItemClickListener(areaListBean -> {
|
||||
for (int i = 0; i < mArea3List.size(); i++) {
|
||||
mArea3List.get(i).setCheckEd(areaListBean.getAreaId().equals(mArea3List.get(i).getAreaId()) ? true : false);
|
||||
}
|
||||
mArea3Adapter.setData(mArea3List);
|
||||
setCurrentCity(areaListBean, 3);
|
||||
getArea4List(areaListBean.getAreaId());
|
||||
});
|
||||
mArea4Adapter.addOnItemClickListener(areaListBean -> {
|
||||
for (int i = 0; i < mArea4List.size(); i++) {
|
||||
mArea4List.get(i).setCheckEd(areaListBean.getAreaId().equals(mArea4List.get(i).getAreaId()) ? true : false);
|
||||
}
|
||||
mArea4Adapter.setData(mArea4List);
|
||||
setCurrentCity(areaListBean, 4);
|
||||
});
|
||||
getArea3List(PathConfig.DID_CITY_CODE);
|
||||
mTvSearch.setOnClickListener(v -> {
|
||||
String searchText = mEtSearch.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(searchText)) {
|
||||
ToastUtils.showShort("请输入查询的地区名称");
|
||||
} else {
|
||||
doSearch(searchText);
|
||||
}
|
||||
});
|
||||
mEtSearch.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
if (hasFocus) {
|
||||
mLlSearch.setVisibility(View.VISIBLE);
|
||||
mNsvContent.setVisibility(View.GONE);
|
||||
} else {
|
||||
mNsvContent.setVisibility(View.VISIBLE);
|
||||
mLlSearch.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
mEtSearch.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
String text = s.toString().trim();
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
mEtSearch.clearFocus();
|
||||
hideSoftKeyboard(mEtSearch);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
* @param searchText
|
||||
*/
|
||||
private void doSearch(String searchText) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "搜索中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(HomeApi.class)
|
||||
.doSearchByKeyword(1, searchText, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SearchBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SearchBean searchBean) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setCurrentCity(AreaListBean bean, int area) {
|
||||
if (area == 1) {
|
||||
|
||||
} else if (area == 2) {
|
||||
for (int i = 0; i < mArea1List.size(); i++) {
|
||||
mArea1List.get(i).setCheckEd(false);
|
||||
}
|
||||
mArea1Adapter.setData(mArea1List);
|
||||
} else if (area == 3) {
|
||||
for (int i = 0; i < mArea2List.size(); i++) {
|
||||
mArea2List.get(i).setCheckEd(false);
|
||||
}
|
||||
mArea2Adapter.setData(mArea2List);
|
||||
} else if (area == 4) {
|
||||
for (int i = 0; i < mArea3List.size(); i++) {
|
||||
mArea3List.get(i).setCheckEd(false);
|
||||
}
|
||||
mArea3Adapter.setData(mArea3List);
|
||||
}
|
||||
// if (!TextUtils.isEmpty(mCurrentArea1Name)) {
|
||||
// if ("北京市".equals(mCurrentArea1Name) || "天津市".equals(mCurrentArea1Name) || "上海市".equals(mCurrentArea1Name) || "重庆市".equals(mCurrentArea1Name)) {
|
||||
// if ("1".equals(bean.getAreaLevel()) && "直辖区".equals(bean.getAreaName())) {
|
||||
// mCurrentCityName = mCurrentArea1Name + "-" + bean.getAreaName();
|
||||
// } else {
|
||||
// mCurrentCityName = bean.getAreaName();
|
||||
// }
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
UserLgUtils.setCityLevel(Integer.parseInt(bean.getAreaLevel()) + 1);
|
||||
mCurrentCityName = bean.getAreaName();
|
||||
mCurrentCityCode = bean.getAreaId();
|
||||
mTvCurrentArea.setText(mCurrentCityName);
|
||||
}
|
||||
|
||||
private void getArea1List() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(HomeApi.class)
|
||||
.getAreaListByPid("0")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<AreaListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<AreaListBean> areaListBean) {
|
||||
dialog.dismiss();
|
||||
mArea1List = areaListBean;
|
||||
mArea1Adapter.setData(mArea1List);
|
||||
mTvArea1Hint.setVisibility(View.GONE);
|
||||
|
||||
mArea2List.clear();
|
||||
mArea2Adapter.setData(mArea2List);
|
||||
mTvArea2Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea2Hint.setText("请选择");
|
||||
|
||||
mArea3List.clear();
|
||||
mArea3Adapter.setData(mArea2List);
|
||||
mTvArea3Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea3Hint.setText("请选择");
|
||||
|
||||
mArea4List.clear();
|
||||
mArea4Adapter.setData(mArea2List);
|
||||
mTvArea4Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea4Hint.setText("请选择");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getArea2List(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(HomeApi.class)
|
||||
.getAreaListByPid(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<AreaListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<AreaListBean> areaListBean) {
|
||||
dialog.dismiss();
|
||||
if (areaListBean != null && areaListBean.size() > 0) {
|
||||
mArea2List = areaListBean;
|
||||
mArea2Adapter.setData(mArea2List);
|
||||
mTvArea2Hint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mArea2List.clear();
|
||||
mArea2Adapter.setData(mArea2List);
|
||||
mTvArea2Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea2Hint.setText("暂无数据");
|
||||
}
|
||||
|
||||
mArea3List.clear();
|
||||
mArea3Adapter.setData(mArea3List);
|
||||
mTvArea3Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea3Hint.setText("请选择");
|
||||
|
||||
mArea4List.clear();
|
||||
mArea4Adapter.setData(mArea4List);
|
||||
mTvArea4Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea4Hint.setText("请选择");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getArea3List(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(HomeApi.class)
|
||||
.getAreaListByPid(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<AreaListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<AreaListBean> areaListBean) {
|
||||
dialog.dismiss();
|
||||
if (areaListBean != null && areaListBean.size() > 0) {
|
||||
mArea3List = areaListBean;
|
||||
mArea3Adapter.setData(mArea3List);
|
||||
mTvArea3Hint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mArea3List.clear();
|
||||
mArea3Adapter.setData(mArea3List);
|
||||
mTvArea3Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea3Hint.setText("暂无数据");
|
||||
}
|
||||
mArea4List.clear();
|
||||
mArea4Adapter.setData(mArea4List);
|
||||
mTvArea4Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea4Hint.setText("请选择");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//640675
|
||||
private void getArea4List(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(HomeApi.class)
|
||||
.getAreaListByPid(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<AreaListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<AreaListBean> areaListBean) {
|
||||
dialog.dismiss();
|
||||
if (areaListBean != null && areaListBean.size() > 0) {
|
||||
mArea4List = areaListBean;
|
||||
mTvArea4Hint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mArea4List.clear();
|
||||
mTvArea4Hint.setVisibility(View.VISIBLE);
|
||||
mTvArea4Hint.setText("暂无数据");
|
||||
}
|
||||
mArea4Adapter.setData(mArea4List);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定选择
|
||||
*/
|
||||
private void doChooseArea() {
|
||||
if (TextUtils.isEmpty(mCurrentCityCode)) {
|
||||
ToastUtils.showShort("请选择地区");
|
||||
} else {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("chooseCity", mCurrentCityName);
|
||||
intent.putExtra("chooseCityCode", mCurrentCityCode);
|
||||
setResult(333, intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (mBind != null) {
|
||||
mBind.unbind();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_choose_city;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -33,12 +33,16 @@ import com.sucstepsoft.cm_utils.core.widget.views.CenterDialogUpdateView;
|
||||
import com.sucstepsoft.cm_utils.utils.FileUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.PermissionUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.SPUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.mudulemain.R;
|
||||
import com.tengshisoft.mudulemain.R2;
|
||||
import com.tengshisoft.mudulemain.cultural.fragment.HomeFragment;
|
||||
import com.tengshisoft.mudulemain.cultural.net.HomeApi;
|
||||
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -46,6 +50,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
@ -89,13 +94,17 @@ public class MainActivity extends BaseActivity {
|
||||
Fragment placeFragment = FragmentUtils.getPlaceFragment();
|
||||
Fragment culturalFragment = FragmentUtils.getCulturalFragment();
|
||||
Fragment mineMainFragment = FragmentUtils.getMineFragment();
|
||||
|
||||
mFragments.add(homefragment);
|
||||
mFragments.add(activityFragment);
|
||||
mFragments.add(placeFragment);
|
||||
mFragments.add(culturalFragment);
|
||||
mFragments.add(mineMainFragment);
|
||||
|
||||
String locationCity = UserLgUtils.getCurrentCity();
|
||||
if (TextUtils.isEmpty(locationCity)) {
|
||||
UserLgUtils.setCurrentCity(PathConfig.CITY_DEFAULT_NAME);
|
||||
UserLgUtils.setCurrentCityCode(PathConfig.CITY_DEFAULT_CODE);
|
||||
UserLgUtils.setCityLevel(PathConfig.CITY_DEFAULT_LEVEL);
|
||||
}
|
||||
mVpContent.setAdapter(new MyFragmentPageAdapter(this));
|
||||
mVpContent.setUserInputEnabled(false);
|
||||
//TODO 系统字体
|
||||
@ -109,6 +118,9 @@ public class MainActivity extends BaseActivity {
|
||||
mIvInto.setVisibility(View.GONE);
|
||||
mVpContent.setCurrentItem(0, false);
|
||||
mTvBaseTitle.setText("日喀则市数字文化云");
|
||||
mTvAppBack.setVisibility(View.VISIBLE);
|
||||
String city = TextUtils.isEmpty(UserLgUtils.getCurrentCity()) ? "地区选择" : UserLgUtils.getCurrentCity();
|
||||
mTvAppBack.setText(city);
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_activity) {
|
||||
//活动
|
||||
@ -117,6 +129,7 @@ public class MainActivity extends BaseActivity {
|
||||
mVpContent.setCurrentItem(1, false);
|
||||
mIvInto.setVisibility(View.GONE);
|
||||
mTvBaseTitle.setText(item.getTitle());
|
||||
mTvAppBack.setVisibility(View.GONE);
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_place) {
|
||||
//场馆
|
||||
@ -124,6 +137,7 @@ public class MainActivity extends BaseActivity {
|
||||
mRlTitleBar1.setVisibility(View.VISIBLE);
|
||||
mLlImg.setVisibility(View.VISIBLE);
|
||||
mIvInto.setVisibility(View.VISIBLE);
|
||||
mTvAppBack.setVisibility(View.GONE);
|
||||
mVpContent.setCurrentItem(2, false);
|
||||
mTvBaseTitle.setText(item.getTitle());
|
||||
mIvInto.setOnClickListener(v -> ARouter.getInstance()
|
||||
@ -136,6 +150,7 @@ public class MainActivity extends BaseActivity {
|
||||
mIvInto.setVisibility(View.GONE);
|
||||
mVpContent.setCurrentItem(3, false);
|
||||
mTvBaseTitle.setText(item.getTitle());
|
||||
mTvAppBack.setVisibility(View.GONE);
|
||||
return true;
|
||||
} else if (itemId == R.id.tab_mine) {
|
||||
//我的
|
||||
@ -150,6 +165,12 @@ public class MainActivity extends BaseActivity {
|
||||
});
|
||||
mRlTitleBar.setVisibility(View.VISIBLE);
|
||||
mRlTitleBar1.setVisibility(View.VISIBLE);
|
||||
mTvAppBack.setVisibility(View.VISIBLE);
|
||||
String city = TextUtils.isEmpty(UserLgUtils.getCurrentCity()) ? "地区选择" : UserLgUtils.getCurrentCity();
|
||||
mTvAppBack.setText(city);
|
||||
mTvAppBack.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_CHOOSE_CITY)
|
||||
.navigation(mActivity, 1234));
|
||||
doCheckPermission();
|
||||
checkAppVersion();
|
||||
getUserInfo();
|
||||
@ -189,6 +210,30 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (requestCode == 1234) {
|
||||
if (resultCode == 333) {
|
||||
String chooseCity = data.getStringExtra("chooseCity");
|
||||
String chooseCityCode = data.getStringExtra("chooseCityCode");
|
||||
UserLgUtils.setCurrentCity(chooseCity);
|
||||
UserLgUtils.setCurrentCityCode(chooseCityCode);
|
||||
LogUtils.e(chooseCityCode + "===" + chooseCity);
|
||||
mTvAppBack.setText(chooseCity);
|
||||
refreshData();
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新加载数据
|
||||
*/
|
||||
private void refreshData() {
|
||||
HomeFragment fragment = (HomeFragment) mFragments.get(0);
|
||||
fragment.notifyData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
@ -372,7 +417,10 @@ public class MainActivity extends BaseActivity {
|
||||
double longitude = location.getLongitude();
|
||||
float radius = location.getRadius();
|
||||
if (latitude != Double.MIN_VALUE && longitude != Double.MIN_VALUE && radius <= 300) {
|
||||
UserLgUtils.setLocationCity(location.getCity());
|
||||
// UserLgUtils.setLocationCity(location.getCity());
|
||||
// if (TextUtils.isEmpty(UserLgUtils.getCurrentCity())) {
|
||||
// mTvAppBack.setText(location.getCity());
|
||||
// }
|
||||
UserLgUtils.setLocationAddress(location.getAddrStr());
|
||||
UserLgUtils.setLocationLat(latitude + "");
|
||||
UserLgUtils.setLocationLng(longitude + "");
|
||||
|
@ -0,0 +1,42 @@
|
||||
package com.tengshisoft.mudulemain.cultural.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Layout;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tengshisoft.mudulemain.R;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.AreaListBean;
|
||||
import com.tengshisoft.mudulemain.cultural.holder.AreaHolder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/7/21 - 10:56 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class AreaListAdapter extends BaseRecyclerAdapter<AreaListBean, AreaHolder> {
|
||||
public AreaListAdapter(Context ctx, List<AreaListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AreaHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_area_layout, parent, false);
|
||||
return new AreaHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(AreaHolder areaHolder, int i) {
|
||||
AreaListBean bea = mData.get(i);
|
||||
areaHolder.mCbName.setOnCheckedChangeListener(null);
|
||||
areaHolder.mCbName.setText(bea.getAreaName());
|
||||
areaHolder.mCbName.setChecked(bea.isCheckEd());
|
||||
areaHolder.mCbName.setOnCheckedChangeListener((buttonView, isChecked) -> mListener.onItemClickListen(bea));
|
||||
}
|
||||
}
|
@ -0,0 +1,197 @@
|
||||
package com.tengshisoft.mudulemain.cultural.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/7/21 - 10:49 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class AreaListBean {
|
||||
|
||||
/**
|
||||
* areaCityCode : string
|
||||
* areaCode : string
|
||||
* areaFirst : string
|
||||
* areaId : string
|
||||
* areaLat : string
|
||||
* areaLevel : string
|
||||
* areaLng : string
|
||||
* areaMergerName : string
|
||||
* areaName : string
|
||||
* areaParentId : string
|
||||
* areaParentName : string
|
||||
* areaPinyin : string
|
||||
* areaShortName : string
|
||||
* areaZipCode : string
|
||||
* parent : true
|
||||
* subArea : [{}]
|
||||
*/
|
||||
|
||||
private String areaCityCode;
|
||||
private String areaCode;
|
||||
private String areaFirst;
|
||||
private String areaId;
|
||||
private String areaLat;
|
||||
private String areaLevel;
|
||||
private String areaLng;
|
||||
private String areaMergerName;
|
||||
private String areaName;
|
||||
private String areaParentId;
|
||||
private String areaParentName;
|
||||
private String areaPinyin;
|
||||
private String areaShortName;
|
||||
private String areaZipCode;
|
||||
private boolean parent;
|
||||
private boolean checkEd;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AreaListBean{" +
|
||||
"areaName='" + areaName + '\'' +
|
||||
", checkEd=" + checkEd +
|
||||
'}';
|
||||
}
|
||||
|
||||
public boolean isCheckEd() {
|
||||
return checkEd;
|
||||
}
|
||||
|
||||
public void setCheckEd(boolean checkEd) {
|
||||
this.checkEd = checkEd;
|
||||
}
|
||||
|
||||
private List<SubAreaBean> subArea;
|
||||
|
||||
public String getAreaCityCode() {
|
||||
return areaCityCode;
|
||||
}
|
||||
|
||||
public void setAreaCityCode(String areaCityCode) {
|
||||
this.areaCityCode = areaCityCode;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaFirst() {
|
||||
return areaFirst;
|
||||
}
|
||||
|
||||
public void setAreaFirst(String areaFirst) {
|
||||
this.areaFirst = areaFirst;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getAreaLat() {
|
||||
return areaLat;
|
||||
}
|
||||
|
||||
public void setAreaLat(String areaLat) {
|
||||
this.areaLat = areaLat;
|
||||
}
|
||||
|
||||
public String getAreaLevel() {
|
||||
return areaLevel;
|
||||
}
|
||||
|
||||
public void setAreaLevel(String areaLevel) {
|
||||
this.areaLevel = areaLevel;
|
||||
}
|
||||
|
||||
public String getAreaLng() {
|
||||
return areaLng;
|
||||
}
|
||||
|
||||
public void setAreaLng(String areaLng) {
|
||||
this.areaLng = areaLng;
|
||||
}
|
||||
|
||||
public String getAreaMergerName() {
|
||||
return areaMergerName;
|
||||
}
|
||||
|
||||
public void setAreaMergerName(String areaMergerName) {
|
||||
this.areaMergerName = areaMergerName;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getAreaParentId() {
|
||||
return areaParentId;
|
||||
}
|
||||
|
||||
public void setAreaParentId(String areaParentId) {
|
||||
this.areaParentId = areaParentId;
|
||||
}
|
||||
|
||||
public String getAreaParentName() {
|
||||
return areaParentName;
|
||||
}
|
||||
|
||||
public void setAreaParentName(String areaParentName) {
|
||||
this.areaParentName = areaParentName;
|
||||
}
|
||||
|
||||
public String getAreaPinyin() {
|
||||
return areaPinyin;
|
||||
}
|
||||
|
||||
public void setAreaPinyin(String areaPinyin) {
|
||||
this.areaPinyin = areaPinyin;
|
||||
}
|
||||
|
||||
public String getAreaShortName() {
|
||||
return areaShortName;
|
||||
}
|
||||
|
||||
public void setAreaShortName(String areaShortName) {
|
||||
this.areaShortName = areaShortName;
|
||||
}
|
||||
|
||||
public String getAreaZipCode() {
|
||||
return areaZipCode;
|
||||
}
|
||||
|
||||
public void setAreaZipCode(String areaZipCode) {
|
||||
this.areaZipCode = areaZipCode;
|
||||
}
|
||||
|
||||
public boolean isParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(boolean parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<SubAreaBean> getSubArea() {
|
||||
return subArea;
|
||||
}
|
||||
|
||||
public void setSubArea(List<SubAreaBean> subArea) {
|
||||
this.subArea = subArea;
|
||||
}
|
||||
|
||||
public static class SubAreaBean {
|
||||
}
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.tengshisoft.mudulemain.cultural.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/7/27 - 9:19 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SearchBean {
|
||||
|
||||
/**
|
||||
* page : 1
|
||||
* rows : [{"areaCityCode":"string","areaCode":"string","areaFirst":"string","areaId":"string","areaLat":"string","areaLevel":"string","areaLng":"string","areaMergerName":"string","areaName":"string","areaParentId":"string","areaParentName":"string","areaPinyin":"string","areaShortName":"string","areaZipCode":"string","parent":true,"subArea":[{}]}]
|
||||
* total : 20
|
||||
*/
|
||||
|
||||
private int page;
|
||||
private int total;
|
||||
private List<RowsBean> rows;
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<RowsBean> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<RowsBean> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public static class RowsBean {
|
||||
/**
|
||||
* areaCityCode : string
|
||||
* areaCode : string
|
||||
* areaFirst : string
|
||||
* areaId : string
|
||||
* areaLat : string
|
||||
* areaLevel : string
|
||||
* areaLng : string
|
||||
* areaMergerName : string
|
||||
* areaName : string
|
||||
* areaParentId : string
|
||||
* areaParentName : string
|
||||
* areaPinyin : string
|
||||
* areaShortName : string
|
||||
* areaZipCode : string
|
||||
* parent : true
|
||||
* subArea : [{}]
|
||||
*/
|
||||
|
||||
private String areaCityCode;
|
||||
private String areaCode;
|
||||
private String areaFirst;
|
||||
private String areaId;
|
||||
private String areaLat;
|
||||
private String areaLevel;
|
||||
private String areaLng;
|
||||
private String areaMergerName;
|
||||
private String areaName;
|
||||
private String areaParentId;
|
||||
private String areaParentName;
|
||||
private String areaPinyin;
|
||||
private String areaShortName;
|
||||
private String areaZipCode;
|
||||
private boolean parent;
|
||||
private List<SubAreaBean> subArea;
|
||||
|
||||
public String getAreaCityCode() {
|
||||
return areaCityCode;
|
||||
}
|
||||
|
||||
public void setAreaCityCode(String areaCityCode) {
|
||||
this.areaCityCode = areaCityCode;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaFirst() {
|
||||
return areaFirst;
|
||||
}
|
||||
|
||||
public void setAreaFirst(String areaFirst) {
|
||||
this.areaFirst = areaFirst;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getAreaLat() {
|
||||
return areaLat;
|
||||
}
|
||||
|
||||
public void setAreaLat(String areaLat) {
|
||||
this.areaLat = areaLat;
|
||||
}
|
||||
|
||||
public String getAreaLevel() {
|
||||
return areaLevel;
|
||||
}
|
||||
|
||||
public void setAreaLevel(String areaLevel) {
|
||||
this.areaLevel = areaLevel;
|
||||
}
|
||||
|
||||
public String getAreaLng() {
|
||||
return areaLng;
|
||||
}
|
||||
|
||||
public void setAreaLng(String areaLng) {
|
||||
this.areaLng = areaLng;
|
||||
}
|
||||
|
||||
public String getAreaMergerName() {
|
||||
return areaMergerName;
|
||||
}
|
||||
|
||||
public void setAreaMergerName(String areaMergerName) {
|
||||
this.areaMergerName = areaMergerName;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getAreaParentId() {
|
||||
return areaParentId;
|
||||
}
|
||||
|
||||
public void setAreaParentId(String areaParentId) {
|
||||
this.areaParentId = areaParentId;
|
||||
}
|
||||
|
||||
public String getAreaParentName() {
|
||||
return areaParentName;
|
||||
}
|
||||
|
||||
public void setAreaParentName(String areaParentName) {
|
||||
this.areaParentName = areaParentName;
|
||||
}
|
||||
|
||||
public String getAreaPinyin() {
|
||||
return areaPinyin;
|
||||
}
|
||||
|
||||
public void setAreaPinyin(String areaPinyin) {
|
||||
this.areaPinyin = areaPinyin;
|
||||
}
|
||||
|
||||
public String getAreaShortName() {
|
||||
return areaShortName;
|
||||
}
|
||||
|
||||
public void setAreaShortName(String areaShortName) {
|
||||
this.areaShortName = areaShortName;
|
||||
}
|
||||
|
||||
public String getAreaZipCode() {
|
||||
return areaZipCode;
|
||||
}
|
||||
|
||||
public void setAreaZipCode(String areaZipCode) {
|
||||
this.areaZipCode = areaZipCode;
|
||||
}
|
||||
|
||||
public boolean isParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(boolean parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<SubAreaBean> getSubArea() {
|
||||
return subArea;
|
||||
}
|
||||
|
||||
public void setSubArea(List<SubAreaBean> subArea) {
|
||||
this.subArea = subArea;
|
||||
}
|
||||
|
||||
public static class SubAreaBean {
|
||||
}
|
||||
}
|
||||
}
|
@ -423,6 +423,8 @@ public class HomeFragment extends BaseFragment {
|
||||
mBannerImageAdapter.notifyDataSetChanged();
|
||||
mBanner.start();
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -721,4 +723,14 @@ public class HomeFragment extends BaseFragment {
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_home;
|
||||
}
|
||||
|
||||
public void notifyData() {
|
||||
//重新加载数据
|
||||
mMainCommendBeans.clear();
|
||||
buildBannerData();
|
||||
getNewsList(null);
|
||||
getLiveList();
|
||||
getMainCommendList();
|
||||
getBannerData();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.tengshisoft.mudulemain.cultural.holder;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.mudulemain.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/7/21 - 10:56 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class AreaHolder extends RecyclerView.ViewHolder {
|
||||
public CheckBox mCbName;
|
||||
|
||||
public AreaHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mCbName = itemView.findViewById(R.id.cb_name);
|
||||
}
|
||||
}
|
@ -5,10 +5,12 @@ import com.tengshisoft.moduleactivity.beans.ActivityListBeans;
|
||||
import com.tengshisoft.modulecultural.bean.CulturalLiveBean;
|
||||
import com.tengshisoft.modulecultural.bean.LegacyListBean;
|
||||
import com.tengshisoft.moduleplace.beans.PlaceListBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.AreaListBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.BaseUserBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.CommentListBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.NewsItemBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.NewsTabBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.SearchBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -236,4 +238,24 @@ public interface HomeApi {
|
||||
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json"})
|
||||
@GET("app/liveplan/listpageliveplanrelease")
|
||||
Observable<CulturalLiveBean> getLiveRecord(@Query("page") String page, @Query("rows") String rows);
|
||||
|
||||
/**
|
||||
* 统一用户-获取区域
|
||||
*
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@GET("app/dataarea/listareabyparentidrelease/{areaParentId}")
|
||||
Observable<List<AreaListBean>> getAreaListByPid(@Path("areaParentId") String pId);
|
||||
|
||||
/**
|
||||
* 统一用户-获取区域-搜索
|
||||
*
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@GET("app/dataarea/listpagearea")
|
||||
Observable<SearchBean> doSearchByKeyword(@Query("page") int page, @Query("keywords") String key, @Header("token") String token);
|
||||
}
|
||||
|
6
modulemain/src/main/res/drawable/sel_line_ra_3.xml
Normal file
6
modulemain/src/main/res/drawable/sel_line_ra_3.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/shape_red_line_ra_2" android:state_checked="true" />
|
||||
<item android:drawable="@drawable/shape_gray_line_ra_2" android:state_checked="false" />
|
||||
|
||||
</selector>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/gray_BA" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
8
modulemain/src/main/res/drawable/shape_red_line_ra_2.xml
Normal file
8
modulemain/src/main/res/drawable/shape_red_line_ra_2.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/app_title" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
310
modulemain/src/main/res/layout/activity_choose_city.xml
Normal file
310
modulemain/src/main/res/layout/activity_choose_city.xml
Normal file
@ -0,0 +1,310 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:context=".cultural.activitys.base.ChooseCityActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_search_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_search_input_box"
|
||||
android:hint="请输入地区名称"
|
||||
android:padding="5dp"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_activity_sign_up_no_ra"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/col_verify_text" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smrl_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nsv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="14dp"
|
||||
android:background="@color/app_title" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:text="当前选择"
|
||||
android:textColor="#242424"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_area"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/shape_search_input_box"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textColor="@color/app_title"
|
||||
android:textSize="16sp"
|
||||
tools:text="呼和浩特" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="14dp"
|
||||
android:background="@color/app_title" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:text="省、自治区、直辖市、特别行政区"
|
||||
android:textColor="#242424"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_area_1_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_1_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:text="请选择"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="14dp"
|
||||
android:background="@color/app_title" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:text="地级市、地区、自治州、盟"
|
||||
android:textColor="#242424"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_area_2_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_2_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:text="请选择"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="14dp"
|
||||
android:background="@color/app_title" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:text="市辖区、县级市、县、自治县"
|
||||
android:textColor="#242424"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_area_3_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_3_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:text="请选择"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="14dp"
|
||||
android:background="@color/app_title" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:text="街道、镇、乡、县辖区"
|
||||
android:textColor="#242424"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_area_4_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_4_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:text="请选择"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
21
modulemain/src/main/res/layout/item_area_layout.xml
Normal file
21
modulemain/src/main/res/layout/item_area_layout.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sel_line_ra_3"
|
||||
android:button="@null"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textColor="@color/col_blace_red"
|
||||
tools:text="梅里斯达斡尔族区" />
|
||||
</LinearLayout>
|
@ -36,7 +36,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation files('libs/tbs.jar')
|
||||
// implementation files('libs/tbs.jar')
|
||||
implementation files('libs/BaiduLBS_Android.jar')
|
||||
implementation project(':cm_utils')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
|
Binary file not shown.
@ -36,7 +36,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(':cm_utils')
|
||||
implementation files('libs/tbs.jar')
|
||||
// implementation files('libs/tbs.jar')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
|
Binary file not shown.
@ -1,10 +1,10 @@
|
||||
package com.tengshisoft.moduleplace.activitys;
|
||||
|
||||
import android.webkit.WebView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
import com.tengshisoft.moduleplace.R2;
|
||||
import com.tengshisoft.moduleplace.beans.NoticeDetailBean;
|
||||
|
@ -1,10 +1,7 @@
|
||||
package com.tengshisoft.moduleplace.activitys;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.LinearLayout;
|
||||
@ -12,8 +9,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseImageBean;
|
||||
@ -23,14 +18,10 @@ import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseBannerImageAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tencent.smtt.sdk.WebViewClient;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
import com.tengshisoft.moduleplace.R2;
|
||||
import com.tengshisoft.moduleplace.beans.PlaceDetailBean;
|
||||
import com.tengshisoft.moduleplace.beans.PlaceSubjectBean;
|
||||
import com.tengshisoft.moduleplace.fragment.SubjectDescFragment;
|
||||
import com.tengshisoft.moduleplace.net.ApiPlace;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.config.IndicatorConfig;
|
||||
@ -38,17 +29,9 @@ import com.youth.banner.indicator.CircleIndicator;
|
||||
import com.youth.banner.transformer.DepthPageTransformer;
|
||||
import com.youth.banner.util.BannerUtils;
|
||||
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
@ -3,7 +3,6 @@ package com.tengshisoft.moduleplace.fragment;
|
||||
import android.view.View;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
import com.tengshisoft.moduleplace.R2;
|
||||
|
||||
|
@ -3,11 +3,8 @@ package com.tengshisoft.moduleplace.fragment;
|
||||
import android.view.View;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
import com.tengshisoft.moduleplace.R2;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
@ -18,8 +15,8 @@ import butterknife.Unbinder;
|
||||
* 描述: 详情
|
||||
*/
|
||||
public class SubjectIntroduceFragment extends BaseFragment {
|
||||
@BindView(R2.id.wv_introduce)
|
||||
WebView mWvIntroduce;
|
||||
// @BindView(R2.id.wv_introduce)
|
||||
// WebView mWvIntroduce;
|
||||
|
||||
private Unbinder mBind;
|
||||
|
||||
@ -54,9 +51,9 @@ public class SubjectIntroduceFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mWvIntroduce != null) {
|
||||
mWvIntroduce.destroy();
|
||||
}
|
||||
// if (mWvIntroduce != null) {
|
||||
// mWvIntroduce.destroy();
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package com.tengshisoft.moduleplace.fragment;
|
||||
import android.view.View;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
import com.tengshisoft.moduleplace.R2;
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.tengshisoft.moduleplace.fragment;
|
||||
import android.view.View;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
import com.tengshisoft.moduleplace.R2;
|
||||
|
||||
|
@ -3,10 +3,7 @@ package com.tengshisoft.moduleplace.widget;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
|
||||
import java.util.Map;
|
||||
import android.webkit.WebView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
@ -18,7 +15,7 @@ public class NewsNoClickWebView extends WebView {
|
||||
|
||||
|
||||
public NewsNoClickWebView(Context context, boolean b) {
|
||||
super(context, b);
|
||||
super(context);
|
||||
}
|
||||
|
||||
public NewsNoClickWebView(Context context) {
|
||||
@ -37,9 +34,9 @@ public class NewsNoClickWebView extends WebView {
|
||||
super(context, attributeSet, i, b);
|
||||
}
|
||||
|
||||
public NewsNoClickWebView(Context context, AttributeSet attributeSet, int i, Map<String, Object> map, boolean b) {
|
||||
super(context, attributeSet, i, map, b);
|
||||
}
|
||||
// public NewsNoClickWebView(Context context, AttributeSet attributeSet, int i, Map<String, Object> map, boolean b) {
|
||||
// super(context, attributeSet, i, map, b);
|
||||
// }
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int mExpandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
|
||||
|
@ -49,7 +49,7 @@
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/gray_line" />
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
<WebView
|
||||
android:id="@+id/wv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
<WebView
|
||||
android:id="@+id/wv_introduce"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
@ -4,8 +4,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
android:id="@+id/wv_introduce"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<!-- <com.tencent.smtt.sdk.WebView-->
|
||||
<!-- android:id="@+id/wv_introduce"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content" />-->
|
||||
</LinearLayout>
|
@ -4,7 +4,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
<WebView
|
||||
android:id="@+id/wv_introduce"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
<WebView
|
||||
android:id="@+id/wv_introduce"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
@ -1,12 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView 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="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp">
|
||||
android:layout_marginBottom="5dp"
|
||||
app:cardCornerRadius="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user