summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTyson Miller <tmiller@cyngn.com>2016-08-15 13:20:49 -0700
committerStephen Bird <sbird@cyngn.com>2016-09-13 15:08:18 -0700
commitc0de5d0cf1c44664fcfd9adf0568ac137c215512 (patch)
treea13e82c0ca482e402fcd7df58232e08e7b211232 /src
parent435f3e70248f235ec918d08efa20178192053529 (diff)
downloadandroid_packages_apps_Messaging-c0de5d0cf1c44664fcfd9adf0568ac137c215512.tar.gz
android_packages_apps_Messaging-c0de5d0cf1c44664fcfd9adf0568ac137c215512.tar.bz2
android_packages_apps_Messaging-c0de5d0cf1c44664fcfd9adf0568ac137c215512.zip
Adjust map and map bar UX
- Add ripple to map button bar - Fix drawable tint color for generic ride icon - Fix margins for map button bar - Map zoom is closer to spec, but layout still WIP Change-Id: I77c9a570aea1462f91d85c2bd149aac895712caa Issue-Id: RIDE-246, RIDE-241, RIDE-243
Diffstat (limited to 'src')
-rw-r--r--src/com/android/messaging/ui/conversation/ConversationMessageView.java15
-rw-r--r--src/com/cyanogenmod/messaging/util/GoogleStaticMapsUtil.java2
2 files changed, 10 insertions, 7 deletions
diff --git a/src/com/android/messaging/ui/conversation/ConversationMessageView.java b/src/com/android/messaging/ui/conversation/ConversationMessageView.java
index fae36c3..94a8fe0 100644
--- a/src/com/android/messaging/ui/conversation/ConversationMessageView.java
+++ b/src/com/android/messaging/ui/conversation/ConversationMessageView.java
@@ -691,9 +691,12 @@ public class ConversationMessageView extends FrameLayout implements View.OnClick
*/
private void showMapsPreview(String mapsUrlString, String mapsUrlPrefix, int desiredWidth) {
final int unspecifiedMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
- final int mapsMeasureSpec = MeasureSpec.makeMeasureSpec(desiredWidth,
+ final int mapsWidthMeasureSpec = MeasureSpec.makeMeasureSpec(desiredWidth,
MeasureSpec.EXACTLY);
- mMessageMapsView.measure(mapsMeasureSpec, unspecifiedMeasureSpec);
+ final int mapsHeightMeasureSpec = MeasureSpec.makeMeasureSpec(getResources()
+ .getDimensionPixelSize(R.dimen.conversation_maps_height), MeasureSpec.EXACTLY);
+
+ mMessageMapsView.measure(mapsWidthMeasureSpec, mapsHeightMeasureSpec);
// Reset view visibility to gone
mRequestRideButton.setVisibility(View.GONE);
@@ -702,10 +705,10 @@ public class ConversationMessageView extends FrameLayout implements View.OnClick
mButtonDivider.setVisibility(View.GONE);
final String encodedAddress = mapsUrlString.substring(mapsUrlPrefix.length());
- final int height = getResources()
- .getDimensionPixelSize(R.dimen.conversation_maps_height);
- String staticMapsUrl = GoogleStaticMapsUtil.getStaticMapsUrl(mContext, desiredWidth,
- height, encodedAddress);
+
+ String staticMapsUrl = GoogleStaticMapsUtil.getStaticMapsUrl(mContext,
+ getResources().getDimensionPixelSize(R.dimen.map_request_width),
+ getResources().getDimensionPixelSize(R.dimen.map_request_height), encodedAddress);
RoundedCornerTransformation transformation =
new RoundedCornerTransformation(mContext.getApplicationContext(), staticMapsUrl);
Picasso.with(mContext.getApplicationContext())
diff --git a/src/com/cyanogenmod/messaging/util/GoogleStaticMapsUtil.java b/src/com/cyanogenmod/messaging/util/GoogleStaticMapsUtil.java
index a88dfb0..cb1b0c7 100644
--- a/src/com/cyanogenmod/messaging/util/GoogleStaticMapsUtil.java
+++ b/src/com/cyanogenmod/messaging/util/GoogleStaticMapsUtil.java
@@ -27,7 +27,7 @@ public class GoogleStaticMapsUtil {
private static final String X = "x";
private static final String SIZE = "size=";
- private static final String ZOOM = "zoom=18";
+ private static final String ZOOM = "zoom=17";
private static final String SCALE = "scale=4";
private static final String API_KEY = "key=";