Fix user photo popup layout for RTL
When RTL language is set, the edit-photo popup window on user profile info is not shown fully. The popup window should be aligned with the anchor. Cherrypick of https://android-review.googlesource.com/#/c/207762/ Bug: 27955356 Change-Id: Ia928c99fbfff3596b048cc3949aef6d03594fed7
This commit is contained in:
committed by
Suprabh Shukla
parent
e652b7b0ca
commit
9238e50a80
@@ -37,6 +37,7 @@ import android.provider.ContactsContract.DisplayPhoto;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.AdapterView;
|
||||
@@ -166,6 +167,7 @@ public class EditUserPhotoController {
|
||||
final int width = Math.max(mImageView.getWidth(), context.getResources()
|
||||
.getDimensionPixelSize(R.dimen.update_user_photo_popup_min_width));
|
||||
listPopupWindow.setWidth(width);
|
||||
listPopupWindow.setDropDownGravity(Gravity.START);
|
||||
|
||||
listPopupWindow.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user