summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 2bcd8d492..c1923b2e4 100644
--- a/src/com/android/dialer/calllog/CallLogActivity.java
+++ b/src/com/android/dialer/calllog/CallLogActivity.java
@@ -40,6 +40,7 @@ import com.android.contacts.commonbind.analytics.AnalyticsUtil;
import com.android.dialer.DialtactsActivity;
import com.android.dialer.R;
import com.android.dialer.TransactionSafeActivity;
+import com.android.dialer.util.DialerUtils;
public class CallLogActivity extends TransactionSafeActivity implements ViewPager.OnPageChangeListener {
private ViewPager mViewPager;
@@ -63,8 +64,13 @@ public class CallLogActivity extends TransactionSafeActivity implements ViewPage
}
@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, true /* isCallLogActivity */);
@@ -233,4 +239,11 @@ public class CallLogActivity extends TransactionSafeActivity implements ViewPage
}
return null;
}
+
+ private int getRtlPosition(int position) {
+ if (DialerUtils.isRtl()) {
+ return mViewPagerAdapter.getCount() - 1 - position;
+ }
+ return position;
+ }
}