Merge branch 'qa_1.1.2' into dev
This commit is contained in:
@@ -42,14 +42,6 @@
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".receiver.NetWorkReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
|
||||
<action android:name="android.net.wifi.STATE_CHANGE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.mogo.module.tanlu.receiver
|
||||
|
||||
import android.Manifest
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.module.tanlu.util.NetworkUtil
|
||||
|
||||
/**
|
||||
* @description 网络改变监听
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2019-10-17
|
||||
*/
|
||||
class NetWorkReceiver : BroadcastReceiver() {
|
||||
private var isConnect = true
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent?) {
|
||||
if (ContextCompat.checkSelfPermission(
|
||||
context,
|
||||
Manifest.permission.ACCESS_NETWORK_STATE
|
||||
) === PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
|
||||
isConnect = NetworkUtil.isConnected(context)
|
||||
} else {
|
||||
isConnect = NetworkUtil.isConnectedV21(context)
|
||||
}
|
||||
}
|
||||
|
||||
// if (!isConnect) {
|
||||
// Toast.makeText(context, "网络已断开,请检查网络", Toast.LENGTH_SHORT).show()
|
||||
// //TODO
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,7 +48,6 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (viewType == V2XShareEventItemEnum.ITEM_TYPE_NUM_DES) {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_v2x_event_share_description, parent,
|
||||
false);
|
||||
v.getBackground().setAlpha((int) 0.7);
|
||||
shareDescriptionViewHolder holder = new shareDescriptionViewHolder(v);
|
||||
return holder;
|
||||
} else if (viewType == V2XShareEventItemEnum.ITEM_TYPE_SHARE_LIST) {
|
||||
|
||||
@@ -108,7 +108,12 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
if (dataArrayList.size() > 0) {
|
||||
dataArrayList.clear();
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
loadingView.stopWithError(msg, View.VISIBLE);
|
||||
|
||||
loadingView.refresButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
@@ -181,8 +181,8 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
String originStr = String.format(getContext().getResources().getString(R.string.v2x_surrounding_top_brief), exploreWayList.size());
|
||||
SpannableString spannableString = new SpannableString(originStr);
|
||||
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#459DFF")), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
//设置字体大小,true表示前面的字体大小20单位为dip
|
||||
spannableString.setSpan(new AbsoluteSizeSpan(38, true), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
//设置字体大小,true表示前面的字体大小 dip
|
||||
spannableString.setSpan(new AbsoluteSizeSpan(46, true), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
spannableString.setSpan(new StyleSpan(Typeface.NORMAL), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
mTotalTv.setText(spannableString);
|
||||
} else {
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:layout_marginEnd="@dimen/dp_31"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvFaultHelpEventTime"
|
||||
app:layout_constraintEnd_toEndOf="@+id/rlRoadEventList"
|
||||
app:layout_constraintStart_toStartOf="@+id/tagEventType"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tagEventType"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="top"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/white"
|
||||
@@ -48,12 +48,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_root_margin_left"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_root_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_v2x_surrounding_margin_left">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_recycleview"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20px"
|
||||
android:layout_marginRight="20px"
|
||||
android:layout_marginBottom="16px"
|
||||
android:layout_marginBottom="14px"
|
||||
android:background="@drawable/bg_v2x_event_description"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
@@ -7,9 +7,8 @@
|
||||
<style name="customRatingBarStyle" parent="@style/Widget.AppCompat.RatingBar">
|
||||
<item name="android:minHeight">16px</item>
|
||||
<item name="android:maxHeight">16px</item>
|
||||
<item name="android:maxWidth">19px</item>
|
||||
<item name="android:minWidth">19px</item>
|
||||
<item name="android:spacing">4px</item>
|
||||
<item name="android:maxWidth">20px</item>
|
||||
<item name="android:minWidth">20px</item>
|
||||
<item name="android:numStars">5</item>
|
||||
<item name="android:rating">1</item>
|
||||
<item name="android:stepSize">0.5</item>
|
||||
|
||||
Reference in New Issue
Block a user