From c5f5b115f589f95d02fb0fd3690d098ca6397974 Mon Sep 17 00:00:00 2001 From: Stephen Bird Date: Tue, 19 Jan 2016 16:32:08 -0800 Subject: Bringup credits and other minor things Change-Id: Ib8bd8373a53adc7a370850091a04ada87beca098 --- res/layout/dialpad_view_unthemed.xml | 39 +++++++++++++++++----- res/values/cm_dimens.xml | 2 ++ .../android/phone/common/dialpad/DialpadView.java | 17 ++++++++-- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/res/layout/dialpad_view_unthemed.xml b/res/layout/dialpad_view_unthemed.xml index 18ab647..f16ab39 100644 --- a/res/layout/dialpad_view_unthemed.xml +++ b/res/layout/dialpad_view_unthemed.xml @@ -34,22 +34,45 @@ - + + + + + - + android:singleLine="true" + android:layout_weight="3" + android:layout_marginEnd="@dimen/dialpad_credits_padding" + android:orientation="vertical" > + + + + diff --git a/res/values/cm_dimens.xml b/res/values/cm_dimens.xml index 3880dd6..8572abe 100644 --- a/res/values/cm_dimens.xml +++ b/res/values/cm_dimens.xml @@ -26,4 +26,6 @@ 16dp 134dp 24dp + + 14dp \ No newline at end of file diff --git a/src/com/android/phone/common/dialpad/DialpadView.java b/src/com/android/phone/common/dialpad/DialpadView.java index 53a9dbe..3d17880 100644 --- a/src/com/android/phone/common/dialpad/DialpadView.java +++ b/src/com/android/phone/common/dialpad/DialpadView.java @@ -17,6 +17,7 @@ package com.android.phone.common.dialpad; import android.animation.AnimatorListenerAdapter; +import android.app.PendingIntent; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.Configuration; @@ -280,14 +281,26 @@ public class DialpadView extends LinearLayout { mCanDigitsBeEdited = canBeEdited; } - public void setCallRateInformation(String countryName, String displayRate) { - if (TextUtils.isEmpty(countryName) && TextUtils.isEmpty(displayRate)) { + public void setCallRateInformation(String countryName, String displayRate, + final PendingIntent p) { + if (TextUtils.isEmpty(countryName) && TextUtils.isEmpty(displayRate) && + p == null) { mRateContainer.setVisibility(View.GONE); return; } mRateContainer.setVisibility(View.VISIBLE); mIldCountry.setText(countryName); mIldRate.setText(displayRate); + mIldRate.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View view) { + try { + p.send(); + } catch (PendingIntent.CanceledException e) { + e.printStackTrace(); + } + } + }); } public boolean canDigitsBeEdited() { -- cgit v1.2.3