Loading core/java/android/view/View.java +9 −3 Original line number Diff line number Diff line Loading @@ -2167,21 +2167,27 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit /** * Cache the paddingRight set by the user to append to the scrollbar's size. * * @hide */ @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingRight; protected int mUserPaddingRight; /** * Cache the paddingBottom set by the user to append to the scrollbar's size. * * @hide */ @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingBottom; protected int mUserPaddingBottom; /** * Cache the paddingLeft set by the user to append to the scrollbar's size. * * @hide */ @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingLeft; protected int mUserPaddingLeft; /** * Cache if the user padding is relative. Loading core/java/android/widget/CheckedTextView.java +5 −5 Original line number Diff line number Diff line Loading @@ -130,10 +130,10 @@ public class CheckedTextView extends TextView implements Checkable { setMinHeight(d.getIntrinsicHeight()); mCheckMarkWidth = d.getIntrinsicWidth(); mPaddingRight = mCheckMarkWidth + mBasePaddingRight; mUserPaddingRight = mCheckMarkWidth + mBasePaddingRight; d.setState(getDrawableState()); } else { mPaddingRight = mBasePaddingRight; mUserPaddingRight = mBasePaddingRight; } mCheckMarkDrawable = d; requestLayout(); Loading @@ -142,7 +142,7 @@ public class CheckedTextView extends TextView implements Checkable { @Override public void setPadding(int left, int top, int right, int bottom) { super.setPadding(left, top, right, bottom); mBasePaddingRight = mPaddingRight; mBasePaddingRight = mUserPaddingRight; } @Override Loading @@ -167,9 +167,9 @@ public class CheckedTextView extends TextView implements Checkable { int right = getWidth(); checkMarkDrawable.setBounds( right - mCheckMarkWidth - mBasePaddingRight, right - mUserPaddingRight, y, right - mBasePaddingRight, right - mUserPaddingRight + mCheckMarkWidth, y + height); checkMarkDrawable.draw(canvas); } Loading tests/BiDiTests/res/layout/basic.xml +7 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,12 @@ </LinearLayout> <Button android:id="@+id/button_alert_dialog" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button_alert_dialog_text" android:textSize="32dip" /> </LinearLayout> <LinearLayout Loading tests/BiDiTests/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ <string name="button_left_text">Left</string> <string name="button_before_text">Start</string> <string name="button_requestlayout_text">Request Layout</string> <string name="button_alert_dialog_text">AlertDialog</string> <string name="textview_text">This is a text for a TextView</string> <string name="edittext_text">mmmmmmmmmmmmmmmmmmmmmmmm</string> <string name="normal_text">Normal String</string> Loading tests/BiDiTests/src/com/android/bidi/BiDiTestBasic.java +27 −2 Original line number Diff line number Diff line Loading @@ -16,17 +16,42 @@ package com.android.bidi; import android.app.AlertDialog; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; public class BiDiTestBasic extends Fragment { private View currentView; private Button alertDialogButton; private String[] items = {"This is a very very very very very very very very very very very long Item1", "Item2"}; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.basic, container, false); currentView = inflater.inflate(R.layout.basic, container, false); return currentView; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); alertDialogButton = (Button) currentView.findViewById(R.id.button_alert_dialog); alertDialogButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { showDialog(); } }); } private void showDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(currentView.getContext()); builder.setSingleChoiceItems(items, 0, null); builder.show(); } } Loading
core/java/android/view/View.java +9 −3 Original line number Diff line number Diff line Loading @@ -2167,21 +2167,27 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit /** * Cache the paddingRight set by the user to append to the scrollbar's size. * * @hide */ @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingRight; protected int mUserPaddingRight; /** * Cache the paddingBottom set by the user to append to the scrollbar's size. * * @hide */ @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingBottom; protected int mUserPaddingBottom; /** * Cache the paddingLeft set by the user to append to the scrollbar's size. * * @hide */ @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingLeft; protected int mUserPaddingLeft; /** * Cache if the user padding is relative. Loading
core/java/android/widget/CheckedTextView.java +5 −5 Original line number Diff line number Diff line Loading @@ -130,10 +130,10 @@ public class CheckedTextView extends TextView implements Checkable { setMinHeight(d.getIntrinsicHeight()); mCheckMarkWidth = d.getIntrinsicWidth(); mPaddingRight = mCheckMarkWidth + mBasePaddingRight; mUserPaddingRight = mCheckMarkWidth + mBasePaddingRight; d.setState(getDrawableState()); } else { mPaddingRight = mBasePaddingRight; mUserPaddingRight = mBasePaddingRight; } mCheckMarkDrawable = d; requestLayout(); Loading @@ -142,7 +142,7 @@ public class CheckedTextView extends TextView implements Checkable { @Override public void setPadding(int left, int top, int right, int bottom) { super.setPadding(left, top, right, bottom); mBasePaddingRight = mPaddingRight; mBasePaddingRight = mUserPaddingRight; } @Override Loading @@ -167,9 +167,9 @@ public class CheckedTextView extends TextView implements Checkable { int right = getWidth(); checkMarkDrawable.setBounds( right - mCheckMarkWidth - mBasePaddingRight, right - mUserPaddingRight, y, right - mBasePaddingRight, right - mUserPaddingRight + mCheckMarkWidth, y + height); checkMarkDrawable.draw(canvas); } Loading
tests/BiDiTests/res/layout/basic.xml +7 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,12 @@ </LinearLayout> <Button android:id="@+id/button_alert_dialog" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button_alert_dialog_text" android:textSize="32dip" /> </LinearLayout> <LinearLayout Loading
tests/BiDiTests/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ <string name="button_left_text">Left</string> <string name="button_before_text">Start</string> <string name="button_requestlayout_text">Request Layout</string> <string name="button_alert_dialog_text">AlertDialog</string> <string name="textview_text">This is a text for a TextView</string> <string name="edittext_text">mmmmmmmmmmmmmmmmmmmmmmmm</string> <string name="normal_text">Normal String</string> Loading
tests/BiDiTests/src/com/android/bidi/BiDiTestBasic.java +27 −2 Original line number Diff line number Diff line Loading @@ -16,17 +16,42 @@ package com.android.bidi; import android.app.AlertDialog; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; public class BiDiTestBasic extends Fragment { private View currentView; private Button alertDialogButton; private String[] items = {"This is a very very very very very very very very very very very long Item1", "Item2"}; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.basic, container, false); currentView = inflater.inflate(R.layout.basic, container, false); return currentView; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); alertDialogButton = (Button) currentView.findViewById(R.id.button_alert_dialog); alertDialogButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { showDialog(); } }); } private void showDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(currentView.getContext()); builder.setSingleChoiceItems(items, 0, null); builder.show(); } }