mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
tweak toolbar layout to fit better
This commit is contained in:
parent
2a8ce27ca9
commit
c4d7626ae1
3 changed files with 7 additions and 15 deletions
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="toolbar_button">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -38,9 +38,10 @@
|
|||
</style>
|
||||
|
||||
<style name="toolbar_button">
|
||||
<item name="android:layout_width">@dimen/tb_button_width</item>
|
||||
<item name="android:layout_height">@dimen/tb_button_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
</style>
|
||||
|
||||
<style name="about_items">
|
||||
|
|
|
@ -35,8 +35,8 @@ public class BoardContainer extends ViewGroup {
|
|||
// If the ratio of height/width exceeds this, use portrait layout
|
||||
private static final int PORTRAIT_THRESHHOLD = 105;
|
||||
|
||||
private static final int BOARD_PCT_HOR = 90;
|
||||
private static final int BOARD_PCT_VERT = 85;
|
||||
private static final int BOARD_PCT_VERT = 90;
|
||||
private static final int BOARD_PCT_HOR = 85;
|
||||
|
||||
private static final int BOARD_INDX = 0;
|
||||
private static final int EXCH_INDX = 1;
|
||||
|
@ -157,8 +157,8 @@ public class BoardContainer extends ViewGroup {
|
|||
private Rect[] figureBounds( int left, int top, int width, int height )
|
||||
{
|
||||
int boardHeight = ( haveTradeBar() || s_isPortrait)
|
||||
? height * BOARD_PCT_HOR / 100 : height;
|
||||
int boardWidth = s_isPortrait ? width : width * BOARD_PCT_VERT / 100;
|
||||
? height * (BOARD_PCT_VERT) / 100 : height;
|
||||
int boardWidth = s_isPortrait ? width : (width * BOARD_PCT_HOR) / 100;
|
||||
|
||||
// board
|
||||
Rect boardBounds = new Rect( left, top, left + boardWidth,
|
||||
|
|
Loading…
Add table
Reference in a new issue