mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 21:40:15 -07:00
#597 from serpentspirale/ui_v2 - Fixed improper layout sizing when selecting account
This commit is contained in:
commit
21d5dfcef4
1 changed files with 3 additions and 2 deletions
|
|
@ -738,7 +738,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||||
new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName);
|
new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName);
|
||||||
accountListLayout.removeViewsInLayout(0,1);
|
accountListLayout.removeViewsInLayout(0,1);
|
||||||
//Resize the window
|
//Resize the window
|
||||||
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)Math.min((yScreen*0.8), 200 + accountListLayout.getChildCount()*150));
|
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int) Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*55)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder2.setNegativeButton(android.R.string.cancel, null);
|
builder2.setNegativeButton(android.R.string.cancel, null);
|
||||||
|
|
@ -748,7 +748,8 @@ public class PojavLoginActivity extends BaseActivity
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)Math.min((yScreen*0.8), 200 + accountListLayout.getChildCount()*150));
|
//The value 73 and 56 are dp numbers, converted into px in order to resize the layout.
|
||||||
|
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*56)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
|
||||||
accountDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
accountDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
accountDialog.show();
|
accountDialog.show();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue