lundi 26 janvier 2015

laying out webview and custom keyboard to fit right on all displays [on hold]


for the last week i have been fighting this layout i have made to make it fit right. I have attempted to use different gravity settings and combinations of height settings. (match_parent, fill_parent, wrap_content) I tried a relativeLayout. The results I get is the layout only works for a set height screen and on other screens the keyboard is off the screen or there is some white space under the keyboard where the web view is not pushing down and taking up the rest of the space. I have attempted to duplicate other layouts i have made in the past where i had but in the past the view that needed to grow to take up the space had always been on the bottom. This layout I'm attempting to have the top view push down to take up the rest of the space while not pushing the keyboard off the screen. The keyboard will be visible at all times so I want it to be part of the layout. With all my attempts The Web view is not pushing the keyboard down far enough or pushes it so far that some of the keyboard is off the screen. Any hints to direct me in the right direction would be great. Thank you



<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:orientation="vertical" >

<WebView
android:id="@+id/display"
android:layout_width="fill_parent"
android:layout_height="180dp" />

<android.inputmethodservice.KeyboardView
android:id="@+id/keyboardView"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="top|left"
android:visibility="visible" />

</LinearLayout>




Aucun commentaire:

Enregistrer un commentaire