Questions tagged [density-independent-pixel]

DIP is short for Density Independent Pixel. It is used by the Android system as a unit of measurement to make GUIs fit on different screen sizes with scaling. This allows the developer to create a single interface for different screen sizes.

119 questions
0
votes
0 answers

How can I determine the dimens of each screen? - Android studio

I am new to programming and I didn't quite understand the dimens, I know there are small, normal, large and xlarge screen sizes. I also know the densities: ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi. I see that we make dimens.xml for each size but I…
0
votes
0 answers

Text is stretched on different screen in my custom view after settings text size in dp android

I am trying to create a text sticker in android. I am creating a text sticker on one of my phones and then saving the text size in the DP. Then on another phone, I am loading the same text with the same DP and converting the DP value to pixel. Then…
0
votes
0 answers

Passing an enum value to the controler constructor MVC 2

I got a piece of code like follows private Models.Quotes QuoteList; public SalesOfficeController(Models.Quotes.QuoteType qt ) { QuoteList = new Models.Quotes(qt); } I wanted to pass dynamic enum value(QuoteType) to this…
0
votes
3 answers

Android add a padding with size that looks equal on all devices

I have a view that is the same size as my screen / fragment. However, I want to add a padding on the left and right edges such that on all devices, this padding looks like its the same size. when I use:…
bcsta
  • 1,963
  • 3
  • 22
  • 61
0
votes
1 answer

Dip in xml does not work for different screen density in android simulator

I'm testing multi dpi in android, and the layout xml file seems like this:
herbertD
  • 10,657
  • 13
  • 50
  • 77
0
votes
2 answers

How to build UI that support all screen sizes and devices in android

I'm currently trying to develop an android application but I've been stuck for a while now trying to scale the views in an activity. In the picture you can see that the resolution-width is 10px(It's only to make it more understandable for you guys)…
0
votes
2 answers

Android TextView decimal size issue

I tested emulators and real devices but as you can see there is no change between 40 dp and 40.2 dp! I'm working on a project with a very high font sensitivity and the issue is behaviour of android text engine. Is there any way to prevent that?…
seyfullah.bilgin
  • 1,421
  • 14
  • 16
0
votes
3 answers

how to get same sized launcher icons on different emulator skins…(android)

have a look at figure 2. in the link given below.. http://developer.android.com/guide/practices/screens_support.html.. there it is being mentioned that ,The platform provides density independence to applications by default.(launcher icons are…
manju
  • 847
  • 3
  • 16
  • 43
0
votes
1 answer

Same view size on all screens

I need to display view with exact size in milimeters. The problem I face is that on many android devices when i apply view size im mm, the output differs. Is there any way to achieve the exact same view size on all screens? I tried with: pixels =…
aTable
  • 73
  • 1
  • 4
0
votes
1 answer

How can i support different measurements for screens in android

I basically want to accomplish an adequate size of my layouts depending on the screen size of the device. I am using dp as unit, but it doesn't seem to work. How can i do that?
user6556012
0
votes
1 answer

How to assign values to image array in Matlab?

I am trying to write a matlab code which copies one segment of an image into another with a particular range matrices. My code works as required. The only problem I am having is that I want to assign 255 value to copied part of image so that the…
0
votes
1 answer

One coordinate grid for all Android device (Appcelerator)

Currently I'm using percentages to maintain my Android app UI, but I think this is'nt the best solution. I found this in the documentation: The coordinates grid Titanium uses a grid coordinate system for layout. Grid locations are based on the…
0
votes
1 answer

Screen resolution with images issue

I've been working on an app for a little while now that creates a tile puzzle. I'm to the point where I'm testing for various size and density screens. Using Krita I scaled the tile images down to 110 X 110 pixels for use in the mdpi format. …
0
votes
1 answer

how to sharp an image thumbnail in java?

I have created a thumbnail image in java using imgscalr library and thumbnail created with good quality but i want to sharpen that thumbnail. so please help me to sharpen thumbnail image.
ena jordan
  • 23
  • 1
  • 7
0
votes
0 answers

How do I visualise dip unit for HDPI screen?

For a 160dpi (MDPI) screen, 1dip is 1px, as shown below, For a 320dpi (XHDPI) screen, 1dip is 2px, as shown below, For a 240dpi (HDPI) screen, 1dip is 1.5px, But, How do I visualise 1dip in pixels for 240dpi (HDPI) screen?
overexchange
  • 15,768
  • 30
  • 152
  • 347