How to avoid extra spaces using web view in android - android

I my application I have a web view and scroll view. In my Galaxy S2 , it's works fine ,But in Xperia Z and some other device there are extra white space in right side. I don't know why it is showing like that . can anybody help me from in this issue.
Thanks in advance!

Do you set your application for multi-screens support. I thinks it's your screen density error, mobiles has it's own dimension and desity for each pixel, so we have to do coding for them.

Related

How to get the Bootstrap gap to work on a mobile device

I'm working on a web application that uses Bootstrap 5.0 for the styling and I have a strange anomaly going on.
I have a collection of buttons (<a>...</a>) that are lined up in a horizontal pattern as shown in the attached image. As you can see, the desktop view looks great, but for some reason, looking at this on my mobile phone, the buttons are all crunched together indicating that the gap part of the class="d-grid gap-2 d-sm-flex" is being ignored by my mobile phone.
In my dev environment, I use the browser's dev tools (F12) to view it using Galaxy S5 in landscape mode which is the closest thing to my Galaxy A51 5G phone. My immediate suspicion is that perhaps it has to do with the fact that the gap-# in bootstrap translates to rem rather than pixels. I'm looking into that now. Until then please let me know if you have a more concrete answer.
Thanks a bunch.
Okay, I found an acceptable workaround, but I'm still interested if you know what the deal is with the gap-# not working on the mobile device. Here's what I did for now...
I removed all of the class="gap-#" and placed the following in the class of each button inside the foreach loop that places the buttons:
<button class="mb-2 mb-sm-0 me-0 me-sm-2" type="button" ... </button>.
This allows me to set the bottom margin of each button to have some space with the right side having no space while in mobile (portrait mode), but then have the bottom margins set to 0 and the right (end) margins set to have some space while in landscape mode and every size larger than the smallest size.
It seems a bit "hacky", but it works.
Please answer if you know a better way to get the gap-# to work in landscape mode of a small mobile device.
Thanks.

Auto responsive layout for android mobile and tablet

I am trying to develop an app, which support all mobile and tablet devices of every screen size and density, but every time i got some changes in UI for different screen sizes for example in image below i put three text on screen but it always change its location in different screen devices.
I tried smallest width screen(600,720,320,480) and screen size(S,N,L,X) but both are not working properly,
is there anyone who can help me with specific data. please dont refer developer android site because i looked so many website but they only describe android screen specification, they dont give any proper solution. please give me any proper solution or project sample will be better.
thanks in advance.
http://i.stack.imgur.com/R1uKU.png

Strange Blue markings / artifacts on Android Browser when browsing a specific website

I am noticing strange blue markings when I visit certain webpages on Samsung galaxy note 10.1 is running android 4.1.2. This is only happening on one website and not the other. I have attached screenshots of both. I think it could be due to certain CSS or JS. Not sure what is is. Please help.
http://i.stack.imgur.com/rxPFO.png
http://i.stack.imgur.com/25cNO.png
It looks like you may have an advertising blocker running. Could there be a banner add that should be showing where those blue images are?

Layout of app not to right size on moblie phone

I have been working on a app for sometime now. I have only been working and looking on my emulator and never put it on a android phone to see results along the way. But now I have, and i'v seen what it looks like. Some buttons are high and low here there,my text is all out of sink.So what I would like to know is how can I make my app fit to the size of the screen on most android phones.Because on the emulator it looks fine.
android:minSdkVersion="5"
android:targetSdkVersion="10"
Android Version 2.3.6
kernel version 2.6.35.7-1187001
Thank you.
How are you mentioning button sizes?
You will have to use dp and sp size rather than mentioning actual button sizes.

Resizing the tabgroup header height in Titanium Android

I am new to mobile development with Titanium Studio. I am developing an app for android. When I tried running it in WXGA720 screen emulator, which was looking good. But when I tried the same with WXGA800-7in screen emulator, it looks terrible. Below is the screenshot for your reference.
Screenshot from WXGA720:
Screenshot from WXGA800-7in:
Please suggest. Thanks in advance.
In Titanium when developing for Android, it uses same image for TabGroups. Bigger the image specified, bigger it will show up in the app. My solution was using different images for different devices.
Android let you do that automatically by different device profiles.
If you look at Resources/android/images, there are several directories like:
res-long-land-hdpi
res-long-land-ldpi
res-long-port-hdpi
res-long-port-ldpi
res-notlong-land-hdpi
...
Please check here for a complete description.
I found a way to rectify this issue, as i would like to have my application only for Galaxy S3 and Nexus 7.
I wrote code to detect the screen size of Nexus 7 (height=1216 && width=800)
and dynamically set the tab icon, i used smaller size tab icons for Nexus.

Categories

Resources