新闻详情接口方式
This commit is contained in:
parent
34e2a6d41e
commit
5618891fd1
@ -96,7 +96,6 @@ public class PathConfig {
|
|||||||
public static final String PATH_MODULE_MAIN_PLAN = "/modulemain/activity/planMap";
|
public static final String PATH_MODULE_MAIN_PLAN = "/modulemain/activity/planMap";
|
||||||
public static final String PATH_MODULE_MAIN_LOGIN = "/modulemain/activity/login";//登录
|
public static final String PATH_MODULE_MAIN_LOGIN = "/modulemain/activity/login";//登录
|
||||||
public static final String PATH_MODULE_MAIN_NEWS_DETAIL = "/modulemain/activity/news/detail";//详情页面
|
public static final String PATH_MODULE_MAIN_NEWS_DETAIL = "/modulemain/activity/news/detail";//详情页面
|
||||||
public static final String PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE = "/modulemain/activity/newsInterface";//新闻详情页面-接口方式
|
|
||||||
public static final String PATH_MODULE_MAIN_FRAGMENT_MAIN = "/modulemain/fragment/main";//首页fragment
|
public static final String PATH_MODULE_MAIN_FRAGMENT_MAIN = "/modulemain/fragment/main";//首页fragment
|
||||||
|
|
||||||
public static final String PATH_MODULE_MAIN_NEWS_LIST = "/modulemain/activity/newslist";
|
public static final String PATH_MODULE_MAIN_NEWS_LIST = "/modulemain/activity/newslist";
|
||||||
@ -111,6 +110,7 @@ public class PathConfig {
|
|||||||
public static final String PATH_MODULE_MAIN_CHOOSE_CITY = "/modulemain/activity/choosecity";//选择城市
|
public static final String PATH_MODULE_MAIN_CHOOSE_CITY = "/modulemain/activity/choosecity";//选择城市
|
||||||
|
|
||||||
public static final String PATH_MODULE_MAIN_NEWS_WEB = "/modulemain/activity/newsweb";//连接新闻页
|
public static final String PATH_MODULE_MAIN_NEWS_WEB = "/modulemain/activity/newsweb";//连接新闻页
|
||||||
|
public static final String PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE = "/modulemain/activity/newsInterface";//新闻详情页面-接口方式
|
||||||
public static final String PATH_MODULE_MAIN_NEWS_SEARCH = "/modulemain/activity/newsSearch";//新闻收搜
|
public static final String PATH_MODULE_MAIN_NEWS_SEARCH = "/modulemain/activity/newsSearch";//新闻收搜
|
||||||
//======================Map==================================================
|
//======================Map==================================================
|
||||||
public static final String PATH_MODULE_MAP_NAVIGATION = "/modulemap/activity/navigation";//地图
|
public static final String PATH_MODULE_MAP_NAVIGATION = "/modulemap/activity/navigation";//地图
|
||||||
@ -276,5 +276,4 @@ public class PathConfig {
|
|||||||
public static final String PATH_MODULE_SHOP_ACTIVITY_SHOP_MINE_ORDER_DETAIL = "/moduleshop/activity/shopOrderDetail";//我的订单
|
public static final String PATH_MODULE_SHOP_ACTIVITY_SHOP_MINE_ORDER_DETAIL = "/moduleshop/activity/shopOrderDetail";//我的订单
|
||||||
public static final String PATH_MODULE_SHOP_ACTIVITY_SHOP_ADD_ADDRESS = "/moduleshop/activity/shopAddAddress";//新增收货地
|
public static final String PATH_MODULE_SHOP_ACTIVITY_SHOP_ADD_ADDRESS = "/moduleshop/activity/shopAddAddress";//新增收货地
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ public class BaseUrlApi {
|
|||||||
public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 测试IP */
|
public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 测试IP */
|
||||||
// public static final String IP_URL = "http://192.168.0.120:8081/";/* 测试IP */
|
// public static final String IP_URL = "http://192.168.0.120:8081/";/* 测试IP */
|
||||||
|
|
||||||
// public static final String BASE_SYSTEM_IP = "http://192.168.0.120:8081/xzszwhy/";/*测试IP*/
|
// public static final String BASE_SYSTEM_IP = "http://192.168.0.120:8081/xzszwhy/";/*测试IP*/
|
||||||
public static final String BASE_SYSTEM_IP = "http://v3.xzszwhy.cn/xzszwhy/";/*正式IP*/
|
public static final String BASE_SYSTEM_IP = "http://v3.xzszwhy.cn/xzszwhy/";/*正式IP*/
|
||||||
|
|
||||||
public static final String PROJECT_NAME = "app/";
|
public static final String PROJECT_NAME = "app/";
|
||||||
@ -53,13 +53,14 @@ public class BaseUrlApi {
|
|||||||
public static final String BASE_ACTIVIY_IP = BASE_SYSTEM_IP;/* 活动URL */
|
public static final String BASE_ACTIVIY_IP = BASE_SYSTEM_IP;/* 活动URL */
|
||||||
public static final String BASE_PLACE_IP = BASE_SYSTEM_IP;/* 场馆 */
|
public static final String BASE_PLACE_IP = BASE_SYSTEM_IP;/* 场馆 */
|
||||||
public static final String BASE_VOLUNTEER_IP = BASE_SYSTEM_IP;/* 志愿者 */
|
public static final String BASE_VOLUNTEER_IP = BASE_SYSTEM_IP;/* 志愿者 */
|
||||||
public static final String BASE_LIVE_IP = BASE_SYSTEM_IP + "live/";
|
public static final String BASE_LIVE_IP = IP_URL + "live/";
|
||||||
|
|
||||||
|
public static final String BASE_BIG_DATA = IP_URL + "module/";//大数据接口
|
||||||
public static final String BASE_LIVE_URL = BASE_SYSTEM_IP;//直播回放视频url
|
public static final String BASE_LIVE_URL = BASE_SYSTEM_IP;//直播回放视频url
|
||||||
public static final String BASE_CULTURAL_SHARE = BASE_SYSTEM_IP;/* 文化分享 */
|
public static final String BASE_CULTURAL_SHARE = BASE_SYSTEM_IP;/* 文化分享 */
|
||||||
public static final String BASE_LEGACY_IP = BASE_SYSTEM_IP;//非遗数据库
|
public static final String BASE_LEGACY_IP = BASE_SYSTEM_IP;//非遗数据库
|
||||||
public static final String BASE_NEWS_IP = BASE_SYSTEM_IP;//新闻
|
public static final String BASE_NEWS_IP = BASE_SYSTEM_IP;//新闻
|
||||||
public static final String BASE_SHOP_IP = IP_URL + "xzshop";//商城
|
public static final String BASE_SHOP_IP = IP_URL + "xzshop/";//商城
|
||||||
public static final String BASE_BIG_DATA = IP_URL + "module/";//大数据接口
|
|
||||||
// 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/download/true/";/* 场馆 */
|
public static final String BASE_PLACE_IMG_IP = BASE_PLACE_IP + "route/file/download/true/";/* 场馆 */
|
||||||
public static final String BASE_CULTURAL_IP = BASE_SYSTEM_IP + "culturalactivity/";/* 文化URL */
|
public static final String BASE_CULTURAL_IP = BASE_SYSTEM_IP + "culturalactivity/";/* 文化URL */
|
||||||
@ -69,6 +70,7 @@ public class BaseUrlApi {
|
|||||||
|
|
||||||
|
|
||||||
public static final String BASE_NEWS_DETAIL = IP_URL;//新闻
|
public static final String BASE_NEWS_DETAIL = IP_URL;//新闻
|
||||||
|
// public static final String BASE_NEWS_DETAIL = "http://192.168.0.120:80/";//新闻
|
||||||
// public static final String BASE_IMG_URL = BASE_IP + "route/file/download/true/";
|
// public static final String BASE_IMG_URL = BASE_IP + "route/file/download/true/";
|
||||||
// GET /app/appversion/downloadapp/{appVersionId}
|
// GET /app/appversion/downloadapp/{appVersionId}
|
||||||
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + PathConfig.APP_VERSION_ID;
|
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + PathConfig.APP_VERSION_ID;
|
||||||
|
@ -314,7 +314,6 @@ public interface BaseApiService {
|
|||||||
@GET("app/area/getrelease/{areaId}")
|
@GET("app/area/getrelease/{areaId}")
|
||||||
Observable<AreaBean> getAreaDetail(@Path("areaId") String pId);
|
Observable<AreaBean> getAreaDetail(@Path("areaId") String pId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 大数据-浏览量
|
* 大数据-浏览量
|
||||||
* 详情浏览量 (网页|安卓|小程序)[a-zA-Z0-9-]{36}(新闻|活动|非遗|场馆|直播|志愿) 我后台正则是这样的
|
* 详情浏览量 (网页|安卓|小程序)[a-zA-Z0-9-]{36}(新闻|活动|非遗|场馆|直播|志愿) 我后台正则是这样的
|
||||||
@ -325,5 +324,4 @@ public interface BaseApiService {
|
|||||||
@Headers({"base_url_name:bigdata", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:bigdata", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/contentcensusrelease/log")
|
@GET("app/contentcensusrelease/log")
|
||||||
Observable<BaseSuccessBean> bigDataRead(@Query("requestUrl") String id);
|
Observable<BaseSuccessBean> bigDataRead(@Query("requestUrl") String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.sucstepsoft.cm_utils.core.retrofit_net.conver;
|
package com.sucstepsoft.cm_utils.core.retrofit_net.conver;
|
||||||
|
|
||||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
|
||||||
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
|
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||||
|
|
||||||
@ -25,26 +24,17 @@ public class AreaInterceptor implements Interceptor {
|
|||||||
public okhttp3.Response intercept(Chain chain) throws IOException {
|
public okhttp3.Response intercept(Chain chain) throws IOException {
|
||||||
Request originalRequest = chain.request();
|
Request originalRequest = chain.request();
|
||||||
Request request;
|
Request request;
|
||||||
int cityLevel = UserLgUtils.getCityLevel();
|
|
||||||
if (cityLevel == -1) {
|
|
||||||
cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
|
||||||
}
|
|
||||||
String name = "area" + cityLevel;
|
|
||||||
String areaCode = UserLgUtils.getCityCode();
|
String areaCode = UserLgUtils.getCityCode();
|
||||||
// if (TextUtils.isEmpty(areaId)) {
|
|
||||||
// areaId = PathConfig.CITY_DEFAULT_CODE;
|
|
||||||
// }
|
|
||||||
// String cityId = UserLgUtils.getCityId();
|
|
||||||
//判断是否需要添加
|
//判断是否需要添加
|
||||||
List<String> baseUrlName = originalRequest.headers("need_area");
|
List<String> baseUrlName = originalRequest.headers("need_area");
|
||||||
if (baseUrlName.size() > 0) {
|
if (baseUrlName.size() > 0) {
|
||||||
if(Boolean.parseBoolean(baseUrlName.get(0))){
|
if (Boolean.parseBoolean(baseUrlName.get(0))) {
|
||||||
//需要添加
|
//需要添加
|
||||||
HttpUrl modifiedUrl = originalRequest.url().newBuilder()
|
HttpUrl modifiedUrl = originalRequest.url().newBuilder()
|
||||||
.addPathSegment(areaCode)
|
.addPathSegment(areaCode)
|
||||||
.build();
|
.build();
|
||||||
request = originalRequest.newBuilder().url(modifiedUrl).build();
|
request = originalRequest.newBuilder().url(modifiedUrl).build();
|
||||||
}else{
|
} else {
|
||||||
request = originalRequest;
|
request = originalRequest;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -46,7 +46,7 @@ public class BaseUrlInterceptor implements Interceptor {
|
|||||||
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_CULTURAL_SHARE);
|
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_CULTURAL_SHARE);
|
||||||
} else if ("shop".equals(headerValue)) {
|
} else if ("shop".equals(headerValue)) {
|
||||||
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_SHOP_IP);
|
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_SHOP_IP);
|
||||||
} else if ("bigdata".equals(headerValue)) {
|
}else if("bigdata".equals(headerValue)){
|
||||||
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_BIG_DATA);
|
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_BIG_DATA);
|
||||||
} else {
|
} else {
|
||||||
newBaseUrl = oldHttpUrl;
|
newBaseUrl = oldHttpUrl;
|
||||||
|
@ -130,6 +130,25 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
mRlNotify.setVisibility(View.GONE);
|
mRlNotify.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEditTextInhibitInputSpeChat(EditText editText) {
|
||||||
|
InputFilter inputFilter = new InputFilter() {
|
||||||
|
Pattern emoji = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]",
|
||||||
|
Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
|
||||||
|
Matcher emojiMatcher = emoji.matcher(source);
|
||||||
|
if (emojiMatcher.find()) {
|
||||||
|
// Toast.makeText(MainActivity.this,"不支持输入表情", 0).show();
|
||||||
|
ToastUtils.showShort("不支持输入表情");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
editText.setFilters(new InputFilter[]{inputFilter});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 大数据-详情浏览
|
* 大数据-详情浏览
|
||||||
@ -165,27 +184,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setEditTextInhibitInputSpeChat(EditText editText) {
|
|
||||||
InputFilter inputFilter = new InputFilter() {
|
|
||||||
Pattern emoji = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]",
|
|
||||||
Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
|
|
||||||
Matcher emojiMatcher = emoji.matcher(source);
|
|
||||||
if (emojiMatcher.find()) {
|
|
||||||
// Toast.makeText(MainActivity.this,"不支持输入表情", 0).show();
|
|
||||||
ToastUtils.showShort("不支持输入表情");
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
editText.setFilters(new InputFilter[]{inputFilter});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置只能输入汉字.字母.数字
|
* 设置只能输入汉字.字母.数字
|
||||||
*
|
*
|
||||||
@ -665,7 +663,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
/**
|
/**
|
||||||
* 是否登录
|
* 是否登录
|
||||||
*
|
*
|
||||||
* @return
|
* @return true 已经登录 false 未登录
|
||||||
*/
|
*/
|
||||||
protected boolean isLogin() {
|
protected boolean isLogin() {
|
||||||
return !TextUtils.isEmpty(UserLgUtils.getToken());
|
return !TextUtils.isEmpty(UserLgUtils.getToken());
|
||||||
|
@ -80,6 +80,10 @@ public class BottomCancelOrderDialog extends Dialog {
|
|||||||
}
|
}
|
||||||
DicSelAdapter adapter = new DicSelAdapter(context, list);
|
DicSelAdapter adapter = new DicSelAdapter(context, list);
|
||||||
rlvReason.setAdapter(adapter);
|
rlvReason.setAdapter(adapter);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
list.get(0).setCheck(true);
|
||||||
|
}
|
||||||
|
|
||||||
adapter.addOnItemClickListener(baseDictionaryBean -> {
|
adapter.addOnItemClickListener(baseDictionaryBean -> {
|
||||||
for (BaseDictionaryBean b : list) {
|
for (BaseDictionaryBean b : list) {
|
||||||
if (b.getDataId().equals(baseDictionaryBean.getDataId())) {
|
if (b.getDataId().equals(baseDictionaryBean.getDataId())) {
|
||||||
|
@ -28,10 +28,6 @@ import android.view.MotionEvent;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
|
||||||
|
|
||||||
import com.sucstepsoft.cm_utils.R;
|
import com.sucstepsoft.cm_utils.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -42,6 +38,11 @@ import java.util.Map;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @date: on 2018-08-24
|
* @date: on 2018-08-24
|
||||||
* @author: cretin
|
* @author: cretin
|
||||||
@ -56,8 +57,7 @@ public class ExpandableTextView extends AppCompatTextView {
|
|||||||
public static String TEXT_TARGET = "网页链接";
|
public static String TEXT_TARGET = "网页链接";
|
||||||
public static final String IMAGE_TARGET = "图";
|
public static final String IMAGE_TARGET = "图";
|
||||||
public static final String TARGET = IMAGE_TARGET + TEXT_TARGET;
|
public static final String TARGET = IMAGE_TARGET + TEXT_TARGET;
|
||||||
public static final String DEFAULT_CONTENT = " " +
|
public static final String DEFAULT_CONTENT = " ";
|
||||||
" ";
|
|
||||||
|
|
||||||
private static int retryTime = 0;
|
private static int retryTime = 0;
|
||||||
|
|
||||||
@ -65,8 +65,7 @@ public class ExpandableTextView extends AppCompatTextView {
|
|||||||
* http?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?
|
* http?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// public static final String regexp = "((http[s]{0,1}|ftp)://[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)|((www.)|[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})
|
// public static final String regexp = "((http[s]{0,1}|ftp)://[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)|((www.)|[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)";
|
||||||
// (:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)";
|
|
||||||
// public static final String regexp = "http?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?";
|
// public static final String regexp = "http?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?";
|
||||||
|
|
||||||
public static final String regexp_mention = "@[\\w\\p{InCJKUnifiedIdeographs}-]{1,26}";
|
public static final String regexp_mention = "@[\\w\\p{InCJKUnifiedIdeographs}-]{1,26}";
|
||||||
|
@ -64,6 +64,33 @@ public class UserLgUtils {
|
|||||||
return SPUtils.getInstance(SP_USER_INFO).getString("email");
|
return SPUtils.getInstance(SP_USER_INFO).getString("email");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===============地理信息=====================
|
||||||
|
|
||||||
|
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 setCurrentCityId(String city) {
|
||||||
|
SPUtils.getInstance(SP_USER_INFO).put("currentCityId", city);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getCurrentCityId() {
|
||||||
|
return SPUtils.getInstance(SP_USER_INFO).getString("currentCityId");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//==============================
|
//==============================
|
||||||
public static void setLoginInfo(String userInfo) {
|
public static void setLoginInfo(String userInfo) {
|
||||||
SPUtils.getInstance(SP_USER_INFO).put("userInfos", userInfo);
|
SPUtils.getInstance(SP_USER_INFO).put("userInfos", userInfo);
|
||||||
@ -146,21 +173,6 @@ public class UserLgUtils {
|
|||||||
return SPUtils.getInstance(SP_USER_INFO).getString("city");
|
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) {
|
public static void setLocationAddress(String address) {
|
||||||
SPUtils.getInstance(SP_USER_INFO).put("address", address);
|
SPUtils.getInstance(SP_USER_INFO).put("address", address);
|
||||||
@ -203,22 +215,6 @@ public class UserLgUtils {
|
|||||||
return SPUtils.getInstance(SP_USER_INFO).getString("appName");
|
return SPUtils.getInstance(SP_USER_INFO).getString("appName");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCityCode() {
|
|
||||||
return SPUtils.getInstance(SP_USER_INFO).getString("cityCode");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCityCode(String code) {
|
|
||||||
SPUtils.getInstance(SP_USER_INFO).put("cityCode", code);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getCityId() {
|
|
||||||
return SPUtils.getInstance(SP_USER_INFO).getString("cityId");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCityId(String code) {
|
|
||||||
SPUtils.getInstance(SP_USER_INFO).put("cityId", code);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getShopCar() {
|
public static String getShopCar() {
|
||||||
return SPUtils.getInstance(SP_USER_INFO).getString("shopCar");
|
return SPUtils.getInstance(SP_USER_INFO).getString("shopCar");
|
||||||
}
|
}
|
||||||
@ -226,4 +222,22 @@ public class UserLgUtils {
|
|||||||
public static void setShopCar(String data) {
|
public static void setShopCar(String data) {
|
||||||
SPUtils.getInstance(SP_USER_INFO).put("shopCar", data);
|
SPUtils.getInstance(SP_USER_INFO).put("shopCar", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void setCityCode(String code) {
|
||||||
|
SPUtils.getInstance(SP_USER_INFO).put("cityCode", code);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getCityCode() {
|
||||||
|
return SPUtils.getInstance(SP_USER_INFO).getString("cityCode");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void setCityId(String code) {
|
||||||
|
SPUtils.getInstance(SP_USER_INFO).put("cityId", code);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getCityId() {
|
||||||
|
return SPUtils.getInstance(SP_USER_INFO).getString("cityId");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
27
cm_utils/src/main/res/drawable/shape_tab_bg_no_ra.xml
Executable file
27
cm_utils/src/main/res/drawable/shape_tab_bg_no_ra.xml
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<padding
|
||||||
|
android:bottom="1dp"
|
||||||
|
/>
|
||||||
|
<solid android:color="#40CCCCCC" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<padding
|
||||||
|
android:bottom="1dp"
|
||||||
|
/>
|
||||||
|
<solid android:color="#30CCCCCC" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#FFFFFF" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -164,8 +164,8 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_app_into"
|
android:id="@+id/iv_app_into"
|
||||||
android:layout_width="30dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="25dp"
|
||||||
android:src="@drawable/ic_map_icon" />
|
android:src="@drawable/ic_map_icon" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
0
cm_utils/src/main/res/layout/item_banner_text_all.xml
Normal file → Executable file
0
cm_utils/src/main/res/layout/item_banner_text_all.xml
Normal file → Executable file
@ -49,4 +49,4 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:text="搜索" />
|
android:text="搜索" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
<string name="android_auto_update_dialog_checking">正在检查版本</string>
|
<string name="android_auto_update_dialog_checking">正在检查版本</string>
|
||||||
<string name="big_data_str">安卓%1$s%2$s%3$s</string>
|
<string name="big_data_str">安卓%1$s%2$s%3$s</string>
|
||||||
|
|
||||||
<string name="social_contract">收起</string>
|
<string name="social_contract">收起</string>
|
||||||
<string name="social_expend">展开</string>
|
<string name="social_expend">展开</string>
|
||||||
<string name="social_text_target">网页链接</string>
|
<string name="social_text_target">网页链接</string>
|
||||||
|
@ -153,6 +153,9 @@ public class ActivityDetailActivity extends BaseActivity {
|
|||||||
} else {
|
} else {
|
||||||
getActivityDetailByIdToken(mId);
|
getActivityDetailByIdToken(mId);
|
||||||
}
|
}
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", mId, "活动");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -89,6 +89,9 @@ public class CulturalLiveDetailActivity extends BaseActivity {
|
|||||||
getLiveDetail(id);
|
getLiveDetail(id);
|
||||||
});
|
});
|
||||||
mSrlContent.setEnableLoadMore(false);
|
mSrlContent.setEnableLoadMore(false);
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", id, "直播");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getLiveDetail(String id) {
|
private void getLiveDetail(String id) {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.tengshisoft.modulecultural.activitys;
|
package com.tengshisoft.modulecultural.activitys;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
@ -19,17 +18,11 @@ 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.base.BaseActivity;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.GlideRoundTransform;
|
import com.sucstepsoft.cm_utils.core.widget.base.GlideRoundTransform;
|
||||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||||
|
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||||
import com.tengshisoft.modulecultural.R;
|
import com.tengshisoft.modulecultural.R;
|
||||||
import com.tengshisoft.modulecultural.R2;
|
import com.tengshisoft.modulecultural.R2;
|
||||||
import com.tengshisoft.modulecultural.bean.CulturalLiveDetailBean;
|
import com.tengshisoft.modulecultural.bean.CulturalLiveDetailBean;
|
||||||
import com.tengshisoft.modulecultural.net.CulturalApi;
|
import com.tengshisoft.modulecultural.net.CulturalApi;
|
||||||
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 butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
@ -73,6 +66,9 @@ public class CulturalLiveLookBackActivity extends BaseActivity {
|
|||||||
mSrlContent.setEnableRefresh(false);
|
mSrlContent.setEnableRefresh(false);
|
||||||
mSrlContent.setEnableLoadMore(false);
|
mSrlContent.setEnableLoadMore(false);
|
||||||
getLiveDetail(id);
|
getLiveDetail(id);
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", id, "直播");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,6 +109,9 @@ public class LegacyDetailActivity extends BaseActivity {
|
|||||||
.placeholder(R.drawable.ic_img_default_banner)
|
.placeholder(R.drawable.ic_img_default_banner)
|
||||||
.transform(roundedCornersTransform);
|
.transform(roundedCornersTransform);
|
||||||
getLegacyDetail(id);
|
getLegacyDetail(id);
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", id, "非遗");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,6 +27,7 @@ import com.sucstepsoft.cm_utils.core.widget.base.BaseBannerImageAdapter;
|
|||||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||||
|
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.toast.ToastUtils;
|
import com.sucstepsoft.cm_utils.utils.toast.ToastUtils;
|
||||||
@ -154,6 +155,9 @@ public class VolunteerActivityDetailActivity extends BaseActivity {
|
|||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", mId, "志愿");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,9 +56,9 @@ public class CulturalMainFragment extends BaseFragment {
|
|||||||
private LegacyMainAdapter mMainAdapter;
|
private LegacyMainAdapter mMainAdapter;
|
||||||
private List<String> mFuncStr = new ArrayList<>();
|
private List<String> mFuncStr = new ArrayList<>();
|
||||||
|
|
||||||
// private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化直播", "文化分享"};
|
// private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化直播", "文化分享"};
|
||||||
// private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
// private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
||||||
|
//
|
||||||
private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化分享"};
|
private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化分享"};
|
||||||
private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
||||||
|
|
||||||
|
@ -45,14 +45,14 @@ public interface CulturalApi {
|
|||||||
/**
|
/**
|
||||||
* 获取非遗列表
|
* 获取非遗列表
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json","need_area:true"})
|
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
||||||
Observable<LegacyListBean> getLegacyList(@Query("page") String page);
|
Observable<LegacyListBean> getLegacyList(@Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取非遗列表
|
* 获取非遗列表
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json" ,"need_area:true"})
|
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
||||||
Observable<LegacyListBean> getLegacyListByType(@Query("page") String page, @Query("rows") String rows, @Query("libraryDirectoriesId") String id);
|
Observable<LegacyListBean> getLegacyListByType(@Query("page") String page, @Query("rows") String rows, @Query("libraryDirectoriesId") String id);
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ public interface CulturalApi {
|
|||||||
* GET /app/intangibledirectories/listztreeintangibledirectoriesrelease
|
* GET /app/intangibledirectories/listztreeintangibledirectoriesrelease
|
||||||
* GET /app/intangiblelibrary/listpageintangiblelibraryrelease
|
* GET /app/intangiblelibrary/listpageintangiblelibraryrelease
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json", "is_need_area:true"})
|
||||||
@GET("app/intangibledirectories/listztreeintangibledirectoriesrelease")
|
@GET("app/intangibledirectories/listztreeintangibledirectoriesrelease")
|
||||||
Observable<List<LegacyListTypeBean>> getLegacyTypeList(@Query("id") String id);
|
Observable<List<LegacyListTypeBean>> getLegacyTypeList(@Query("id") String id);
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white">
|
android:background="@color/white">
|
||||||
@ -261,78 +259,6 @@
|
|||||||
android:hint="请选择从业状况" />
|
android:hint="请选择从业状况" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_service_area_title"
|
|
||||||
style="@style/register_text_title"
|
|
||||||
android:text="服务区域:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_service_area_content"
|
|
||||||
style="@style/register_text_sel"
|
|
||||||
android:hint="请选择服务区域" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_vocation_title"
|
|
||||||
style="@style/register_text_title"
|
|
||||||
android:text="职业:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_vocation_content"
|
|
||||||
style="@style/register_text_sel"
|
|
||||||
android:hint="请选择职业" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
style="@style/register_item_container"
|
|
||||||
android:visibility="visible">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_unit_title"
|
|
||||||
style="@style/register_text_title"
|
|
||||||
android:text="工作单位及职务:" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_unit_content"
|
|
||||||
style="@style/register_input"
|
|
||||||
android:hint="请输入工作单位及职务" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
style="@style/register_item_container"
|
|
||||||
android:visibility="visible">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_like_title"
|
|
||||||
style="@style/register_text_title"
|
|
||||||
android:text="特长爱好:" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_like_content"
|
|
||||||
style="@style/register_input"
|
|
||||||
android:hint="请输入特长爱好" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
style="@style/register_item_container"
|
|
||||||
android:visibility="visible">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_resume_title"
|
|
||||||
style="@style/register_text_title"
|
|
||||||
android:text="个人简历:" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_resume_content"
|
|
||||||
style="@style/register_input"
|
|
||||||
android:hint="请输入个人简历"
|
|
||||||
android:minLines="3" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/register_item_container"
|
style="@style/register_item_container"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
@ -347,7 +273,9 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:gravity="right"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingRight="20dp">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_true"
|
android:id="@+id/rb_true"
|
||||||
@ -355,6 +283,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:button="@drawable/sel_radio_red"
|
android:button="@drawable/sel_radio_red"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
android:text="是" />
|
android:text="是" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
@ -363,63 +292,189 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="30dp"
|
android:layout_marginLeft="30dp"
|
||||||
android:button="@drawable/sel_radio_red"
|
android:button="@drawable/sel_radio_red"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
android:text="否" />
|
android:text="否" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_expert_title"
|
|
||||||
style="@style/register_text_title"
|
|
||||||
android:text="服务意向:" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rlv_export_content"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginLeft="90dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:background="@color/gray_line" />
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_expert_area_title"
|
android:id="@+id/tv_service_area_title"
|
||||||
style="@style/register_text_title"
|
style="@style/register_text_title"
|
||||||
android:text="服务领域或行业:" />
|
android:text="服务区域:" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<TextView
|
||||||
android:id="@+id/rlv_export_area_content"
|
android:id="@+id/tv_service_area_content"
|
||||||
android:layout_width="0dp"
|
style="@style/register_text_sel"
|
||||||
android:layout_height="wrap_content"
|
android:drawablePadding="10dp"
|
||||||
android:layout_weight="1" />
|
android:gravity="right"
|
||||||
|
android:hint="请选择服务区域" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginLeft="90dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:background="@color/gray_line" />
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_vocation_title"
|
||||||
|
style="@style/register_text_title"
|
||||||
|
android:text="职业:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_vocation_content"
|
||||||
|
style="@style/register_text_sel"
|
||||||
|
android:drawablePadding="10dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请选择职业" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/register_item_container"
|
style="@style/register_item_container"
|
||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_remark_title"
|
android:id="@+id/tv_unit_title"
|
||||||
style="@style/register_text_title"
|
style="@style/register_text_title"
|
||||||
|
android:text="工作单位及职务:" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_unit_content"
|
||||||
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请输入工作单位及职务" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/register_item_container"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_like_title"
|
||||||
|
style="@style/register_text_title"
|
||||||
|
android:text="特长爱好:" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_like_content"
|
||||||
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请输入特长爱好" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/register_item_container_ver"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_resume_title"
|
||||||
|
style="@style/register_text_title_ver"
|
||||||
|
android:text="个人简历:" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_resume_content"
|
||||||
|
style="@style/register_input_ver"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@drawable/shp_rectangle_gray"
|
||||||
|
android:gravity="left"
|
||||||
|
android:hint="请输入个人简历"
|
||||||
|
android:minLines="4" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout style="@style/register_item_container_ver">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_expert_title"
|
||||||
|
style="@style/register_text_title_ver"
|
||||||
|
android:text="服务意向:" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_export_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout style="@style/register_item_container_ver">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_expert_area_title"
|
||||||
|
style="@style/register_text_title_ver"
|
||||||
|
android:text="服务领域或行业:" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_export_area_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/register_item_container_ver"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_remark_title"
|
||||||
|
style="@style/register_text_title_ver"
|
||||||
android:text="备注:" />
|
android:text="备注:" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_remark_content"
|
android:id="@+id/et_remark_content"
|
||||||
style="@style/register_input"
|
style="@style/register_input_ver"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@drawable/shp_rectangle_gray"
|
||||||
|
android:gravity="left"
|
||||||
android:hint="请输入备注"
|
android:hint="请输入备注"
|
||||||
android:minLines="3" />
|
android:minLines="3" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white">
|
android:background="@color/white">
|
||||||
@ -21,9 +19,18 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_team_name"
|
android:id="@+id/et_team_name"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入团队名称" />
|
android:hint="请输入团队名称" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -34,10 +41,19 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_team_count"
|
android:id="@+id/et_team_count"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入团队限制人数"
|
android:hint="请输入团队限制人数"
|
||||||
android:inputType="number" />
|
android:inputType="number" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/register_item_container"
|
style="@style/register_item_container"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
@ -53,6 +69,7 @@
|
|||||||
android:hint="请选择团队成员" />
|
android:hint="请选择团队成员" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -63,19 +80,31 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_area"
|
android:id="@+id/tv_area"
|
||||||
style="@style/register_text_sel"
|
style="@style/register_text_sel"
|
||||||
android:hint="请选择所属区域" />
|
android:drawablePadding="10dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请选择所属区域"
|
||||||
|
android:paddingRight="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout style="@style/register_item_container_ver">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_team_desc_title"
|
android:id="@+id/tv_team_desc_title"
|
||||||
style="@style/register_text_title"
|
style="@style/register_text_title_ver"
|
||||||
android:text="团队介绍:" />
|
android:text="团队介绍:" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_team_desc_content"
|
android:id="@+id/et_team_desc_content"
|
||||||
style="@style/register_input"
|
style="@style/register_input_ver"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@drawable/shp_rectangle_gray"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:hint="请输入团队介绍"
|
android:hint="请输入团队介绍"
|
||||||
android:minLines="5" />
|
android:minLines="5" />
|
||||||
|
@ -22,9 +22,19 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_choose_area"
|
android:id="@+id/tv_choose_area"
|
||||||
style="@style/register_text_sel"
|
style="@style/register_text_sel"
|
||||||
android:hint="请选择活动区域" />
|
android:drawablePadding="10dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请选择活动区域"
|
||||||
|
android:paddingRight="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -35,9 +45,18 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_name"
|
android:id="@+id/et_name"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入活动名称" />
|
android:hint="请输入活动名称" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -47,9 +66,18 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_contact_name"
|
android:id="@+id/et_contact_name"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入活动联系人姓名" />
|
android:hint="请输入活动联系人姓名" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -59,10 +87,19 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_phone"
|
android:id="@+id/et_phone"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入联系方式"
|
android:hint="请输入联系方式"
|
||||||
android:inputType="number" />
|
android:inputType="number" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -72,38 +109,56 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_peo_count"
|
android:id="@+id/et_peo_count"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入活动人数限制"
|
android:hint="请输入活动人数限制"
|
||||||
android:inputType="number" />
|
android:inputType="number" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout style="@style/register_item_container_ver">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
style="@style/register_text_title"
|
style="@style/register_text_title_ver"
|
||||||
android:text="活动简介:" />
|
android:text="活动简介:" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_desc"
|
android:id="@+id/et_desc"
|
||||||
style="@style/register_input"
|
style="@style/register_input_ver"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/shp_rectangle_gray"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:hint="请输入活动简介"
|
android:hint="请输入活动简介"
|
||||||
android:minLines="5" />
|
android:minLines="5" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
|
||||||
|
<LinearLayout style="@style/register_item_container_ver">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
style="@style/register_text_title"
|
style="@style/register_text_title_ver"
|
||||||
android:text="服务内容:" />
|
android:text="服务内容:" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_service_content"
|
android:id="@+id/et_service_content"
|
||||||
style="@style/register_input"
|
style="@style/register_input_ver"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/shp_rectangle_gray"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:hint="请输入服务内容"
|
android:hint="请输入服务内容"
|
||||||
android:minLines="5" />
|
android:minLines="5" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
@ -114,10 +169,18 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_request"
|
android:id="@+id/et_request"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
android:gravity="left"
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入活动要求" />
|
android:hint="请输入活动要求" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -127,10 +190,18 @@
|
|||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_service_awards"
|
android:id="@+id/et_service_awards"
|
||||||
style="@style/register_input"
|
style="@style/register_input"
|
||||||
android:gravity="left"
|
android:background="@null"
|
||||||
|
android:gravity="right"
|
||||||
android:hint="请输入活动奖补" />
|
android:hint="请输入活动奖补" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -141,9 +212,19 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_start_time_content"
|
android:id="@+id/tv_start_time_content"
|
||||||
style="@style/register_text_sel"
|
style="@style/register_text_sel"
|
||||||
android:hint="请选择开始时间" />
|
android:drawablePadding="10dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请选择开始时间"
|
||||||
|
android:paddingRight="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -153,9 +234,19 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_end_time_content"
|
android:id="@+id/tv_end_time_content"
|
||||||
style="@style/register_text_sel"
|
style="@style/register_text_sel"
|
||||||
android:hint="请选择结束时间" />
|
android:drawablePadding="10dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请选择结束时间"
|
||||||
|
android:paddingRight="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<LinearLayout style="@style/register_item_container">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
@ -168,7 +259,9 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:gravity="right"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingRight="10dp">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_service_single"
|
android:id="@+id/rb_service_single"
|
||||||
@ -176,17 +269,27 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:button="@drawable/sel_radio_red"
|
android:button="@drawable/sel_radio_red"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
android:text="志愿者" />
|
android:text="志愿者" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_service_team"
|
android:id="@+id/rb_service_team"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
android:button="@drawable/sel_radio_red"
|
android:button="@drawable/sel_radio_red"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
android:text="志愿团队" />
|
android:text="志愿团队" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_choose_team"
|
android:id="@+id/ll_choose_team"
|
||||||
style="@style/register_item_container">
|
style="@style/register_item_container">
|
||||||
@ -199,22 +302,32 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_choose_team"
|
android:id="@+id/tv_choose_team"
|
||||||
style="@style/register_text_sel"
|
style="@style/register_text_sel"
|
||||||
android:hint="请选择志愿者团队" />
|
android:drawablePadding="10dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="请选择志愿者团队"
|
||||||
|
android:paddingRight="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/register_item_container">
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<LinearLayout style="@style/register_item_container_ver">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_photos_title"
|
android:id="@+id/tv_photos_title"
|
||||||
style="@style/register_text_title"
|
style="@style/register_text_title_ver"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:text="宣传照片:" />
|
android:text="宣传照片:" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rlv_photos"
|
android:id="@+id/rlv_photos"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_marginTop="5dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -7,7 +7,19 @@
|
|||||||
<item name="android:layout_marginLeft">10dp</item>
|
<item name="android:layout_marginLeft">10dp</item>
|
||||||
<item name="android:layout_marginRight">10dp</item>
|
<item name="android:layout_marginRight">10dp</item>
|
||||||
<item name="android:layout_weight">1</item>
|
<item name="android:layout_weight">1</item>
|
||||||
<item name="android:background">@drawable/shape_bottom_line</item>
|
<item name="android:paddingTop">5dp</item>
|
||||||
|
<item name="android:paddingBottom">5dp</item>
|
||||||
|
<item name="android:paddingLeft">5dp</item>
|
||||||
|
<item name="android:paddingRight">5dp</item>
|
||||||
|
<item name="android:textSize">13sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="register_input_ver">
|
||||||
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_marginLeft">10dp</item>
|
||||||
|
<item name="android:layout_marginRight">10dp</item>
|
||||||
|
<item name="android:layout_weight">1</item>
|
||||||
<item name="android:paddingTop">5dp</item>
|
<item name="android:paddingTop">5dp</item>
|
||||||
<item name="android:paddingBottom">5dp</item>
|
<item name="android:paddingBottom">5dp</item>
|
||||||
<item name="android:paddingLeft">5dp</item>
|
<item name="android:paddingLeft">5dp</item>
|
||||||
@ -23,13 +35,19 @@
|
|||||||
<item name="android:textSize">12sp</item>
|
<item name="android:textSize">12sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="register_text_title_ver">
|
||||||
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:textColor">#242424</item>
|
||||||
|
<item name="android:textSize">12sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="register_text_sel">
|
<style name="register_text_sel">
|
||||||
<item name="android:layout_width">0dp</item>
|
<item name="android:layout_width">0dp</item>
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:layout_marginLeft">10dp</item>
|
<item name="android:layout_marginLeft">10dp</item>
|
||||||
<item name="android:layout_marginRight">10dp</item>
|
<item name="android:layout_marginRight">10dp</item>
|
||||||
<item name="android:layout_weight">1</item>
|
<item name="android:layout_weight">1</item>
|
||||||
<item name="android:background">@drawable/shape_bottom_line</item>
|
|
||||||
<item name="android:clickable">true</item>
|
<item name="android:clickable">true</item>
|
||||||
<item name="android:focusable">true</item>
|
<item name="android:focusable">true</item>
|
||||||
<item name="android:drawableRight">@drawable/ic_arrow_yellow_down</item>
|
<item name="android:drawableRight">@drawable/ic_arrow_yellow_down</item>
|
||||||
@ -67,6 +85,13 @@
|
|||||||
<item name="android:padding">8dp</item>
|
<item name="android:padding">8dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="register_item_container_ver">
|
||||||
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:orientation">vertical</item>
|
||||||
|
<item name="android:padding">8dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="register_item_container_no_padding">
|
<style name="register_item_container_no_padding">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
@ -0,0 +1,284 @@
|
|||||||
|
package com.tengshisoft.moduleijkplayer.controller;
|
||||||
|
|
||||||
|
import static com.tengshisoft.moduleijkplayer.util.PlayerUtils.stringForTime;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.animation.AlphaAnimation;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.SeekBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.tengshisoft.moduleijkplayer.R;
|
||||||
|
import com.tengshisoft.moduleijkplayer.player.VideoView;
|
||||||
|
import com.tengshisoft.moduleijkplayer.util.PlayerUtils;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 音频控制
|
||||||
|
*/
|
||||||
|
public class AudioControlView extends FrameLayout implements IControlComponent, View.OnClickListener, SeekBar.OnSeekBarChangeListener {
|
||||||
|
|
||||||
|
protected ControlWrapper mControlWrapper;
|
||||||
|
|
||||||
|
private TextView mTotalTime, mCurrTime;
|
||||||
|
private LinearLayout mBottomContainer;
|
||||||
|
private SeekBar mVideoProgress;
|
||||||
|
private ProgressBar mBottomProgress;
|
||||||
|
private ImageView mPlayButton;
|
||||||
|
|
||||||
|
private boolean mIsDragging;
|
||||||
|
private boolean isFullScreen = true;
|
||||||
|
private boolean mIsShowBottomProgress = true;
|
||||||
|
|
||||||
|
public AudioControlView(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFullScreen(boolean isfull) {
|
||||||
|
this.isFullScreen = isfull;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AudioControlView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AudioControlView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(context, attrs, defStyleAttr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
setVisibility(GONE);
|
||||||
|
LayoutInflater.from(getContext()).inflate(getLayoutId(), this, true);
|
||||||
|
|
||||||
|
mBottomContainer = findViewById(R.id.bottom_container);
|
||||||
|
mVideoProgress = findViewById(R.id.seekBar);
|
||||||
|
mVideoProgress.setOnSeekBarChangeListener(this);
|
||||||
|
mTotalTime = findViewById(R.id.total_time);
|
||||||
|
mCurrTime = findViewById(R.id.curr_time);
|
||||||
|
mPlayButton = findViewById(R.id.iv_play);
|
||||||
|
mPlayButton.setOnClickListener(this);
|
||||||
|
mBottomProgress = findViewById(R.id.bottom_progress);
|
||||||
|
|
||||||
|
//5.1以下系统SeekBar高度需要设置成WRAP_CONTENT
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||||
|
mVideoProgress.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.dkplayer_layout_audio_control_view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否显示底部进度条,默认显示
|
||||||
|
*/
|
||||||
|
public void showBottomProgress(boolean isShow) {
|
||||||
|
mIsShowBottomProgress = isShow;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attach(@NonNull ControlWrapper controlWrapper) {
|
||||||
|
mControlWrapper = controlWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onVisibilityChanged(boolean isVisible, Animation anim) {
|
||||||
|
if (isVisible) {
|
||||||
|
mBottomContainer.setVisibility(VISIBLE);
|
||||||
|
if (anim != null) {
|
||||||
|
mBottomContainer.startAnimation(anim);
|
||||||
|
}
|
||||||
|
if (mIsShowBottomProgress) {
|
||||||
|
mBottomProgress.setVisibility(GONE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mBottomContainer.setVisibility(GONE);
|
||||||
|
if (anim != null) {
|
||||||
|
mBottomContainer.startAnimation(anim);
|
||||||
|
}
|
||||||
|
if (mIsShowBottomProgress) {
|
||||||
|
mBottomProgress.setVisibility(VISIBLE);
|
||||||
|
AlphaAnimation animation = new AlphaAnimation(0f, 1f);
|
||||||
|
animation.setDuration(300);
|
||||||
|
mBottomProgress.startAnimation(animation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayStateChanged(int playState) {
|
||||||
|
switch (playState) {
|
||||||
|
case VideoView.STATE_IDLE:
|
||||||
|
case VideoView.STATE_PLAYBACK_COMPLETED:
|
||||||
|
setVisibility(GONE);
|
||||||
|
mBottomProgress.setProgress(0);
|
||||||
|
mBottomProgress.setSecondaryProgress(0);
|
||||||
|
mVideoProgress.setProgress(0);
|
||||||
|
mVideoProgress.setSecondaryProgress(0);
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_START_ABORT:
|
||||||
|
case VideoView.STATE_PREPARING:
|
||||||
|
case VideoView.STATE_PREPARED:
|
||||||
|
case VideoView.STATE_ERROR:
|
||||||
|
setVisibility(GONE);
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_PLAYING:
|
||||||
|
mPlayButton.setSelected(true);
|
||||||
|
if (mIsShowBottomProgress) {
|
||||||
|
if (mControlWrapper.isShowing()) {
|
||||||
|
mBottomProgress.setVisibility(GONE);
|
||||||
|
mBottomContainer.setVisibility(VISIBLE);
|
||||||
|
} else {
|
||||||
|
mBottomContainer.setVisibility(GONE);
|
||||||
|
mBottomProgress.setVisibility(VISIBLE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mBottomContainer.setVisibility(GONE);
|
||||||
|
}
|
||||||
|
setVisibility(VISIBLE);
|
||||||
|
//开始刷新进度
|
||||||
|
mControlWrapper.startProgress();
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_PAUSED:
|
||||||
|
mPlayButton.setSelected(false);
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_BUFFERING:
|
||||||
|
case VideoView.STATE_BUFFERED:
|
||||||
|
mPlayButton.setSelected(mControlWrapper.isPlaying());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerStateChanged(int playerState) {
|
||||||
|
// switch (playerState) {
|
||||||
|
// case VideoView.PLAYER_NORMAL:
|
||||||
|
// mFullScreen.setSelected(false);
|
||||||
|
// break;
|
||||||
|
// case VideoView.PLAYER_FULL_SCREEN:
|
||||||
|
// mFullScreen.setSelected(true);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
|
Activity activity = PlayerUtils.scanForActivity(getContext());
|
||||||
|
if (activity != null && mControlWrapper.hasCutout()) {
|
||||||
|
int orientation = activity.getRequestedOrientation();
|
||||||
|
int cutoutHeight = mControlWrapper.getCutoutHeight();
|
||||||
|
if (orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
|
||||||
|
mBottomContainer.setPadding(0, 0, 0, 0);
|
||||||
|
mBottomProgress.setPadding(0, 0, 0, 0);
|
||||||
|
} else if (orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
|
||||||
|
mBottomContainer.setPadding(cutoutHeight, 0, 0, 0);
|
||||||
|
mBottomProgress.setPadding(cutoutHeight, 0, 0, 0);
|
||||||
|
} else if (orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE) {
|
||||||
|
mBottomContainer.setPadding(0, 0, cutoutHeight, 0);
|
||||||
|
mBottomProgress.setPadding(0, 0, cutoutHeight, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setProgress(int duration, int position) {
|
||||||
|
if (mIsDragging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mVideoProgress != null) {
|
||||||
|
if (duration > 0) {
|
||||||
|
mVideoProgress.setEnabled(true);
|
||||||
|
int pos = (int) (position * 1.0 / duration * mVideoProgress.getMax());
|
||||||
|
mVideoProgress.setProgress(pos);
|
||||||
|
mBottomProgress.setProgress(pos);
|
||||||
|
} else {
|
||||||
|
mVideoProgress.setEnabled(false);
|
||||||
|
}
|
||||||
|
int percent = mControlWrapper.getBufferedPercentage();
|
||||||
|
if (percent >= 95) { //解决缓冲进度不能100%问题
|
||||||
|
mVideoProgress.setSecondaryProgress(mVideoProgress.getMax());
|
||||||
|
mBottomProgress.setSecondaryProgress(mBottomProgress.getMax());
|
||||||
|
} else {
|
||||||
|
mVideoProgress.setSecondaryProgress(percent * 10);
|
||||||
|
mBottomProgress.setSecondaryProgress(percent * 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTotalTime != null)
|
||||||
|
mTotalTime.setText(stringForTime(duration));
|
||||||
|
if (mCurrTime != null)
|
||||||
|
mCurrTime.setText(stringForTime(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLockStateChanged(boolean isLocked) {
|
||||||
|
onVisibilityChanged(!isLocked, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
int id = v.getId();
|
||||||
|
if (id == R.id.fullscreen) {
|
||||||
|
if (isFullScreen) {
|
||||||
|
toggleFullScreen();
|
||||||
|
}
|
||||||
|
} else if (id == R.id.iv_play) {
|
||||||
|
mControlWrapper.togglePlay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 横竖屏切换
|
||||||
|
*/
|
||||||
|
private void toggleFullScreen() {
|
||||||
|
Activity activity = PlayerUtils.scanForActivity(getContext());
|
||||||
|
mControlWrapper.toggleFullScreen(activity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
mIsDragging = true;
|
||||||
|
mControlWrapper.stopProgress();
|
||||||
|
mControlWrapper.stopFadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
long duration = mControlWrapper.getDuration();
|
||||||
|
long newPosition = (duration * seekBar.getProgress()) / mVideoProgress.getMax();
|
||||||
|
mControlWrapper.seekTo((int) newPosition);
|
||||||
|
mIsDragging = false;
|
||||||
|
mControlWrapper.startProgress();
|
||||||
|
mControlWrapper.startFadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
|
if (!fromUser) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
long duration = mControlWrapper.getDuration();
|
||||||
|
long newPosition = (duration * progress) / mVideoProgress.getMax();
|
||||||
|
if (mCurrTime != null)
|
||||||
|
mCurrTime.setText(stringForTime((int) newPosition));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,136 @@
|
|||||||
|
package com.tengshisoft.moduleijkplayer.controller;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.tengshisoft.moduleijkplayer.R;
|
||||||
|
import com.tengshisoft.moduleijkplayer.player.VideoView;
|
||||||
|
import com.tengshisoft.moduleijkplayer.player.VideoViewManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 准备播放界面
|
||||||
|
*/
|
||||||
|
public class AudioPrepareView extends FrameLayout implements IControlComponent {
|
||||||
|
|
||||||
|
private ControlWrapper mControlWrapper;
|
||||||
|
|
||||||
|
private ImageView mThumb;
|
||||||
|
private ImageView mStartPlay;
|
||||||
|
private ProgressBar mLoading;
|
||||||
|
private FrameLayout mNetWarning;
|
||||||
|
private TextView mTvState;
|
||||||
|
|
||||||
|
public AudioPrepareView(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AudioPrepareView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AudioPrepareView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(context, attrs, defStyleAttr);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
LayoutInflater.from(getContext()).inflate(R.layout.dkplayer_layout_prepare_view, this, true);
|
||||||
|
mThumb = findViewById(R.id.thumb);
|
||||||
|
mTvState = findViewById(R.id.tv_state);
|
||||||
|
mStartPlay = findViewById(R.id.start_play);
|
||||||
|
mLoading = findViewById(R.id.loading);
|
||||||
|
mNetWarning = findViewById(R.id.net_warning_layout);
|
||||||
|
findViewById(R.id.status_btn).setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
mNetWarning.setVisibility(GONE);
|
||||||
|
VideoViewManager.instance().setPlayOnMobileNetwork(true);
|
||||||
|
mControlWrapper.start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置点击此界面开始播放
|
||||||
|
*/
|
||||||
|
public void setClickStart() {
|
||||||
|
setOnClickListener(v -> mControlWrapper.start());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attach(@NonNull ControlWrapper controlWrapper) {
|
||||||
|
mControlWrapper = controlWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onVisibilityChanged(boolean isVisible, Animation anim) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(String state) {
|
||||||
|
mTvState.setText(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayStateChanged(int playState) {
|
||||||
|
switch (playState) {
|
||||||
|
case VideoView.STATE_PREPARING:
|
||||||
|
bringToFront();
|
||||||
|
setVisibility(VISIBLE);
|
||||||
|
mStartPlay.setVisibility(View.GONE);
|
||||||
|
mNetWarning.setVisibility(GONE);
|
||||||
|
mLoading.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_PLAYING:
|
||||||
|
case VideoView.STATE_PAUSED:
|
||||||
|
case VideoView.STATE_ERROR:
|
||||||
|
case VideoView.STATE_BUFFERING:
|
||||||
|
case VideoView.STATE_BUFFERED:
|
||||||
|
case VideoView.STATE_PLAYBACK_COMPLETED:
|
||||||
|
setVisibility(GONE);
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_IDLE:
|
||||||
|
setVisibility(VISIBLE);
|
||||||
|
bringToFront();
|
||||||
|
mLoading.setVisibility(View.GONE);
|
||||||
|
mNetWarning.setVisibility(GONE);
|
||||||
|
mStartPlay.setVisibility(View.VISIBLE);
|
||||||
|
mThumb.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
case VideoView.STATE_START_ABORT:
|
||||||
|
setVisibility(VISIBLE);
|
||||||
|
mNetWarning.setVisibility(VISIBLE);
|
||||||
|
mNetWarning.bringToFront();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerStateChanged(int playerState) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setProgress(int duration, int position) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLockStateChanged(boolean isLocked) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
69
moduleijkplayer/src/main/res/layout/dkplayer_layout_audio_control_view.xml
Executable file
69
moduleijkplayer/src/main/res/layout/dkplayer_layout_audio_control_view.xml
Executable file
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/bottom_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dkplayer_controller_height"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingRight="20dp"
|
||||||
|
android:background="@drawable/dkplayer_shape_stardard_controller_bottom_bg"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_play"
|
||||||
|
android:layout_width="@dimen/dkplayer_controller_height"
|
||||||
|
android:layout_height="@dimen/dkplayer_controller_height"
|
||||||
|
android:padding="@dimen/dkplayer_controller_icon_padding"
|
||||||
|
android:src="@drawable/dkplayer_selector_play_button" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/curr_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="@dimen/dkplayer_controller_time_text_size"
|
||||||
|
tools:text="00:00" />
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seekBar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@null"
|
||||||
|
android:max="1000"
|
||||||
|
android:maxHeight="2dp"
|
||||||
|
android:minHeight="2dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:progressDrawable="@drawable/dkplayer_layer_progress_bar"
|
||||||
|
android:thumb="@drawable/dkplayer_seekbar_thumb"
|
||||||
|
android:thumbOffset="0dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/total_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="@dimen/dkplayer_controller_time_text_size"
|
||||||
|
tools:text="00:00" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/bottom_progress"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:max="1000"
|
||||||
|
android:progressDrawable="@drawable/dkplayer_layer_progress_bar"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
@ -349,8 +349,12 @@ public class NewsDetailActivity extends BaseActivity {
|
|||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", mNId, "新闻");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void showShareDialog() {
|
private void showShareDialog() {
|
||||||
BottomDialogShareView shareView = new BottomDialogShareView.DialogBuilder(mActivity).build();
|
BottomDialogShareView shareView = new BottomDialogShareView.DialogBuilder(mActivity).build();
|
||||||
shareView.addOnChoseListener(new BottomDialogShareView.OnChoseListener() {
|
shareView.addOnChoseListener(new BottomDialogShareView.OnChoseListener() {
|
||||||
|
@ -37,6 +37,9 @@ import io.reactivex.annotations.NonNull;
|
|||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻只有一级
|
||||||
|
*/
|
||||||
@Route(path = PathConfig.PATH_MODULE_MAIN_NEWS_LIST)
|
@Route(path = PathConfig.PATH_MODULE_MAIN_NEWS_LIST)
|
||||||
public class NewsListActivity extends BaseActivity {
|
public class NewsListActivity extends BaseActivity {
|
||||||
@BindView(R2.id.srl_content)
|
@BindView(R2.id.srl_content)
|
||||||
@ -223,6 +226,8 @@ public class NewsListActivity extends BaseActivity {
|
|||||||
mAdapter.setData(mNewsDatas);
|
mAdapter.setData(mNewsDatas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mSrlContent.finishRefresh();
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -275,7 +280,7 @@ public class NewsListActivity extends BaseActivity {
|
|||||||
url = rowsBean.getTemplateRecordUrl();
|
url = rowsBean.getTemplateRecordUrl();
|
||||||
}
|
}
|
||||||
ARouter.getInstance()
|
ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE)
|
||||||
.withString("id", rowsBean.getNewsContentId())
|
.withString("id", rowsBean.getNewsContentId())
|
||||||
.withString("url", url)
|
.withString("url", url)
|
||||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||||
|
@ -40,7 +40,6 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
|||||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||||
import com.sucstepsoft.cm_utils.core.beans.BaseImageBean;
|
import com.sucstepsoft.cm_utils.core.beans.BaseImageBean;
|
||||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BannerImageTextAllAdapter;
|
import com.sucstepsoft.cm_utils.core.widget.base.BannerImageTextAllAdapter;
|
||||||
@ -51,18 +50,30 @@ import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
|
|||||||
import com.sucstepsoft.cm_utils.core.widget.views.ItemSplitDivider;
|
import com.sucstepsoft.cm_utils.core.widget.views.ItemSplitDivider;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.views.NestedScrollWebView;
|
import com.sucstepsoft.cm_utils.core.widget.views.NestedScrollWebView;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||||
|
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||||
import com.sucstepsoft.cm_utils.utils.FileUtils;
|
import com.sucstepsoft.cm_utils.utils.FileUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||||
|
import com.sucstepsoft.cm_utils.utils.ScreenUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.TimeUtils;
|
import com.sucstepsoft.cm_utils.utils.TimeUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.toast.ToastUtils;
|
import com.sucstepsoft.cm_utils.utils.toast.ToastUtils;
|
||||||
|
import com.tengshisoft.moduleijkplayer.controller.AudioControlView;
|
||||||
|
import com.tengshisoft.moduleijkplayer.controller.AudioPrepareView;
|
||||||
|
import com.tengshisoft.moduleijkplayer.controller.CompleteView;
|
||||||
|
import com.tengshisoft.moduleijkplayer.controller.ErrorView;
|
||||||
|
import com.tengshisoft.moduleijkplayer.controller.GestureView;
|
||||||
|
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.tengshisoft.moduleijkplayer.player.VideoView;
|
||||||
import com.tengshisoft.mudulemain.R;
|
import com.tengshisoft.mudulemain.R;
|
||||||
import com.tengshisoft.mudulemain.R2;
|
import com.tengshisoft.mudulemain.R2;
|
||||||
import com.tengshisoft.mudulemain.cultural.adapter.CommentAdapter;
|
import com.tengshisoft.mudulemain.cultural.adapter.CommentAdapter;
|
||||||
|
import com.tengshisoft.mudulemain.cultural.adapter.NewsCategoryAdapter;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.BaseUserBean;
|
import com.tengshisoft.mudulemain.cultural.beans.BaseUserBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.CollectBean;
|
import com.tengshisoft.mudulemain.cultural.beans.CollectBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.CommentListBean;
|
import com.tengshisoft.mudulemain.cultural.beans.CommentListBean;
|
||||||
@ -145,8 +156,18 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
TypeFaceTextView mTvPublishTime;
|
TypeFaceTextView mTvPublishTime;
|
||||||
@BindView(R2.id.ll_title_view)
|
@BindView(R2.id.ll_title_view)
|
||||||
LinearLayout mLlTitleView;
|
LinearLayout mLlTitleView;
|
||||||
|
@BindView(R2.id.ll_audio)//音频
|
||||||
|
LinearLayout mLlAudio;
|
||||||
|
@BindView(R2.id.vv_audio)
|
||||||
|
VideoView mAudio;
|
||||||
|
@BindView(R2.id.rlv_audio_category)
|
||||||
|
RecyclerView mRlvAudioCategory;
|
||||||
|
@BindView(R2.id.tv_audio_txt)
|
||||||
|
TypeFaceTextView mTvAudioTxt;
|
||||||
|
@BindView(R2.id.iv_banner_left)
|
||||||
|
ImageView mIvImgLeft;
|
||||||
|
@BindView(R2.id.iv_banner_right)
|
||||||
|
ImageView mIvImgRight;
|
||||||
private AddPhotoBean mCurrentBean;
|
private AddPhotoBean mCurrentBean;
|
||||||
private String mPicPath;
|
private String mPicPath;
|
||||||
private Unbinder mBind;
|
private Unbinder mBind;
|
||||||
@ -168,6 +189,7 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
private String mTitle;
|
private String mTitle;
|
||||||
private String mPhoto;
|
private String mPhoto;
|
||||||
private File mDestFile;
|
private File mDestFile;
|
||||||
|
private NewsCategoryAdapter mCategoryAdapter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int setLayoutId() {
|
protected int setLayoutId() {
|
||||||
@ -296,6 +318,9 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
getNewsDetail();
|
getNewsDetail();
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", mNId, "新闻");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -352,14 +377,17 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
createImgView(newsDetailBean);
|
createImgView(newsDetailBean);
|
||||||
break;
|
break;
|
||||||
case "3"://音频
|
case "3"://音频
|
||||||
|
createAudioView(newsDetailBean);
|
||||||
break;
|
break;
|
||||||
case "4"://视频
|
case "4"://视频
|
||||||
|
createVideoView(newsDetailBean);
|
||||||
break;
|
break;
|
||||||
case "5"://PDF
|
case "5"://PDF
|
||||||
break;
|
break;
|
||||||
case "6"://6链接
|
case "6"://6链接
|
||||||
|
createWebView(newsDetailBean);
|
||||||
break;
|
break;
|
||||||
case "1":
|
case "1"://文章
|
||||||
default:
|
default:
|
||||||
mLlTitleView.setVisibility(View.VISIBLE);
|
mLlTitleView.setVisibility(View.VISIBLE);
|
||||||
mTvTitle.setText(newsDetailBean.getNewsContentTitle());
|
mTvTitle.setText(newsDetailBean.getNewsContentTitle());
|
||||||
@ -482,8 +510,13 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
}
|
}
|
||||||
String data = b.getNewsContentContent();
|
if ("6".equals(b.getNewsContentType())) {
|
||||||
mWvContent.loadData(data, "text/html", "utf-8");
|
mWvContent.loadUrl(b.getNewsContentContent());
|
||||||
|
} else {
|
||||||
|
String data = b.getNewsContentContent();
|
||||||
|
mWvContent.loadDataWithBaseURL(null, getHtmlData(data), "text/html", "utf-8", null);
|
||||||
|
// mWvContent.loadData(data, "text/html", "utf-8");
|
||||||
|
}
|
||||||
mWvContent.setWebViewClient(new WebViewClient() {
|
mWvContent.setWebViewClient(new WebViewClient() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||||
@ -495,7 +528,12 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
super.onPageFinished(view, url);
|
super.onPageFinished(view, url);
|
||||||
mContentSkeleton.hide();
|
mContentSkeleton.hide();
|
||||||
view.getSettings().setBlockNetworkImage(false);//开启页面图片加载
|
view.getSettings().setBlockNetworkImage(false);//开启页面图片加载
|
||||||
runOnUiThread(() -> mWvContent.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)));
|
runOnUiThread(() -> {
|
||||||
|
// imgReset();
|
||||||
|
// pSection();
|
||||||
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
mWvContent.setLayoutParams(params);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -506,16 +544,16 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
if (url.contains(BaseUrlApi.BASE_SYSTEM_IP + "news/route/file/download/true")) {
|
// if (url.contains(BaseUrlApi.BASE_SYSTEM_IP + "news/route/file/download/true")) {
|
||||||
//TODO 数图资源
|
// //TODO 数图资源
|
||||||
ARouter.getInstance()
|
// ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_PDF)
|
// .build(PathConfig.PATH_MODULE_MAIN_NEWS_PDF)
|
||||||
.withString("title", mTitle)
|
// .withString("title", mTitle)
|
||||||
.withString("url", url)
|
// .withString("url", url)
|
||||||
.navigation();
|
// .navigation();
|
||||||
} else {
|
// } else {
|
||||||
view.loadUrl(url);
|
// view.loadUrl(url);
|
||||||
}
|
// }
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -528,44 +566,215 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {margin-left:5px;margin-right:5px;margin-top:10px;}
|
||||||
|
private String getHtmlData(String content) {
|
||||||
|
String head = "<head>"
|
||||||
|
+ "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">"
|
||||||
|
+ "<style>img{max-width:100%;width:100%;height:auto;}*</style>"
|
||||||
|
+ "</head>";
|
||||||
|
return "<html>" + head + "<body>" + content + "</body></html>";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对图片进行重置大小,宽度就是手机屏幕宽度,高度根据宽度比便自动缩放
|
||||||
|
**/
|
||||||
|
private void imgReset() {
|
||||||
|
mWvContent.loadUrl("javascript:(function(){" +
|
||||||
|
"var objs = document.getElementsByTagName('img'); " +
|
||||||
|
"for(var i=0;i<objs.length;i++) " +
|
||||||
|
"{"
|
||||||
|
+ "var img = objs[i]; " +
|
||||||
|
" img.style.maxWidth = '100%'; img.style.height = 'auto'; " +
|
||||||
|
"}" +
|
||||||
|
"})()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为锻炼添加
|
||||||
|
*/
|
||||||
|
private void pSection() {
|
||||||
|
mWvContent.loadUrl("javascript:(function(){" +
|
||||||
|
"var objs = document.getElementsByTagName('p'); " +
|
||||||
|
"for(var i=0;i<objs.length;i++) " +
|
||||||
|
"{"
|
||||||
|
+ "var p = objs[i]; " +
|
||||||
|
" p.style.textIndent = '35px';" +
|
||||||
|
"}" +
|
||||||
|
"})()");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载音频新闻
|
* 加载音频新闻
|
||||||
*/
|
*/
|
||||||
private void createAudioView() {
|
private void createAudioView(NewsDetailBean b) {
|
||||||
|
mLlAudio.setVisibility(View.VISIBLE);
|
||||||
|
for (int i = 0; i < b.getFileList().size(); i++) {
|
||||||
|
List<NewsDetailBean.FileListBean> fileList = b.getFileList();
|
||||||
|
if (i == 0) {
|
||||||
|
fileList.get(i).setCheck(true);
|
||||||
|
} else {
|
||||||
|
fileList.get(i).setCheck(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mCategoryAdapter = new NewsCategoryAdapter(mActivity, b.getFileList());
|
||||||
|
mRlvAudioCategory.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.HORIZONTAL, false));
|
||||||
|
mRlvAudioCategory.setAdapter(mCategoryAdapter);
|
||||||
|
mCategoryAdapter.addOnItemClickListener(fileListBean -> {
|
||||||
|
for (int i = 0; i < b.getFileList().size(); i++) {
|
||||||
|
NewsDetailBean.FileListBean fileBean = b.getFileList().get(i);
|
||||||
|
if (fileBean.getContentFileFileId().equals(fileListBean.getContentFileFileId())) {
|
||||||
|
fileBean.setCheck(true);
|
||||||
|
} else {
|
||||||
|
fileBean.setCheck(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mCategoryAdapter.setData(b.getFileList());
|
||||||
|
setAudioUrl(fileListBean);
|
||||||
|
});
|
||||||
|
|
||||||
|
StandardVideoController controller = new StandardVideoController(mActivity);
|
||||||
|
controller.setEnableOrientation(true);
|
||||||
|
AudioPrepareView prepareView = new AudioPrepareView(this);//准备播放界面
|
||||||
|
ImageView thumb = prepareView.findViewById(com.tengshisoft.moduleijkplayer.R.id.thumb);//封面图
|
||||||
|
Glide.with(mActivity).load(com.tengshisoft.moduleijkplayer.R.drawable.ic_img_default).into(thumb);
|
||||||
|
controller.addControlComponent(prepareView);
|
||||||
|
prepareView.setClickStart();
|
||||||
|
CompleteView completeView = new CompleteView(this);
|
||||||
|
controller.addControlComponent(completeView);//自动完成播放界面
|
||||||
|
ErrorView errorView = new ErrorView(this);
|
||||||
|
controller.addControlComponent(errorView);//错误界面
|
||||||
|
TitleView titleView = new TitleView(this);//标题栏
|
||||||
|
controller.addControlComponent(titleView);
|
||||||
|
//根据是否为直播设置不同的底部控制条
|
||||||
|
AudioControlView vodControlView = new AudioControlView(this);//点播控制条
|
||||||
|
controller.addControlComponent(vodControlView);
|
||||||
|
GestureView gestureControlView = new GestureView(this);//滑动控制视图
|
||||||
|
controller.addControlComponent(gestureControlView);
|
||||||
|
controller.setCanChangePosition(false);
|
||||||
|
//设置标题
|
||||||
|
titleView.setTitle(mTitle);
|
||||||
|
mAudio.setVideoController(controller);
|
||||||
|
mAudio.setUrl(BaseUrlApi.BASE_IMG_URL + b.getFileList().get(0).getContentFileFileId());
|
||||||
|
mAudio.setLooping(true);
|
||||||
|
mTvAudioTxt.setText(b.getFileList().get(0).getContentFileText());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置音频Url
|
||||||
|
*/
|
||||||
|
private void setAudioUrl(NewsDetailBean.FileListBean b) {
|
||||||
|
if (mAudio == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mAudio.isPlaying()) {
|
||||||
|
mAudio.pause();
|
||||||
|
mAudio.release();
|
||||||
|
}
|
||||||
|
mAudio.setUrl(BaseUrlApi.BASE_IMG_URL + b.getContentFileFileId());
|
||||||
|
mAudio.start();
|
||||||
|
mTvAudioTxt.setText(b.getContentFileText());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载视频新闻
|
* 加载视频新闻
|
||||||
*/
|
*/
|
||||||
private void createVideoView() {
|
private void createVideoView(NewsDetailBean b) {
|
||||||
|
mLlVideo.setVisibility(View.VISIBLE);
|
||||||
|
for (int i = 0; i < b.getFileList().size(); i++) {
|
||||||
|
List<NewsDetailBean.FileListBean> fileList = b.getFileList();
|
||||||
|
if (i == 0) {
|
||||||
|
fileList.get(i).setCheck(true);
|
||||||
|
} else {
|
||||||
|
fileList.get(i).setCheck(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mCategoryAdapter = new NewsCategoryAdapter(mActivity, b.getFileList());
|
||||||
|
mRlvVideoCategory.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.HORIZONTAL, false));
|
||||||
|
mRlvVideoCategory.setAdapter(mCategoryAdapter);
|
||||||
|
mCategoryAdapter.addOnItemClickListener(fileListBean -> {
|
||||||
|
for (int i = 0; i < b.getFileList().size(); i++) {
|
||||||
|
NewsDetailBean.FileListBean fileBean = b.getFileList().get(i);
|
||||||
|
if (fileBean.getContentFileFileId().equals(fileListBean.getContentFileFileId())) {
|
||||||
|
fileBean.setCheck(true);
|
||||||
|
} else {
|
||||||
|
fileBean.setCheck(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mCategoryAdapter.setData(b.getFileList());
|
||||||
|
setVideoUrl(fileListBean);
|
||||||
|
});
|
||||||
|
|
||||||
|
StandardVideoController controller = new StandardVideoController(mActivity);
|
||||||
|
controller.setEnableOrientation(true);
|
||||||
|
PrepareView prepareView = new PrepareView(this);//准备播放界面
|
||||||
|
ImageView thumb = prepareView.findViewById(com.tengshisoft.moduleijkplayer.R.id.thumb);//封面图
|
||||||
|
Glide.with(mActivity).load(com.tengshisoft.moduleijkplayer.R.drawable.ic_img_default).into(thumb);
|
||||||
|
controller.addControlComponent(prepareView);
|
||||||
|
prepareView.setClickStart();
|
||||||
|
CompleteView completeView = new CompleteView(this);
|
||||||
|
controller.addControlComponent(completeView);//自动完成播放界面
|
||||||
|
ErrorView errorView = new ErrorView(this);
|
||||||
|
controller.addControlComponent(errorView);//错误界面
|
||||||
|
TitleView titleView = new TitleView(this);//标题栏
|
||||||
|
controller.addControlComponent(titleView);
|
||||||
|
//根据是否为直播设置不同的底部控制条
|
||||||
|
VodControlView vodControlView = new VodControlView(this);//点播控制条
|
||||||
|
controller.addControlComponent(vodControlView);
|
||||||
|
GestureView gestureControlView = new GestureView(this);//滑动控制视图
|
||||||
|
controller.addControlComponent(gestureControlView);
|
||||||
|
controller.setCanChangePosition(false);
|
||||||
|
//设置标题
|
||||||
|
titleView.setTitle(mTitle);
|
||||||
|
mVideo.setVideoController(controller);
|
||||||
|
mVideo.setUrl(BaseUrlApi.BASE_IMG_URL + b.getFileList().get(0).getContentFileFileId());
|
||||||
|
mTvVideoTxt.setText(b.getFileList().get(0).getContentFileText());
|
||||||
|
// mVideo.addOnStateChangeListener(mOnStateChangeListener);
|
||||||
|
// mVideo.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置视频URL
|
||||||
|
*/
|
||||||
|
private void setVideoUrl(NewsDetailBean.FileListBean b) {
|
||||||
|
if (mVideo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mVideo.isPlaying()) {
|
||||||
|
mVideo.pause();
|
||||||
|
mVideo.release();
|
||||||
|
}
|
||||||
|
mVideo.setUrl(BaseUrlApi.BASE_IMG_URL + b.getContentFileFileId());
|
||||||
|
mVideo.start();
|
||||||
|
mTvVideoTxt.setText(b.getContentFileText());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载图片新闻
|
* 加载图片新闻
|
||||||
*/
|
*/
|
||||||
private void createImgView(NewsDetailBean b) {
|
private void createImgView(NewsDetailBean b) {
|
||||||
mRlImg.setVisibility(View.VISIBLE);
|
mRlImg.setVisibility(View.VISIBLE);
|
||||||
List<BaseImageBean> mBannerList = new ArrayList<>();
|
List<BaseImageBean> mBannerList = new ArrayList<>();
|
||||||
|
int screenHeight = ScreenUtils.getScreenHeight();
|
||||||
|
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(mBnImg.getLayoutParams());
|
||||||
|
LogUtils.e(screenHeight);
|
||||||
|
params.height = screenHeight - ConvertUtils.dp2px(96) - 50;
|
||||||
|
mBnImg.setLayoutParams(params);
|
||||||
for (int i = 0; i < b.getFileList().size(); i++) {
|
for (int i = 0; i < b.getFileList().size(); i++) {
|
||||||
NewsDetailBean.FileListBean fileListBean = b.getFileList().get(i);
|
NewsDetailBean.FileListBean fileListBean = b.getFileList().get(i);
|
||||||
BaseImageBean bannerBean = new BaseImageBean();
|
BaseImageBean bannerBean = new BaseImageBean();
|
||||||
// bannerBean.setPhoto(BaseUrlApi.BASE_NEWS_IMG_URL + fileListBean.getContentFileFileId());
|
bannerBean.setImgUrl(BaseUrlApi.BASE_NEWS_IMG_URL + fileListBean.getContentFileFileId());
|
||||||
if (i / 2 == 0) {
|
|
||||||
// bannerBean.setPhoto(BaseUrlApi.BASE_NEWS_IMG_URL + fileListBean.getContentFileFileId());
|
|
||||||
bannerBean.setImgUrl("https://lmg.jj20.com/up/allimg/tp08/46042223542701-lp.jpg");
|
|
||||||
} else {
|
|
||||||
bannerBean.setImgUrl("https://www.ssfiction.com/wp-content/uploads/2020/08/20200805_5f2b1669e9a24.jpg");
|
|
||||||
}
|
|
||||||
bannerBean.setName(fileListBean.getContentFileText());
|
bannerBean.setName(fileListBean.getContentFileText());
|
||||||
mBannerList.add(bannerBean);
|
mBannerList.add(bannerBean);
|
||||||
}
|
}
|
||||||
BannerImageTextAllAdapter mBannerImageAdapter = new BannerImageTextAllAdapter(mBannerList);
|
BannerImageTextAllAdapter mBannerImageAdapter = new BannerImageTextAllAdapter(mBannerList);
|
||||||
mBnImg.setAdapter(mBannerImageAdapter);
|
mBnImg.setAdapter(mBannerImageAdapter);
|
||||||
mBnImg.setPageTransformer(new ScaleInTransformer());
|
mBnImg.setPageTransformer(new ScaleInTransformer());
|
||||||
mBnImg.setDelayTime(10000L);
|
mBnImg.setDelayTime(12000L);
|
||||||
mBnImg.start();
|
mBnImg.start();
|
||||||
|
|
||||||
|
mIvImgLeft.setOnClickListener(v -> mBnImg.setCurrentItem(mBnImg.getCurrentItem() - 1));
|
||||||
|
mIvImgRight.setOnClickListener(v -> mBnImg.setCurrentItem(mBnImg.getCurrentItem() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1201,12 +1410,51 @@ public class NewsLocalDetailActivity extends BaseActivity {
|
|||||||
buttomDialogView.show();
|
buttomDialogView.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (mLlAudio.getVisibility() == View.VISIBLE) {
|
||||||
|
if (mAudio != null) {
|
||||||
|
mAudio.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mLlVideo.getVisibility() == View.VISIBLE) {
|
||||||
|
if (mVideo != null) {
|
||||||
|
mVideo.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
if (mLlAudio.getVisibility() == View.VISIBLE) {
|
||||||
|
if (mAudio != null) {
|
||||||
|
mAudio.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mLlVideo.getVisibility() == View.VISIBLE) {
|
||||||
|
if (mVideo != null) {
|
||||||
|
mVideo.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
mContentView = null;
|
mContentView = null;
|
||||||
|
if (mAudio != null) {
|
||||||
|
mAudio.pause();
|
||||||
|
mAudio.release();
|
||||||
|
}
|
||||||
|
if (mVideo != null) {
|
||||||
|
mVideo.pause();
|
||||||
|
mVideo.release();
|
||||||
|
}
|
||||||
if (mBind != null) {
|
if (mBind != null) {
|
||||||
mBind.unbind();
|
mBind.unbind();
|
||||||
}
|
}
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -70,7 +70,6 @@ public class NewsMainActivity extends BaseActivity {
|
|||||||
.withString("id", mId)
|
.withString("id", mId)
|
||||||
.withBoolean("isTab", true)
|
.withBoolean("isTab", true)
|
||||||
.navigation());
|
.navigation());
|
||||||
|
|
||||||
getNewsTabs();
|
getNewsTabs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,16 +94,17 @@ public class NewsMainActivity extends BaseActivity {
|
|||||||
if (newsTabBeans != null && newsTabBeans.size() > 0) {
|
if (newsTabBeans != null && newsTabBeans.size() > 0) {
|
||||||
NewsTabBean allBean = new NewsTabBean();
|
NewsTabBean allBean = new NewsTabBean();
|
||||||
allBean.setDirectoriesName("全部");
|
allBean.setDirectoriesName("全部");
|
||||||
allBean.setNewsDirectoriesId(mId);
|
allBean.setNewsDirectoriesId(mPId);
|
||||||
allBean.setDirectoriesParentId(mId);
|
allBean.setDirectoriesParentId(mPId);
|
||||||
allBean.setDirectoriesView("2");
|
allBean.setDirectoriesView("2");
|
||||||
newsTabBeans.add(0, allBean);
|
newsTabBeans.add(0, allBean);
|
||||||
|
|
||||||
mTabs = newsTabBeans;
|
mTabs = newsTabBeans;
|
||||||
for (int i = 0; i < newsTabBeans.size(); i++) {
|
for (int i = 0; i < newsTabBeans.size(); i++) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("type", newsTabBeans.get(i).getNewsDirectoriesId());
|
bundle.putString("type", newsTabBeans.get(i).getNewsDirectoriesId());
|
||||||
|
bundle.putBoolean("isAll","全部".equals(newsTabBeans.get(i).getDirectoriesName()));
|
||||||
bundle.putString("pId", "");
|
bundle.putString("pId", "");
|
||||||
bundle.putBoolean("isAll", "全部".equals(newsTabBeans.get(i).getDirectoriesName()));
|
|
||||||
BaseFragment fragment = null;
|
BaseFragment fragment = null;
|
||||||
//0 外部链接 1存在子集 2没有子集
|
//0 外部链接 1存在子集 2没有子集
|
||||||
if ("0".equals(newsTabBeans.get(i).getDirectoriesView())) {
|
if ("0".equals(newsTabBeans.get(i).getDirectoriesView())) {
|
||||||
|
@ -142,45 +142,46 @@ public class NewsSearchActivity extends BaseActivity {
|
|||||||
* @param type
|
* @param type
|
||||||
*/
|
*/
|
||||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||||
String url = "";
|
ARouter.getInstance()
|
||||||
if ("6".equals(rowsBean.getNewsContentType())) {
|
// .build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL) //TODO 连接
|
||||||
ARouter.getInstance()
|
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE)//TODO 接口方式
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
.withString("id", rowsBean.getNewsContentId())
|
||||||
.withString("title", rowsBean.getNewsContentTitle())
|
.withString("url", "")
|
||||||
.withString("url", rowsBean.getNewsContentContent())
|
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||||
.navigation();
|
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||||
} else {
|
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||||
int newsType = 0;
|
.withString("photo",
|
||||||
if (type == 1) {
|
BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||||
//1自定义列表
|
.withString("title", rowsBean.getNewsContentTitle())
|
||||||
//3列表详情
|
.withInt("type", 2)
|
||||||
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
.navigation();
|
||||||
//列表
|
// String url = "";
|
||||||
url = rowsBean.getTemplateRecordUrl();
|
// if ("6".equals(rowsBean.getNewsContentType())) {
|
||||||
newsType = 0;
|
// ARouter.getInstance()
|
||||||
} else {
|
// .build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||||
//内容
|
// .withString("title", rowsBean.getNewsContentTitle())
|
||||||
url = rowsBean.getNewsConfigDescriptionText();
|
// .withString("url", rowsBean.getNewsContentContent())
|
||||||
newsType = 1;
|
// .navigation();
|
||||||
}
|
// } else {
|
||||||
} else {
|
// int newsType = 0;
|
||||||
newsType = 0;
|
// if (type == 1) {
|
||||||
url = rowsBean.getTemplateRecordUrl();
|
// //1自定义列表
|
||||||
}
|
// //3列表详情
|
||||||
ARouter.getInstance()
|
// if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL) //TODO 连接
|
// //列表
|
||||||
// .build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE)//TODO 接口方式
|
// url = rowsBean.getTemplateRecordUrl();
|
||||||
.withString("id", rowsBean.getNewsContentId())
|
// newsType = 0;
|
||||||
.withString("url", url)
|
// } else {
|
||||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
// //内容
|
||||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
// url = rowsBean.getNewsConfigDescriptionText();
|
||||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
// newsType = 1;
|
||||||
.withString("photo",
|
// }
|
||||||
BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
// } else {
|
||||||
.withString("title", rowsBean.getNewsContentTitle())
|
// newsType = 0;
|
||||||
.withInt("type", newsType)
|
// url = rowsBean.getTemplateRecordUrl();
|
||||||
.navigation();
|
// }
|
||||||
}
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,4 +314,4 @@ public class NewsSearchActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,28 +1,24 @@
|
|||||||
package com.tengshisoft.mudulemain.cultural.adapter;
|
package com.tengshisoft.mudulemain.cultural.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import android.net.http.SslError;
|
import android.net.http.SslError;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.webkit.SslErrorHandler;
|
import android.webkit.SslErrorHandler;
|
||||||
import android.webkit.WebResourceRequest;
|
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.load.MultiTransformation;
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.bumptech.glide.load.resource.bitmap.FitCenter;
|
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.GlideRoundTransform;
|
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.RoundedCornersTransform;
|
import com.sucstepsoft.cm_utils.core.widget.base.RoundedCornersTransform;
|
||||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||||
@ -54,6 +50,7 @@ public class NewsAdapter extends BaseRecyclerAdapter<NewsItemBean.RowsBean, Recy
|
|||||||
roundedCornersTransform.setNeedCorner(true, true, true, true);
|
roundedCornersTransform.setNeedCorner(true, true, true, true);
|
||||||
mPicOptions = new RequestOptions()
|
mPicOptions = new RequestOptions()
|
||||||
.transform(roundedCornersTransform)
|
.transform(roundedCornersTransform)
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.error(R.drawable.ic_img_default)
|
.error(R.drawable.ic_img_default)
|
||||||
.placeholder(R.drawable.ic_img_default);
|
.placeholder(R.drawable.ic_img_default);
|
||||||
|
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.tengshisoft.mudulemain.cultural.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||||
|
import com.tengshisoft.mudulemain.R;
|
||||||
|
import com.tengshisoft.mudulemain.cultural.beans.NewsDetailBean;
|
||||||
|
import com.tengshisoft.mudulemain.cultural.holder.NewsCategoryHolder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2020/5/15 - 10:00 AM
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述:
|
||||||
|
*/
|
||||||
|
public class NewsCategoryAdapter extends BaseRecyclerAdapter<NewsDetailBean.FileListBean, NewsCategoryHolder> {
|
||||||
|
|
||||||
|
public NewsCategoryAdapter(Context ctx, List<NewsDetailBean.FileListBean> list) {
|
||||||
|
super(ctx, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NewsCategoryHolder createHolder(ViewGroup parent, int viewType) {
|
||||||
|
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_news_category, parent, false);
|
||||||
|
return new NewsCategoryHolder(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindHolder(NewsCategoryHolder h, int i) {
|
||||||
|
NewsDetailBean.FileListBean b = mData.get(i);
|
||||||
|
if (b.isCheck()) {
|
||||||
|
h.mTvName.setBackgroundResource(R.drawable.shape_red_line_ra_2);
|
||||||
|
} else {
|
||||||
|
h.mTvName.setBackgroundResource(0);
|
||||||
|
}
|
||||||
|
h.mTvName.setText(String.valueOf(i + 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
0
modulemain/src/main/java/com/tengshisoft/mudulemain/cultural/adapter/NewsTabAdapter.java
Normal file → Executable file
0
modulemain/src/main/java/com/tengshisoft/mudulemain/cultural/adapter/NewsTabAdapter.java
Normal file → Executable file
@ -338,6 +338,15 @@ public class NewsDetailBean {
|
|||||||
private String contentFileText;
|
private String contentFileText;
|
||||||
private String newsContentFileId;
|
private String newsContentFileId;
|
||||||
private String newsContentId;
|
private String newsContentId;
|
||||||
|
private boolean isCheck;
|
||||||
|
|
||||||
|
public boolean isCheck() {
|
||||||
|
return isCheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheck(boolean check) {
|
||||||
|
isCheck = check;
|
||||||
|
}
|
||||||
|
|
||||||
public String getContentFileFileId() {
|
public String getContentFileFileId() {
|
||||||
return contentFileFileId;
|
return contentFileFileId;
|
||||||
|
@ -59,8 +59,8 @@ public class NewsFragment extends BaseFragment {
|
|||||||
private NewsAdapter mAdapter;
|
private NewsAdapter mAdapter;
|
||||||
private int mTotalPage = 0;
|
private int mTotalPage = 0;
|
||||||
private int mCurrentPage = 1;
|
private int mCurrentPage = 1;
|
||||||
private String mType;//newsID
|
private String mType;//newsId
|
||||||
private String mPId;//newsPid
|
private String mPid;//newsPid
|
||||||
private RecyclerViewSkeletonScreen mNewsSkeleton;
|
private RecyclerViewSkeletonScreen mNewsSkeleton;
|
||||||
private Disposable mD1;
|
private Disposable mD1;
|
||||||
private Disposable mD2;
|
private Disposable mD2;
|
||||||
@ -73,8 +73,8 @@ public class NewsFragment extends BaseFragment {
|
|||||||
setStateView(STATE_SUCCESS);
|
setStateView(STATE_SUCCESS);
|
||||||
mAdapter = new NewsAdapter(mActivity, mNewsDatas);
|
mAdapter = new NewsAdapter(mActivity, mNewsDatas);
|
||||||
mType = getArguments().getString("type");
|
mType = getArguments().getString("type");
|
||||||
mPId = getArguments().getString("pId");
|
mPid = getArguments().getString("pId");
|
||||||
mIsAll = getArguments().getBoolean("isAll", false);
|
mIsAll = getArguments().getBoolean("isAll");
|
||||||
mCurrentPage = 1;
|
mCurrentPage = 1;
|
||||||
mTotalPage = 0;
|
mTotalPage = 0;
|
||||||
mNewsDatas.clear();
|
mNewsDatas.clear();
|
||||||
@ -114,45 +114,45 @@ public class NewsFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||||
ARouter.getInstance()
|
String url = "";
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE)
|
if ("6".equals(rowsBean.getNewsContentType())) {
|
||||||
.withString("id", rowsBean.getNewsContentId())
|
//链接新闻
|
||||||
.withString("url", "")
|
ARouter.getInstance()
|
||||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||||
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
.withString("url", rowsBean.getNewsContentContent())
|
||||||
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
.withString("title", rowsBean.getNewsContentTitle())
|
||||||
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
.navigation();
|
||||||
.withString("title", rowsBean.getNewsContentTitle())
|
} else {
|
||||||
.withInt("type", -1)
|
int newsType = 0;
|
||||||
.navigation();
|
if (type == 1) {
|
||||||
// String url = "";
|
//1自定义列表
|
||||||
// if ("6".equals(rowsBean.getNewsContentType())) {
|
//3列表详情
|
||||||
// //链接新闻
|
if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
||||||
// ARouter.getInstance()
|
//列表
|
||||||
// .build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
url = rowsBean.getTemplateRecordUrl();
|
||||||
// .withString("url", rowsBean.getNewsContentContent())
|
newsType = 0;
|
||||||
// .withString("title", rowsBean.getNewsContentTitle())
|
} else {
|
||||||
// .navigation();
|
//内容
|
||||||
// } else {
|
url = rowsBean.getNewsConfigDescriptionText();
|
||||||
// int newsType = 0;
|
newsType = 1;
|
||||||
// if (type == 1) {
|
}
|
||||||
// //1自定义列表
|
} else {
|
||||||
// //3列表详情
|
newsType = 0;
|
||||||
// if ("1".equals(rowsBean.getNewsConfigWebSwitch())) {
|
url = rowsBean.getTemplateRecordUrl();
|
||||||
// //列表
|
}
|
||||||
// url = rowsBean.getTemplateRecordUrl();
|
ARouter.getInstance()
|
||||||
// newsType = 0;
|
// .build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)//TODO 详情模板
|
||||||
// } else {
|
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE)//TODO 接口方式
|
||||||
// //内容
|
.withString("id", rowsBean.getNewsContentId())
|
||||||
// url = rowsBean.getNewsConfigDescriptionText();
|
.withString("url", url)
|
||||||
// newsType = 1;
|
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||||
// }
|
.withString("isCommentImg", rowsBean.getNewsConfigCommentImage())//评论是否可以上传图片
|
||||||
// } else {
|
.withString("isCollect", rowsBean.getNewsContentCollectStatus())
|
||||||
// newsType = 0;
|
.withString("photo", BaseUrlApi.BASE_NEWS_IMG_URL + rowsBean.getNewsContentCoverList().get(0).getContentCoverId())
|
||||||
// url = rowsBean.getTemplateRecordUrl();
|
.withString("title", rowsBean.getNewsContentTitle())
|
||||||
// }
|
.withInt("type", newsType)
|
||||||
//
|
.navigation();
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getNewsListByTypeToken(int page) {
|
private void getNewsListByTypeToken(int page) {
|
||||||
@ -176,24 +176,24 @@ public class NewsFragment extends BaseFragment {
|
|||||||
if (newsItemBean != null && newsItemBean.getRows().size() > 0) {
|
if (newsItemBean != null && newsItemBean.getRows().size() > 0) {
|
||||||
mTotalPage = newsItemBean.getTotal();
|
mTotalPage = newsItemBean.getTotal();
|
||||||
getCommentCount(1, newsItemBean);
|
getCommentCount(1, newsItemBean);
|
||||||
// mNewsDatas = newsItemBean.getRows();
|
// mNewsDatas.addAll(newsItemBean.getRows());
|
||||||
// mAdapter.setData(mNewsDatas);
|
// mAdapter.setData(mNewsDatas);
|
||||||
// setStateView(STATE_SUCCESS);
|
setStateView(STATE_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
setStateView(STATE_EMPTY);
|
setStateView(STATE_EMPTY);
|
||||||
}
|
}
|
||||||
mSrlView.finishRefresh();
|
|
||||||
} else {
|
} else {
|
||||||
if (newsItemBean != null) {
|
if (newsItemBean != null) {
|
||||||
// mNewsDatas.addAll(newsItemBean.getRows());
|
// mNewsDatas.addAll(newsItemBean.getRows());
|
||||||
// mAdapter.setData(mNewsDatas);
|
// mAdapter.setData(mNewsDatas);
|
||||||
getCommentCount(2, newsItemBean);
|
getCommentCount(2, newsItemBean);
|
||||||
mSrlView.finishLoadMore();
|
|
||||||
} else {
|
} else {
|
||||||
mSrlView.setNoMoreData(true);
|
mSrlView.setNoMoreData(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mSrlView.finishLoadMore();
|
||||||
|
mSrlView.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -222,7 +222,6 @@ public class NewsFragment extends BaseFragment {
|
|||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
private void getNewsSubMenu(String id) {
|
private void getNewsSubMenu(String id) {
|
||||||
|
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(HomeApi.class)
|
.create(HomeApi.class)
|
||||||
.getNewsTabListByPid(id)
|
.getNewsTabListByPid(id)
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.tengshisoft.mudulemain.cultural.holder;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||||
|
import com.tengshisoft.mudulemain.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2020/5/28 - 10:18 AM
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述:
|
||||||
|
*/
|
||||||
|
public class NewsCategoryHolder extends RecyclerView.ViewHolder {
|
||||||
|
public TypeFaceTextView mTvName;
|
||||||
|
|
||||||
|
public NewsCategoryHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
mTvName = itemView.findViewById(R.id.tv_category);
|
||||||
|
}
|
||||||
|
}
|
7
modulemain/src/main/java/com/tengshisoft/mudulemain/cultural/holder/NewsTabHolder.java
Normal file → Executable file
7
modulemain/src/main/java/com/tengshisoft/mudulemain/cultural/holder/NewsTabHolder.java
Normal file → Executable file
@ -8,6 +8,12 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||||
import com.tengshisoft.mudulemain.R;
|
import com.tengshisoft.mudulemain.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2020/5/28 - 10:18 AM
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述:
|
||||||
|
*/
|
||||||
public class NewsTabHolder extends RecyclerView.ViewHolder {
|
public class NewsTabHolder extends RecyclerView.ViewHolder {
|
||||||
public View mVLine;
|
public View mVLine;
|
||||||
public TypeFaceTextView mTvName;
|
public TypeFaceTextView mTvName;
|
||||||
@ -18,4 +24,3 @@ public class NewsTabHolder extends RecyclerView.ViewHolder {
|
|||||||
mTvName = itemView.findViewById(R.id.tv_name);
|
mTvName = itemView.findViewById(R.id.tv_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public interface HomeApi {
|
|||||||
* @param user
|
* @param user
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"Content-Type: application/json", "Accept: application/json"})
|
@Headers({"Content-Type: application/json", "Accept: application/json", "is_need_area:false"})
|
||||||
@POST("app/sign/default")
|
@POST("app/sign/default")
|
||||||
Observable<BaseUserBean> doLogin(@Body RequestBody user);
|
Observable<BaseUserBean> doLogin(@Body RequestBody user);
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ public interface HomeApi {
|
|||||||
/**
|
/**
|
||||||
* 获取非遗列表
|
* 获取非遗列表
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json", "is_need_area:true"})
|
||||||
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
||||||
Observable<LegacyListBean> getLegacyList(@Query("page") String page, @Query("rows") String row);
|
Observable<LegacyListBean> getLegacyList(@Query("page") String page, @Query("rows") String row);
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ public interface HomeApi {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "is_need_area:true"})
|
||||||
@GET("app/newsdirectories/listnewsdirectoriesrelease")
|
@GET("app/newsdirectories/listnewsdirectoriesrelease")
|
||||||
Observable<List<NewsTabBean>> getNewsTabList();
|
Observable<List<NewsTabBean>> getNewsTabList();
|
||||||
|
|
||||||
@ -136,15 +136,18 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontentrelease")
|
@GET("app/newscontent/listpagenewscontentrelease")
|
||||||
Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesId") String id, @Query("newsDirectoriesParentId") String pId, @Query("rows") String rows, @Query("page") String page);
|
// Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesId") String pid, @Query("rows") String rows, @Query("page") String page);
|
||||||
// Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesParentId") String pid, @Query("rows") String rows, @Query("page") String page);
|
Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesId") String pid, @Query("newsDirectoriesParentId") String pId, @Query("rows") String rows, @Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-不需要token
|
* 获取新闻列表-不需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontentrelease")
|
@GET("app/newscontent/listpagenewscontentrelease")
|
||||||
Observable<NewsItemBean> getNewsList(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("newsDirectoriesParentId") String pId, @Query("page") String page);
|
Observable<NewsItemBean> getNewsList(@Query("newsDirectoriesId") String newsDirectoriesId,
|
||||||
|
@Query("newsDirectoriesParentId") String pId,
|
||||||
|
@Query("page") String page);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-不需要token
|
* 获取新闻列表-不需要token
|
||||||
@ -169,23 +172,26 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontentrelease")
|
@GET("app/newscontent/listpagenewscontentrelease")
|
||||||
Observable<NewsItemBean> getMainNewsList(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("newsDirectoriesParentId") String pId, @Query("rows") String rows,
|
Observable<NewsItemBean> getMainNewsList(@Query("newsDirectoriesId") String newsDirectoriesId,
|
||||||
@Query("page") String page);
|
@Query("newsDirectoriesParentId") String pId,
|
||||||
|
@Query("rows") String rows, @Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-需要token
|
* 获取新闻列表-需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontent")
|
@GET("app/newscontent/listpagenewscontent")
|
||||||
Observable<NewsItemBean> getNewsListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("newsDirectoriesParentId") String pId, @Query("page") String page,
|
Observable<NewsItemBean> getNewsListByToken(@Query("newsDirectoriesId") String newsDirectoriesId,
|
||||||
@Header("token") String token);
|
@Query("newsDirectoriesParentId") String pId,
|
||||||
|
@Query("page") String page, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-需要token
|
* 获取新闻列表-需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontent")
|
@GET("app/newscontent/listpagenewscontent")
|
||||||
Observable<NewsItemBean> getNewsMainListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("rows") String rows, @Query("page") String page, @Header("token") String token);
|
Observable<NewsItemBean> getNewsMainListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query(
|
||||||
|
"rows") String rows, @Query("page") String page, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻详情
|
* 获取新闻详情
|
||||||
@ -194,7 +200,6 @@ public interface HomeApi {
|
|||||||
@GET("app/newscontent/getnewscontentbyidrelease/{id}")
|
@GET("app/newscontent/getnewscontentbyidrelease/{id}")
|
||||||
Observable<NewsDetailBean> getNewsDetail(@Path("id") String id);
|
Observable<NewsDetailBean> getNewsDetail(@Path("id") String id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取评论列表
|
* 获取评论列表
|
||||||
*/
|
*/
|
||||||
@ -208,7 +213,8 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/newscomment/listpagenewscomment")
|
@GET("app/newscomment/listpagenewscomment")
|
||||||
Observable<CommentListBean> getCommentListByLogin(@Query("page") String page, @Query("newsContentId") String nId, @Header("token") String token);
|
Observable<CommentListBean> getCommentListByLogin(@Query("page") String page, @Query("newsContentId") String nId,
|
||||||
|
@Header("token") String token);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -216,7 +222,8 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/newscomment/listpagenewscommentrelease")
|
@GET("app/newscomment/listpagenewscommentrelease")
|
||||||
Observable<CommentListBean> getCommentListByPId(@Query("page") String page, @Query("commentParentId") String pId, @Query("newsContentId") String nId);
|
Observable<CommentListBean> getCommentListByPId(@Query("page") String page, @Query("commentParentId") String pId,
|
||||||
|
@Query("newsContentId") String nId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取评论列表
|
* 获取评论列表
|
||||||
@ -224,7 +231,10 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/newscomment/listpagenewscomment")
|
@GET("app/newscomment/listpagenewscomment")
|
||||||
Observable<CommentListBean> getCommentListByLoginByPid(@Query("page") String page, @Query("newsContentId") String nId, @Query("commentParentId") String pId, @Header("token") String token);
|
Observable<CommentListBean> getCommentListByLoginByPid(@Query("page") String page,
|
||||||
|
@Query("newsContentId") String nId, @Query(
|
||||||
|
"commentParentId") String pId,
|
||||||
|
@Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存评论
|
* 保存评论
|
||||||
@ -276,7 +286,8 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/venuesinfo/listpagevenuesinforelease")
|
@GET("app/venuesinfo/listpagevenuesinforelease")
|
||||||
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query("orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query(
|
||||||
|
"orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播回放列表
|
* 直播回放列表
|
||||||
@ -304,5 +315,6 @@ public interface HomeApi {
|
|||||||
*/
|
*/
|
||||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/area/listpagearea")
|
@GET("app/area/listpagearea")
|
||||||
Observable<SearchBean> doSearchByKeyword(@Query("page") int page, @Query("keywords") String key, @Header("token") String token);
|
Observable<SearchBean> doSearchByKeyword(@Query("page") int page, @Query("keywords") String key,
|
||||||
|
@Header("token") String token);
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,17 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_banner_left"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@drawable/ic_img_arrow_left" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_banner_right"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@drawable/ic_img_arrow_right" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<!--====================音频===========================-->
|
<!--====================音频===========================-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
13
modulemain/src/main/res/layout/item_news_category.xml
Normal file
13
modulemain/src/main/res/layout/item_news_category.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_category"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
tools:text="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</LinearLayout>
|
@ -92,7 +92,7 @@ public class CollectActivity extends BaseActivity {
|
|||||||
url = rowsBean.getTemplateRecordUrl();
|
url = rowsBean.getTemplateRecordUrl();
|
||||||
}
|
}
|
||||||
ARouter.getInstance()
|
ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL)
|
.build(PathConfig.PATH_MODULE_MAIN_NEWS_DETAIL_INTERFACE)
|
||||||
.withString("id", rowsBean.getNewsContentId())
|
.withString("id", rowsBean.getNewsContentId())
|
||||||
.withString("url", url)
|
.withString("url", url)
|
||||||
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
.withString("isComment", rowsBean.getNewsConfigComment())//是否可以评论
|
||||||
|
@ -207,7 +207,6 @@
|
|||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:background="@color/gray_line_deep" />
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout style="@style/item_hor_content">
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -375,7 +375,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="8dp"
|
||||||
android:background="@drawable/shp_rectangle_gray_df"
|
android:background="@drawable/shp_rectangle_gray_df"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:hint="未录入"
|
android:hint="未录入"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -17,7 +18,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_change_phone"
|
android:id="@+id/ll_change_phone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -44,8 +44,8 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="20dp"
|
android:layout_marginRight="15dp"
|
||||||
android:background="@color/gray_line_deep" />
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -74,33 +74,40 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="20dp"
|
android:layout_marginRight="15dp"
|
||||||
android:background="@color/gray_line_deep" />
|
android:background="@color/gray_line_deep" />
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_change_pwd"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:gravity="center_vertical"
|
android:visibility="gone"
|
||||||
android:orientation="horizontal"
|
app:cardCornerRadius="5dp"
|
||||||
android:padding="8dp"
|
app:cardElevation="3dp">
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/ll_change_pwd"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_change_pwd" />
|
android:layout_margin="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:src="@drawable/ic_change_pwd" />
|
||||||
android:text="修改密码"
|
|
||||||
android:textSize="15sp" />
|
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||||
</LinearLayout>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:text="修改密码"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -126,7 +133,6 @@
|
|||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/ll_check_update"
|
android:id="@+id/ll_check_update"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -167,7 +173,9 @@
|
|||||||
android:id="@+id/tv_login_out"
|
android:id="@+id/tv_login_out"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
android:background="@drawable/sel_btn_activity_sign_up"
|
android:background="@drawable/sel_btn_activity_sign_up"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
@ -18,6 +18,7 @@ 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.base.BaseBannerImageAdapter;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||||
|
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||||
import com.tengshisoft.moduleplace.R;
|
import com.tengshisoft.moduleplace.R;
|
||||||
import com.tengshisoft.moduleplace.R2;
|
import com.tengshisoft.moduleplace.R2;
|
||||||
@ -93,6 +94,9 @@ public class PlaceDetailActivity extends BaseActivity {
|
|||||||
getPlaceDetailData(mId);
|
getPlaceDetailData(mId);
|
||||||
mTvPlaceDetail.setOnClickListener(v -> showPlaceDetail());
|
mTvPlaceDetail.setOnClickListener(v -> showPlaceDetail());
|
||||||
mMrbLevel.setIsIndicator(true);
|
mMrbLevel.setIsIndicator(true);
|
||||||
|
String read = String.format(getResources().getString(R.string.big_data_str), "", mId, "场馆");
|
||||||
|
LogUtils.e(read);
|
||||||
|
bigDataRead(read);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,6 +6,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||||
import com.tengshisoft.moduleplace.R;
|
import com.tengshisoft.moduleplace.R;
|
||||||
@ -36,6 +37,7 @@ public class PlaceFuncAdapter extends BaseRecyclerAdapter<PlaceFuncBean.DataBean
|
|||||||
placeFuncHolder.mTvName.setText(mData.get(i).getDictionaryName());
|
placeFuncHolder.mTvName.setText(mData.get(i).getDictionaryName());
|
||||||
Glide.with(mContext)
|
Glide.with(mContext)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
.load(BaseUrlApi.BASE_PLACE_IMG_IP + mData.get(i).getDictionaryIcon())
|
.load(BaseUrlApi.BASE_PLACE_IMG_IP + mData.get(i).getDictionaryIcon())
|
||||||
.apply(options)
|
.apply(options)
|
||||||
.into(placeFuncHolder.mIvIcon);
|
.into(placeFuncHolder.mIvIcon);
|
||||||
|
@ -7,6 +7,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||||
import com.tengshisoft.moduleplace.R;
|
import com.tengshisoft.moduleplace.R;
|
||||||
@ -55,6 +56,7 @@ public class PlaceListAdapter extends BaseRecyclerAdapter<PlaceListBean.RowsBean
|
|||||||
String[] split = rowsBean.getVenuePanorama().split(",");
|
String[] split = rowsBean.getVenuePanorama().split(",");
|
||||||
Glide.with(mContext)
|
Glide.with(mContext)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.load(BaseUrlApi.BASE_PLACE_IMG_IP + split[0])
|
.load(BaseUrlApi.BASE_PLACE_IMG_IP + split[0])
|
||||||
.apply(options)
|
.apply(options)
|
||||||
.into(holder.mIvCover);
|
.into(holder.mIvCover);
|
||||||
|
@ -37,14 +37,15 @@ public interface ApiPlace {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/venuesinfo/listpagevenuesinforelease")
|
@GET("app/venuesinfo/listpagevenuesinforelease")
|
||||||
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query("orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query(
|
||||||
|
"orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取场馆列表-根据类型
|
* 获取场馆列表-根据类型
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json","need_area:true"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/venuesinfo/listpagevenuesinforelease")
|
@GET("app/venuesinfo/listpagevenuesinforelease")
|
||||||
Observable<PlaceListBean> getPlaceByDictionId(@Query("latitude") String lat, @Query("longitude") String lng, @Query("venueType") String dId, @Query("page") String page,
|
Observable<PlaceListBean> getPlaceByDictionId(@Query("latitude") String lat, @Query("longitude") String lng, @Query("venueType") String dId, @Query("page") String page,
|
||||||
@Query("rows") String rows);
|
@Query("rows") String rows);
|
||||||
@ -54,7 +55,7 @@ public interface ApiPlace {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "is_need_area:true"})
|
||||||
@GET("app/venuedictionary/listvenuedictionarybyparentidrelease/{dictionaryParentId}")
|
@GET("app/venuedictionary/listvenuedictionarybyparentidrelease/{dictionaryParentId}")
|
||||||
Observable<PlaceFuncBean> getPlaceTypeList(@Path("dictionaryParentId") String pId);
|
Observable<PlaceFuncBean> getPlaceTypeList(@Path("dictionaryParentId") String pId);
|
||||||
|
|
||||||
@ -139,7 +140,8 @@ public interface ApiPlace {
|
|||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@DELETE("app/booking/removemyticketitem/{groundBookingId}/{bookingItemId}")
|
@DELETE("app/booking/removemyticketitem/{groundBookingId}/{bookingItemId}")
|
||||||
Observable<BaseSuccessBean> deleteBookingItem(@Path("groundBookingId") String gId, @Path("bookingItemId") String id, @Header("token") String token);
|
Observable<BaseSuccessBean> deleteBookingItem(@Path("groundBookingId") String gId,
|
||||||
|
@Path("bookingItemId") String id, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消订单
|
* 取消订单
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:padding="5dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:padding="5dp">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_default"
|
android:id="@+id/rb_default"
|
||||||
@ -125,11 +125,17 @@
|
|||||||
tools:text="加载数据失败" />
|
tools:text="加载数据失败" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/rlv_place_content"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
tools:listitem="@layout/item_place_list" />
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_place_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:listitem="@layout/item_place_list" />
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,10 +154,26 @@ public class GoodsDetailActivity extends BaseActivity {
|
|||||||
mTvGoodsStock.setText("库存:" + b.getGoodsItemTotal());
|
mTvGoodsStock.setText("库存:" + b.getGoodsItemTotal());
|
||||||
mStandardAdapter.setSelPos(p);
|
mStandardAdapter.setSelPos(p);
|
||||||
});
|
});
|
||||||
mTvAddCar.setOnClickListener(v -> addToCar(mCurrentBean));
|
mTvAddCar.setOnClickListener(v -> {
|
||||||
mLlCar.setOnClickListener(v -> ARouter.getInstance()
|
if (isLogin()) {
|
||||||
.build(PathConfig.PATH_MODULE_SHOP_ACTIVITY_SHOP_CAR)
|
addToCar(mCurrentBean);
|
||||||
.navigation());
|
} else {
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_MAIN_LOGIN)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mLlCar.setOnClickListener(v -> {
|
||||||
|
if (isLogin()) {
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_SHOP_ACTIVITY_SHOP_CAR)
|
||||||
|
.navigation();
|
||||||
|
} else {
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_MAIN_LOGIN)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parserShopCar() {
|
private void parserShopCar() {
|
||||||
|
@ -174,7 +174,7 @@ public class OrderConfirmActivity extends BaseActivity {
|
|||||||
for (int i = 0; i < mDatas.size(); i++) {
|
for (int i = 0; i < mDatas.size(); i++) {
|
||||||
price += (mDatas.get(i).getCarAmount() * mDatas.get(i).getGoodsPrice());
|
price += (mDatas.get(i).getCarAmount() * mDatas.get(i).getGoodsPrice());
|
||||||
}
|
}
|
||||||
mTvPrice.setText(price + "");
|
mTvPrice.setText("¥ " + price + "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -29,7 +29,7 @@ import butterknife.Unbinder;
|
|||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的订单
|
* 我的商城订单
|
||||||
*/
|
*/
|
||||||
@Route(path = PathConfig.PATH_MODULE_SHOP_ACTIVITY_SHOP_MINE_ORDER)
|
@Route(path = PathConfig.PATH_MODULE_SHOP_ACTIVITY_SHOP_MINE_ORDER)
|
||||||
public class OrderListActivity extends BaseActivity {
|
public class OrderListActivity extends BaseActivity {
|
||||||
|
@ -26,13 +26,13 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface ShopApi {
|
public interface ShopApi {
|
||||||
//获取商品分类
|
//获取商品分类
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/category/listztreerelease")
|
@GET("app/category/listztreerelease")
|
||||||
Observable<List<ShopSortListBean>> getShopCategoryList();
|
Observable<List<ShopSortListBean>> getShopCategoryList();
|
||||||
|
|
||||||
|
|
||||||
//根据分类ID商品检索
|
//根据分类ID商品检索
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/shopgoods/solrrelease")
|
@GET("app/shopgoods/solrrelease")
|
||||||
Observable<GoodsListBean> getGoodsList(@Query("page") String page,
|
Observable<GoodsListBean> getGoodsList(@Query("page") String page,
|
||||||
@Query("rows") String rows,
|
@Query("rows") String rows,
|
||||||
@ -50,7 +50,7 @@ public interface ShopApi {
|
|||||||
* @param uE 商品评分
|
* @param uE 商品评分
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/shopgoods/solrrelease")
|
@GET("app/shopgoods/solrrelease")
|
||||||
Observable<GoodsListBean> getGoodsList(@Query("page") String page,
|
Observable<GoodsListBean> getGoodsList(@Query("page") String page,
|
||||||
@Query("rows") String rows,
|
@Query("rows") String rows,
|
||||||
@ -63,14 +63,14 @@ public interface ShopApi {
|
|||||||
/**
|
/**
|
||||||
* 获取商品详情
|
* 获取商品详情
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/shopgoods/getrelease/{goodsId}")
|
@GET("app/shopgoods/getrelease/{goodsId}")
|
||||||
Observable<ShopGoodsDetailBean> getGoodsDetailById(@Path("goodsId") String goodsId);
|
Observable<ShopGoodsDetailBean> getGoodsDetailById(@Path("goodsId") String goodsId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商品规格
|
* 获取商品规格
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/shopgoodsitem/listrelease/{goodsId}")
|
@GET("app/shopgoodsitem/listrelease/{goodsId}")
|
||||||
Observable<List<GoodsStandardBean>> getStandardListByGoodsId(@Path("goodsId") String goodsId);
|
Observable<List<GoodsStandardBean>> getStandardListByGoodsId(@Path("goodsId") String goodsId);
|
||||||
|
|
||||||
@ -78,21 +78,21 @@ public interface ShopApi {
|
|||||||
/**
|
/**
|
||||||
* 提交订单
|
* 提交订单
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@POST("app/order/savebycart")
|
@POST("app/order/savebycart")
|
||||||
Observable<OrderSuccessBean> doSaveOrder(@Body RequestBody goods, @Header("token") String token);
|
Observable<OrderSuccessBean> doSaveOrder(@Body RequestBody goods, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增收货地址
|
* 新增收货地址
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@POST("app/shopaddress/save")
|
@POST("app/shopaddress/save")
|
||||||
Observable<BaseSuccessBean> doSaveAddress(@Body RequestBody goods, @Header("token") String token);
|
Observable<BaseSuccessBean> doSaveAddress(@Body RequestBody goods, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改收货地址
|
* 修改收货地址
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@PUT("app/shopaddress/update/{shopAddressId}")
|
@PUT("app/shopaddress/update/{shopAddressId}")
|
||||||
Observable<BaseSuccessBean> doEditAddress(@Body RequestBody goods,
|
Observable<BaseSuccessBean> doEditAddress(@Body RequestBody goods,
|
||||||
@Path("shopAddressId") String addressId,
|
@Path("shopAddressId") String addressId,
|
||||||
@ -101,35 +101,35 @@ public interface ShopApi {
|
|||||||
/**
|
/**
|
||||||
* 设置默认收货地址
|
* 设置默认收货地址
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@PUT("app/shopaddress/updatedefault/{shopAddressId}")
|
@PUT("app/shopaddress/updatedefault/{shopAddressId}")
|
||||||
Observable<BaseSuccessBean> doSetDefaultAddress(@Path("shopAddressId") String id, @Header("token") String token);
|
Observable<BaseSuccessBean> doSetDefaultAddress(@Path("shopAddressId") String id, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取默认地址
|
* 获取默认地址
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/shopaddress/getdefault")
|
@GET("app/shopaddress/getdefault")
|
||||||
Observable<ShippingAddressBean> getDefaultAddress(@Header("token") String token);
|
Observable<ShippingAddressBean> getDefaultAddress(@Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除收货地址
|
* 删除收货地址
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@DELETE("app/shopaddress/remove/{ids}")
|
@DELETE("app/shopaddress/remove/{ids}")
|
||||||
Observable<BaseSuccessBean> doDelShippingAddress(@Path("ids") String id, @Header("token") String token);
|
Observable<BaseSuccessBean> doDelShippingAddress(@Path("ids") String id, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收货地址列表
|
* 收货地址列表
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/shopaddress/list")
|
@GET("app/shopaddress/list")
|
||||||
Observable<List<ShippingAddressBean>> getShippingAddressList(@Header("token") String token);
|
Observable<List<ShippingAddressBean>> getShippingAddressList(@Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的订单
|
* 我的订单
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/order/listpage")
|
@GET("app/order/listpage")
|
||||||
Observable<OrderListBean> getMineShopOrderList(@Query("orderStatus") String status,
|
Observable<OrderListBean> getMineShopOrderList(@Query("orderStatus") String status,
|
||||||
@Query("page") String page,
|
@Query("page") String page,
|
||||||
@ -140,14 +140,14 @@ public interface ShopApi {
|
|||||||
/**
|
/**
|
||||||
* 删除订单
|
* 删除订单
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@DELETE("app/order/delete/{orderId}")
|
@DELETE("app/order/delete/{orderId}")
|
||||||
Observable<BaseSuccessBean> doDelOrder(@Path("orderId") String id, @Header("token") String token);
|
Observable<BaseSuccessBean> doDelOrder(@Path("orderId") String id, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消订单
|
* 取消订单
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@PUT("app/order/updatebuyersclose/{orderId}")
|
@PUT("app/order/updatebuyersclose/{orderId}")
|
||||||
Observable<BaseSuccessBean> doCancelOrder(@Path("orderId") String id,
|
Observable<BaseSuccessBean> doCancelOrder(@Path("orderId") String id,
|
||||||
@Body RequestBody body,
|
@Body RequestBody body,
|
||||||
@ -156,7 +156,7 @@ public interface ShopApi {
|
|||||||
/**
|
/**
|
||||||
* 获取取消原因
|
* 获取取消原因
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:shop", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:shop", "is_need_area:false", "Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/data/listbyparentid/{id}")
|
@GET("app/data/listbyparentid/{id}")
|
||||||
Observable<List<BaseDictionaryBean>> getCancelData(@Path("id") String id,
|
Observable<List<BaseDictionaryBean>> getCancelData(@Path("id") String id,
|
||||||
@Header("token") String token);
|
@Header("token") String token);
|
||||||
|
Loading…
Reference in New Issue
Block a user