搜索页面UI
@@ -13,31 +13,183 @@
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_navi_search"
|
||||
android:layout_width="@dimen/dp_600"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/hint_map_search"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white_60"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:src="@mipmap/icon_back"
|
||||
android:layout_height="@dimen/dp_40"/>
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white_60"
|
||||
android:hint="@string/hint_map_search"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_navi_home"
|
||||
android:layout_width="@dimen/dp_284"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toRightOf="@id/ll_navi_search"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/txt_normal"
|
||||
android:gravity="center_vertical"
|
||||
android:drawableLeft="@mipmap/icon_navi_home"
|
||||
android:text="@string/navi_home"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="#17D8D8D8"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/txt_normal"
|
||||
android:text="@string/navi_company"
|
||||
android:gravity="center_vertical"
|
||||
android:drawableLeft="@mipmap/icon_navi_company"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_navi_history"
|
||||
android:layout_width="@dimen/dp_600"
|
||||
android:layout_height="@dimen/dp_389"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
android:padding="@dimen/dp_20"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_navi_search"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_navi_history"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/history_search"
|
||||
android:textColor="@color/white_60"
|
||||
android:textSize="@dimen/sp_16"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_navi_history_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/history_search"
|
||||
android:textColor="@color/txt_blue"
|
||||
android:textSize="@dimen/sp_16"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_restrant"
|
||||
app:layout_constraintTop_toTopOf="@id/rl_navi_history"
|
||||
app:layout_constraintLeft_toRightOf="@id/rl_navi_history"
|
||||
android:text="@string/navi_restrant"
|
||||
android:id="@+id/tv_navi_restaurant"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_gas"
|
||||
android:id="@+id/tv_navi_gas"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_navi_restaurant"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_navi_restaurant"
|
||||
android:text="@string/navi_restrant"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_tolit"
|
||||
android:id="@+id/tv_navi_toilet"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_restaurant"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_restaurant"
|
||||
android:text="@string/navi_restrant"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_wash"
|
||||
android:id="@+id/tv_navi_wash"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_toilet"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_restaurant"
|
||||
android:text="@string/navi_restrant"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_park"
|
||||
android:id="@+id/tv_navi_park"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_gas"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_gas"
|
||||
android:text="@string/navi_restrant"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_setting"
|
||||
android:id="@+id/tv_navi_setting"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_park"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_gas"
|
||||
android:text="@string/navi_restrant"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,58 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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_height="130dp">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="130dp"
|
||||
android:layout_marginRight="60dp"
|
||||
<ImageView
|
||||
android:id="@+id/iv_position"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
android:background="#802D3256"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_position"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginLeft="130dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/tv_position"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_25"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_position"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_position"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginRight="60dp"
|
||||
android:textColor="@color/white"
|
||||
<TextView
|
||||
android:id="@+id/tv_position_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white_60"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_position"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_position"
|
||||
/>
|
||||
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_position"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_position_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="60dp"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white_7f"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_position"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_position" />
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_55"
|
||||
android:background="@color/white_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_company.png
Executable file
|
After Width: | Height: | Size: 703 B |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_gas.png
Executable file
|
After Width: | Height: | Size: 1007 B |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_home.png
Executable file
|
After Width: | Height: | Size: 712 B |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_location.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_park.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_restrant.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_setting.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_tolit.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_wash.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
@@ -5,6 +5,7 @@
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
<color name="bg_gray_common_page">#ff080625</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="white_10">#1AFFFFFF</color>
|
||||
<color name="white_60">#99FFFFFF</color>
|
||||
<color name="white_7f">#7FFFFFFF</color>
|
||||
<color name="arrow_color">#00BFFF</color>
|
||||
@@ -12,5 +13,6 @@
|
||||
<color name="txt_gray_day">#4D080625</color>
|
||||
|
||||
<color name="bg_common">#080625</color>
|
||||
<color name="txt_blue">#3E7FFC</color>
|
||||
|
||||
</resources>
|
||||
|
||||
4
modules/mogo-module-navi/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="txt_normal">@dimen/sp_16</dimen>
|
||||
</resources>
|
||||
@@ -1,4 +1,8 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-navi</string>
|
||||
<string name="hint_map_search">查看地点、公交、地铁</string>
|
||||
<string name="history_search">搜索历史</string>
|
||||
<string name="navi_home">回家</string>
|
||||
<string name="navi_company">去公司</string>
|
||||
<string name="navi_restrant">餐馆</string>
|
||||
</resources>
|
||||
|
||||
@@ -16,4 +16,13 @@
|
||||
<item name="android:paddingLeft">48dp</item>
|
||||
</style>
|
||||
|
||||
<style name="txt_navi_style">
|
||||
<item name="android:layout_width">@dimen/dp_134</item>
|
||||
<item name="android:gravity">center_horizontal</item>
|
||||
<item name="android:textSize">@dimen/txt_normal</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:background">@drawable/shape_round_gray</item>
|
||||
<item name="android:layout_height">@dimen/dp_118</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mogo.module.navi;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||