Skip to content

Commit a80040a

Browse files
New Leku design (#298)
* current layout is now the legacy one * legacy button * Added legacy layouts and new string resource * adjusted layout * added legacy map button and close asset * adjusted paddings, margins, text sizes and colors * adjustes elevations and button background * corrected import wildcard issues * updated icons * moved the google logo to top right position * supressed lint issue * added background to the toolbar icon * added click action for clear location button, also added ripple effect * set back icon as close icon * added recyclerview to new design * show search results on recyclerview * added onclick listener to recycler view * added maps and poi assets and adjusted progress bar position * adjusted clean text button position * show/hide search background * added the back icon and the transition from search to none * added top and bottom gradient * added navigation bottom background * lint issues solved * Update leku/src/main/res/drawable/leku_select_location_button_background.xml Co-authored-by: jlquintana <joseluisquintanacabrera@gmail.com> * PR comments * lint issues * lint issues * lint issues * lint issues Co-authored-by: jlquintana <joseluisquintanacabrera@gmail.com>
1 parent edd7983 commit a80040a

51 files changed

Lines changed: 862 additions & 183 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/src/main/java/com/schibsted/mappicker/MainActivity.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ class MainActivity : AppCompatActivity() {
8585
startActivityForResult(locationPickerIntent, MAP_BUTTON_REQUEST_CODE)
8686
}
8787

88+
val mapLegacyButton = findViewById<View>(R.id.map_button_legacy)
89+
mapLegacyButton.setOnClickListener {
90+
val locationPickerIntent = LocationPickerActivity.Builder()
91+
.withLocation(41.4036299, 2.1743558)
92+
.withUnnamedRoadHidden()
93+
.withLegacyLayout()
94+
.build(applicationContext)
95+
startActivityForResult(locationPickerIntent, MAP_BUTTON_REQUEST_CODE)
96+
}
97+
8898
val mapPoisButton = findViewById<View>(R.id.map_button_with_pois)
8999
mapPoisButton.setOnClickListener {
90100
val locationPickerIntent = LocationPickerActivity.Builder()

app/src/main/res/layout/activity_main.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
tools:targetApi="lollipop"
3535
/>
3636

37+
<Button
38+
android:text="@string/launch_legacy_map_picker"
39+
android:id="@+id/map_button_legacy"
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:padding="18dp"
43+
android:layout_marginTop="16dp"
44+
android:layout_marginStart="24dp"
45+
android:layout_marginEnd="24dp"
46+
android:background="@drawable/leku_app_button_border"
47+
android:textColor="@color/leku_app_strong_blue"
48+
tools:targetApi="lollipop"
49+
/>
50+
3751
<Button
3852
android:text="@string/launch_map_picker_with_style"
3953
android:id="@+id/map_button_with_style"

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<resources>
22
<string name="leku_app_name" translatable="false">Leku Demo</string>
3-
<string name="google_maps_key"></string>
3+
<string name="google_maps_key" />
44
<string name="launch_map_picker" translatable="false">LAUNCH MAP LOCATION PICKER ACTIVITY</string>
5+
<string name="launch_legacy_map_picker" translatable="false">LAUNCH LEGACY MAP LOCATION ACTIVITY</string>
56
<string name="launch_map_picker_with_pois" translatable="false">LAUNCH MAP WITH POIS</string>
67
<string name="launch_map_picker_with_style" translatable="false">LAUNCH MAP WITH STYLE</string>
78
<string name="leku_lib_version" translatable="false">version 6.4.0</string>

app/src/main/res/values/styles.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</style>
99

1010
<style name="AppTheme.Map">
11-
<item name="colorPrimary">#E91E63</item>
12-
<item name="colorPrimaryDark">#C51162</item>
13-
<item name="colorAccent">#FBC02D</item>
14-
<item name="colorControlActivated">#E91E63</item>
11+
<item name="colorPrimary">#30962f</item>
12+
<item name="colorPrimaryDark">#30962f</item>
13+
<item name="colorAccent">#669966</item>
14+
<item name="colorControlActivated">#268134</item>
1515
</style>
1616

1717
</resources>

0 commit comments

Comments
 (0)