mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fix webview dimensions
This commit is contained in:
parent
4e1ab621ed
commit
d82c353103
3 changed files with 13 additions and 14 deletions
|
@ -49,10 +49,8 @@ public class InterfaceActivity extends QtActivity implements WebViewFragment.OnW
|
|||
|
||||
public static final String DOMAIN_URL = "url";
|
||||
private static final String TAG = "Interface";
|
||||
private static final int WEB_DRAWER_RIGHT_MARGIN_DP = 13;
|
||||
private static final int WEB_DRAWER_BOTTOM_MARGIN_DP = 13;
|
||||
private static final int WEB_DRAWER_WIDTH_DP = 244;
|
||||
private static final int WEB_DRAWER_HEIGHT_DP = 145;
|
||||
private static final int WEB_DRAWER_RIGHT_MARGIN = 262;
|
||||
private static final int WEB_DRAWER_BOTTOM_MARGIN = 150;
|
||||
private static final int NORMAL_DPI = 160;
|
||||
|
||||
private Vibrator mVibrator;
|
||||
|
@ -144,8 +142,9 @@ public class InterfaceActivity extends QtActivity implements WebViewFragment.OnW
|
|||
int widthPx = Math.max(size.x, size.y);
|
||||
int heightPx = Math.min(size.x, size.y);
|
||||
|
||||
layoutParams.x = (int) (widthPx - (WEB_DRAWER_RIGHT_MARGIN_DP + WEB_DRAWER_WIDTH_DP) * getResources().getDisplayMetrics().xdpi / NORMAL_DPI);
|
||||
layoutParams.y = (int) (heightPx - (WEB_DRAWER_BOTTOM_MARGIN_DP + WEB_DRAWER_HEIGHT_DP) * getResources().getDisplayMetrics().ydpi / NORMAL_DPI);
|
||||
layoutParams.x = (int) (widthPx - WEB_DRAWER_RIGHT_MARGIN * getResources().getDisplayMetrics().xdpi / NORMAL_DPI);
|
||||
layoutParams.y = (int) (heightPx - WEB_DRAWER_BOTTOM_MARGIN * getResources().getDisplayMetrics().ydpi / NORMAL_DPI);
|
||||
|
||||
layoutParams.resolveLayoutDirection(View.LAYOUT_DIRECTION_RTL);
|
||||
qtLayout.addView(webSlidingDrawer, layoutParams);
|
||||
webSlidingDrawer.setVisibility(View.GONE);
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
android:visibility="gone">
|
||||
<ImageView
|
||||
android:id="@+id/viewFullScreen"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="31dp"
|
||||
android:src="@drawable/ic_expand" />
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="31dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewFullScreen"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@drawable/ic_close" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SlidingDrawer android:id="@+id/drawer"
|
||||
android:layout_width="244dp"
|
||||
android:layout_height="145dp"
|
||||
android:layout_width="218dp"
|
||||
android:layout_height="125dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginBottom="11dp"
|
||||
android:layout_marginRight="11dp"
|
||||
|
@ -11,8 +11,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@id/handle"
|
||||
android:layout_width="88dip"
|
||||
android:layout_height="44dip"/>
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"/>
|
||||
<fragment
|
||||
android:id="@id/content"
|
||||
android:name="io.highfidelity.hifiinterface.fragment.WebViewFragment"
|
||||
|
|
Loading…
Reference in a new issue