Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid navigation bar issue
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/DDMOKl.png" alt="enter image description here"></p> <p><strong>Scenario</strong></p> <p>I am facing a problem related to the navigation bar in google nexus. In my fragment I have an Image view (being displayed from the local resoure, eg: cofee mug) and a tag containing description (basically button view with text). Both the views are inside a layout. the tag is positioned with certain margin from left and top in dp, so the tag would look like exactly below the image.</p> <p>The coffee mug image has been sliced for the xhdpi resolution.</p> <p><strong>Problem faced</strong></p> <p>When the application is run on xhdpi device such as s3 the tag is exactly below the coffee mug image as expected. But when run on google nexus 3, containing navigation bar, the image is scaled rendered since the navigation bar consumes certain amount pixels.But for some reason my tag is mispositioned.</p> <p>How can I ensure that the tag is not mispositioned? I appreciate if you could provide some suggestion.</p> <p>Layout looks similar to below:</p> <p></p> <pre><code> &lt;ImageView android:id="@+id/home_background" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="left" android:adjustViewBounds="true" android:contentDescription="@string/image" /&gt; &lt;Button android:id="@+id/discoverTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/tag_states" android:layout_marginLeft="17dp" android:layout_marginTop="18dp" android:textSize="30sp" android:textColor="#515151"/&gt; </code></pre> <p></p> <p>Image view is the coFfee mug image mentioned above and the button view is the tag (blue image). both are inside a relative layout parent with match parent for height and width.</p> <p>Expected:</p> <p><img src="https://i.stack.imgur.com/VWlFLl.png" alt="actual"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload