This commit is contained in:
wangcongtao
2020-04-17 10:22:58 +08:00
parent 9f1e50a3bc
commit c0bb5e44b2
23 changed files with 509 additions and 128 deletions

View File

@@ -39,6 +39,7 @@ import com.mogo.module.share.ShareControl;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.analytics.IMogoAnalytics;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.map.IMogoMapService;
@@ -221,6 +222,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
}
}
} );
MogoEntranceButtons.save( ButtonIndex.BUTTON1, findViewById( R.id.module_entrance_id_button1 ) );
MogoEntranceButtons.save( ButtonIndex.BUTTON2, findViewById( R.id.module_entrance_id_button2 ) );
}

View File

@@ -0,0 +1,29 @@
package com.mogo.module.extensions.entrance;
import android.content.Context;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.entrance.IMogoEntranceButtonController;
/**
* @author congtaowang
* @since 2020-04-16
* <p>
* 描述
*/
@Route( path = MogoServicePaths.PATH_ENTRANCE_BUTTON_API )
public class MogoEntranceButtonControllerImpl implements IMogoEntranceButtonController {
@Override
public TextView getButton( ButtonIndex index ) {
return MogoEntranceButtons.getButton( index );
}
@Override
public void init( Context context ) {
}
}

View File

@@ -0,0 +1,31 @@
package com.mogo.module.extensions.entrance;
import android.widget.TextView;
import com.mogo.service.entrance.ButtonIndex;
import java.util.HashMap;
import java.util.Map;
/**
* @author congtaowang
* @since 2020-04-16
* <p>
* 描述
*/
public class MogoEntranceButtons {
private static Map< ButtonIndex, TextView > sButtons = new HashMap<>();
public static void save( ButtonIndex index, TextView btn ) {
sButtons.put( index, btn );
}
public static TextView getButton( ButtonIndex index ) {
return sButtons.get( index );
}
public static void clear() {
sButtons.clear();
}
}

View File

@@ -80,8 +80,8 @@
android:layout_marginRight="@dimen/module_ext_speed_limit_marginRight"
android:background="@drawable/module_ext_dw_speed_limit_bkg"
android:gravity="center"
android:visibility="invisible"
android:orientation="vertical"
android:visibility="invisible"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -116,18 +116,18 @@
<TextView
android:id="@+id/module_ext_id_north"
android:layout_width="@dimen/dp_120"
android:text="@string/mode_north_up"
android:paddingTop="@dimen/dp_14"
android:visibility="gone"
android:textColor="@color/white"
android:textSize="@dimen/dp_28"
android:gravity="center_horizontal"
android:layout_height="@dimen/dp_120"
android:layout_marginTop="@dimen/dp_33"
android:background="@drawable/shape_react_gray_round"
android:drawableTop="@drawable/selector_icon_north_up"
app:layout_constraintTop_toBottomOf="@+id/module_entrance_id_navi_info_panel"
android:gravity="center_horizontal"
android:paddingTop="@dimen/dp_14"
android:text="@string/mode_north_up"
android:textColor="@color/white"
android:textSize="@dimen/dp_28"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="@+id/module_entrance_id_navi_info_panel"
android:layout_height="@dimen/dp_120"/>
app:layout_constraintTop_toBottomOf="@+id/module_entrance_id_navi_info_panel" />
<LinearLayout
android:id="@+id/module_entrance_id_operation_panel"
@@ -194,18 +194,52 @@
app:layout_goneMarginBottom="@dimen/module_ext_operation_panel_share_goneMarginBottom"
app:layout_goneMarginRight="@dimen/module_ext_operation_panel_share_goneMarginRight" />
<TextView
android:id="@+id/module_entrance_id_exit_navi"
android:layout_width="@dimen/module_ext_navi_exit_width"
android:layout_height="@dimen/module_ext_navi_exit_height"
android:layout_marginLeft="@dimen/module_ext_navi_exit_marginLeft"
android:layout_marginBottom="@dimen/module_ext_navi_exit_marginBottom"
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center"
android:text="退出导航"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:visibility="gone"
<LinearLayout
android:id="@+id/module_entrance_id_buttons_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/module_ext_button_container_marginLeft"
android:layout_marginBottom="@dimen/module_ext_button_container_marginBottom"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
app:layout_constraintLeft_toLeftOf="parent">
<TextView
android:id="@+id/module_entrance_id_button1"
android:layout_width="@dimen/module_ext_navi_exit_width"
android:layout_height="@dimen/module_ext_navi_exit_height"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:visibility="gone"
tools:background="@drawable/module_ext_dw_common_corner_bkg"
tools:text="前方\n实况"
tools:visibility="visible" />
<TextView
android:id="@+id/module_entrance_id_button2"
android:layout_width="@dimen/module_ext_navi_exit_width"
android:layout_height="@dimen/module_ext_navi_exit_height"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:visibility="gone"
tools:background="@drawable/module_ext_dw_common_corner_bkg"
tools:text="取消\n求助"
tools:visibility="visible" />
<TextView
android:id="@+id/module_entrance_id_exit_navi"
android:layout_width="@dimen/module_ext_navi_exit_width"
android:layout_height="@dimen/module_ext_navi_exit_height"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center"
android:text="退出\n导航"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -46,11 +46,14 @@
<dimen name="module_ext_operation_panel_share_goneMarginRight">20px</dimen>
<dimen name="module_ext_navi_exit_width">130px</dimen>
<dimen name="module_ext_navi_exit_height">58px</dimen>
<dimen name="module_ext_navi_exit_width">64px</dimen>
<dimen name="module_ext_navi_exit_height">64px</dimen>
<dimen name="module_ext_navi_exit_marginLeft">20px</dimen>
<dimen name="module_ext_navi_exit_marginBottom">32px</dimen>
<dimen name="module_ext_button_container_marginLeft">20px</dimen>
<dimen name="module_ext_button_container_marginBottom">30px</dimen>
<dimen name="module_ext_navi_exit_textSize">22px</dimen>
<dimen name="module_entrance_id_button_marginTop">8px</dimen>
<!-- module_ext_layout_extensions.xml-->
<dimen name="module_ext_height">64px</dimen>

View File

@@ -44,11 +44,14 @@
<dimen name="module_ext_operation_panel_share_goneMarginBottom">32px</dimen>
<dimen name="module_ext_operation_panel_share_goneMarginRight">32px</dimen>
<dimen name="module_ext_navi_exit_width">200px</dimen>
<dimen name="module_ext_navi_exit_height">90px</dimen>
<dimen name="module_ext_navi_exit_width">120px</dimen>
<dimen name="module_ext_navi_exit_height">120px</dimen>
<dimen name="module_ext_navi_exit_marginLeft">32px</dimen>
<dimen name="module_ext_navi_exit_marginBottom">60px</dimen>
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
<!-- module_ext_layout_extensions.xml-->
<dimen name="module_ext_height">120px</dimen>

View File

@@ -44,11 +44,14 @@
<dimen name="module_ext_operation_panel_share_goneMarginBottom">32px</dimen>
<dimen name="module_ext_operation_panel_share_goneMarginRight">32px</dimen>
<dimen name="module_ext_navi_exit_width">200px</dimen>
<dimen name="module_ext_navi_exit_height">90px</dimen>
<dimen name="module_ext_navi_exit_width">120px</dimen>
<dimen name="module_ext_navi_exit_height">120px</dimen>
<dimen name="module_ext_navi_exit_marginLeft">32px</dimen>
<dimen name="module_ext_navi_exit_marginBottom">60px</dimen>
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
<!-- module_ext_layout_extensions.xml-->
<dimen name="module_ext_height">120px</dimen>