summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-10-13 20:04:10 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-13 20:04:10 +0000
commit2f311c7bbedd2200d8f91035303b0a359598ff7f (patch)
tree338f10dfceed241ad4fbbd442d3a83f50abd2c19
parent46b15454997b85bd28d3be2559ba103f8e224de2 (diff)
parentccf6c7a8b3da1da6bf9df41e18485ddc08a5a17a (diff)
am ccf6c7a8: Correct issue where content of "All" and "Missed" tabs reversed in RTL.
* commit 'ccf6c7a8b3da1da6bf9df41e18485ddc08a5a17a': Correct issue where content of "All" and "Missed" tabs reversed in RTL.
-rw-r--r--src/com/android/dialer/calllog/CallLogActivity.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java
index 1f6c49066..97e601630 100644
--- a/src/com/android/dialer/calllog/CallLogActivity.java
+++ b/src/com/android/dialer/calllog/CallLogActivity.java
@@ -39,6 +39,7 @@ import com.android.contacts.common.util.PermissionsUtil;
import com.android.contacts.commonbind.analytics.AnalyticsUtil;
import com.android.dialer.DialtactsActivity;
import com.android.dialer.R;
+import com.android.dialer.util.DialerUtils;
import com.android.dialer.voicemail.VoicemailStatusHelper;
import com.android.dialer.voicemail.VoicemailStatusHelperImpl;
@@ -64,8 +65,13 @@ public class CallLogActivity extends Activity implements ViewPager.OnPageChangeL
}
@Override
+ public long getItemId(int position) {
+ return getRtlPosition(position);
+ }
+
+ @Override
public Fragment getItem(int position) {
- switch (position) {
+ switch (getRtlPosition(position)) {
case TAB_INDEX_ALL:
return new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL);
case TAB_INDEX_MISSED:
@@ -229,4 +235,11 @@ public class CallLogActivity extends Activity implements ViewPager.OnPageChangeL
}
return null;
}
+
+ private int getRtlPosition(int position) {
+ if (DialerUtils.isRtl()) {
+ return mViewPagerAdapter.getCount() - 1 - position;
+ }
+ return position;
+ }
}