opt ui
This commit is contained in:
@@ -42,6 +42,7 @@ import com.mogo.module.v2x.utils.animation.AnimationResources;
|
||||
import com.mogo.module.v2x.utils.animation.V2XAnimationManager;
|
||||
import com.mogo.module.v2x.view.SurroundingEventView;
|
||||
import com.mogo.module.v2x.view.SurroundingMarginDecoration;
|
||||
import com.mogo.module.v2x.view.V2XNetworkLoadingView;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
@@ -73,8 +74,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
private SurroundingEventPresenter surroundingEventPresenter;
|
||||
private List<SurroundingConstruction> poiInfosList = new ArrayList<>();
|
||||
private IMogoServiceApis mApis;
|
||||
private V2XAnimationManager mV2XAnimationManager;
|
||||
private ImageView mloadingImage;
|
||||
private V2XNetworkLoadingView mloadingImage;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -93,7 +93,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
@Override
|
||||
protected void initViews() {
|
||||
Log.d(TAG, "initViews --------> ");
|
||||
mV2XAnimationManager = new V2XAnimationManager();
|
||||
mRecyclerView = findViewById(R.id.surrounding_recycleview);
|
||||
mTotalTv = findViewById(R.id.tv_brief);
|
||||
mTopLayout = findViewById(R.id.layout_top);
|
||||
@@ -154,8 +153,9 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
* 获取和刷新数据
|
||||
*/
|
||||
private void initData() {
|
||||
mV2XAnimationManager.animationWithTarget(mloadingImage, AnimationResources.loadingRes, 100);
|
||||
mV2XAnimationManager.start();
|
||||
mTopLayout.setVisibility(View.GONE);
|
||||
mRecyclerView.setVisibility(View.GONE);
|
||||
mloadingImage.start();
|
||||
surroundingEventPresenter.getSurroundingEventData();
|
||||
}
|
||||
|
||||
@@ -164,8 +164,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
*/
|
||||
@Override
|
||||
public void showSurroudingData(List<MarkerExploreWay> exploreWayList) {
|
||||
mV2XAnimationManager.stop();
|
||||
mloadingImage.setVisibility(View.GONE);
|
||||
mloadingImage.stop();
|
||||
if (exploreWayList != null && exploreWayList.size() > 0) {
|
||||
//展示数据
|
||||
mTopLayout.setVisibility(View.VISIBLE);
|
||||
|
||||
@@ -6,119 +6,32 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_v2x_event_surrounding_item">
|
||||
|
||||
<!--顶部layout-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--列表相关-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/list_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
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_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
|
||||
<!--空数据显示-->
|
||||
android:layout_height="match_parent">
|
||||
<!--顶部layout-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_empty_data_show"
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
|
||||
android:src="@drawable/mogo_image_blank_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_main_empty_1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="1px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_empty_bt_maigin_left"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_go_to_share"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_empty_bt_maigin_left"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
@@ -126,14 +39,104 @@
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--列表相关-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/list_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
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_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
|
||||
<!--空数据显示-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_empty_data_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
|
||||
android:src="@drawable/mogo_image_blank_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_main_empty_1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="1px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_empty_bt_maigin_left"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_go_to_share"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_empty_bt_maigin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
<com.mogo.module.v2x.view.V2XNetworkLoadingView
|
||||
android:id="@+id/loading_iv"
|
||||
android:layout_width="200px"
|
||||
android:layout_height="200px"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user