opt
@@ -8,6 +8,7 @@ import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
@@ -82,7 +83,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
private View mHome;
|
||||
private View mCompany;
|
||||
|
||||
private TextView mUploadRoadCondition;
|
||||
private View mUploadRoadCondition;
|
||||
private TextView mUpload;
|
||||
private ImageView mUploading;
|
||||
|
||||
private View mVRMode;
|
||||
private View mMove2CurrentLocation;
|
||||
@@ -119,21 +122,52 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
|
||||
@DrawableRes
|
||||
private int[] mUploadingFrameRes = {
|
||||
R.drawable.amap_route_color_texture_0_arrow,
|
||||
R.drawable.amap_route_color_texture_1_arrow,
|
||||
R.drawable.amap_route_color_texture_2_arrow,
|
||||
R.drawable.amap_route_color_texture_3_arrow,
|
||||
R.drawable.amap_route_color_texture_4_arrow,
|
||||
R.drawable.amap_route_color_texture_5_arrow,
|
||||
R.drawable.amap_route_color_texture_6_arrow,
|
||||
R.drawable.amap_route_color_texture_7_arrow,
|
||||
R.drawable.amap_route_color_texture_8_arrow,
|
||||
R.drawable.amap_route_color_texture_9_arrow,
|
||||
R.drawable.module_ext_ic_uploading_00000,
|
||||
R.drawable.module_ext_ic_uploading_00001,
|
||||
R.drawable.module_ext_ic_uploading_00002,
|
||||
R.drawable.module_ext_ic_uploading_00003,
|
||||
R.drawable.module_ext_ic_uploading_00004,
|
||||
R.drawable.module_ext_ic_uploading_00005,
|
||||
R.drawable.module_ext_ic_uploading_00006,
|
||||
R.drawable.module_ext_ic_uploading_00007,
|
||||
R.drawable.module_ext_ic_uploading_00008,
|
||||
R.drawable.module_ext_ic_uploading_00009,
|
||||
R.drawable.module_ext_ic_uploading_00010,
|
||||
R.drawable.module_ext_ic_uploading_00011,
|
||||
R.drawable.module_ext_ic_uploading_00012,
|
||||
R.drawable.module_ext_ic_uploading_00013,
|
||||
R.drawable.module_ext_ic_uploading_00014,
|
||||
R.drawable.module_ext_ic_uploading_00015,
|
||||
R.drawable.module_ext_ic_uploading_00016,
|
||||
R.drawable.module_ext_ic_uploading_00017,
|
||||
R.drawable.module_ext_ic_uploading_00018,
|
||||
R.drawable.module_ext_ic_uploading_00019,
|
||||
R.drawable.module_ext_ic_uploading_00020,
|
||||
R.drawable.module_ext_ic_uploading_00021,
|
||||
R.drawable.module_ext_ic_uploading_00022,
|
||||
R.drawable.module_ext_ic_uploading_00023,
|
||||
R.drawable.module_ext_ic_uploading_00024,
|
||||
R.drawable.module_ext_ic_uploading_00025,
|
||||
R.drawable.module_ext_ic_uploading_00026,
|
||||
R.drawable.module_ext_ic_uploading_00027,
|
||||
R.drawable.module_ext_ic_uploading_00028,
|
||||
R.drawable.module_ext_ic_uploading_00029,
|
||||
R.drawable.module_ext_ic_uploading_00030,
|
||||
R.drawable.module_ext_ic_uploading_00031,
|
||||
R.drawable.module_ext_ic_uploading_00032,
|
||||
R.drawable.module_ext_ic_uploading_00033,
|
||||
R.drawable.module_ext_ic_uploading_00034,
|
||||
R.drawable.module_ext_ic_uploading_00035,
|
||||
R.drawable.module_ext_ic_uploading_00036,
|
||||
R.drawable.module_ext_ic_uploading_00037,
|
||||
R.drawable.module_ext_ic_uploading_00038,
|
||||
R.drawable.module_ext_ic_uploading_00039,
|
||||
R.drawable.module_ext_ic_uploading_00040
|
||||
};
|
||||
private int mCurrentUploadFrame = 0;
|
||||
private Handler mUploadFrameAnimHandler;
|
||||
public static final int MSG_FRAME_ANIM = 307;
|
||||
public static final long TIME_FRAME_INTERVAL_TIME = 200;
|
||||
public static final long TIME_FRAME_INTERVAL_TIME = 80;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -174,6 +208,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
} );
|
||||
|
||||
mUploadRoadCondition = findViewById( R.id.module_entrance_id_upload_road_condition );
|
||||
mUpload = findViewById( R.id.module_entrance_id_upload );
|
||||
mUploading = findViewById( R.id.module_entrance_id_uploading );
|
||||
mUploadRoadCondition.setOnClickListener( view -> {
|
||||
isClickShare = true;
|
||||
if ( mIMogoAuthorizeModuleManager.needAuthorize( AUTHORIZE_TYPE_LAUNCHER_SHARE ) ) {
|
||||
@@ -472,11 +508,14 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
if ( descriptor == StatusDescriptor.UPLOADING ) {
|
||||
if ( isTrue ) {
|
||||
mUploading.setVisibility( View.VISIBLE );
|
||||
mUpload.setVisibility( View.GONE );
|
||||
doFrameAnimOnUploadButton();
|
||||
} else {
|
||||
mCurrentUploadFrame = 0;
|
||||
mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM );
|
||||
mUploadRoadCondition.setText( R.string.module_map_str_upload_road_condition );
|
||||
mUploadRoadCondition.setBackgroundResource( R.drawable.module_ext_dw_upload_road_condition_bkg );
|
||||
mUploading.setVisibility( View.GONE );
|
||||
mUpload.setVisibility( View.VISIBLE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -489,17 +528,24 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
super.handleMessage( msg );
|
||||
if ( msg.what == MSG_FRAME_ANIM ) {
|
||||
if ( mUploadingFrameRes == null || mUploadingFrameRes.length == 0 ) {
|
||||
if ( mUploading != null ) {
|
||||
mUploading.setVisibility( View.GONE );
|
||||
}
|
||||
if ( mUpload != null ) {
|
||||
mUpload.setVisibility( View.VISIBLE );
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ( !mMogoStatusManager.isUploading() ) {
|
||||
mCurrentUploadFrame = 0;
|
||||
if ( mUploadRoadCondition != null ) {
|
||||
mUploadRoadCondition.setText( R.string.module_map_str_upload_road_condition );
|
||||
mUploadRoadCondition.setBackgroundResource( R.drawable.module_ext_dw_upload_road_condition_bkg );
|
||||
}
|
||||
return;
|
||||
}
|
||||
mUploadRoadCondition.setBackgroundResource( mUploadingFrameRes[mCurrentUploadFrame++ % mUploadingFrameRes.length] );
|
||||
if ( mUploading != null ) {
|
||||
if ( mCurrentUploadFrame == mUploadingFrameRes.length ) {
|
||||
mCurrentUploadFrame = 12;
|
||||
}
|
||||
mUploading.setImageResource( mUploadingFrameRes[mCurrentUploadFrame++%mUploadingFrameRes.length] );
|
||||
}
|
||||
mUploadFrameAnimHandler.sendEmptyMessageDelayed( MSG_FRAME_ANIM, TIME_FRAME_INTERVAL_TIME );
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 162 B |
|
After Width: | Height: | Size: 338 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 587 B |
|
After Width: | Height: | Size: 685 B |
|
After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 888 B |
|
After Width: | Height: | Size: 975 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 1013 B |
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 986 B |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 986 B |
|
After Width: | Height: | Size: 975 B |
|
After Width: | Height: | Size: 989 B |
|
After Width: | Height: | Size: 1009 B |
|
After Width: | Height: | Size: 1020 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 485 B |
|
After Width: | Height: | Size: 794 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -179,20 +179,36 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_entrance_id_upload_road_condition"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_share_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_share_height"
|
||||
android:layout_marginBottom="@dimen/module_ext_operation_panel_share_marginBottom"
|
||||
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_map_str_upload_road_condition"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_operation_panel_share_textSize"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_entrance_id_operation_panel"
|
||||
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_operation_panel"
|
||||
app:layout_goneMarginBottom="@dimen/module_ext_operation_panel_share_goneMarginBottom"
|
||||
app:layout_goneMarginRight="@dimen/module_ext_operation_panel_share_goneMarginRight" />
|
||||
app:layout_goneMarginRight="@dimen/module_ext_operation_panel_share_goneMarginRight"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_share_width"
|
||||
android:layout_marginBottom="@dimen/module_ext_operation_panel_share_marginBottom"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_share_height">
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_upload"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_map_str_upload_road_condition"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_operation_panel_share_textSize" />
|
||||
<ImageView
|
||||
android:id="@+id/module_entrance_id_uploading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_map_str_upload_road_condition"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_operation_panel_share_textSize" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_entrance_id_buttons_container"
|
||||
|
||||