Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old December 28th, 2012, 04:56 AM   #1 (permalink)
Junior Member
Thread Author (OP)
 
mitk0o0o0's Avatar
 
Join Date: Feb 2012
Posts: 76
 
Device(s): Samsung Galaxy Y
Carrier: Not Provided

Thanks: 33
Thanked 2 Times in 2 Posts
Default MDPI to LDPI

I've found a neat Touchwiz launcher that is meant for mdpi and my device is ldpi.

I would like to convert it for my device but I'm not sure where exactly to start. I doubt it's just resizing the images so before wasting my time on doing that, because I tried out the launcher without touching anything inside the apk and the dock icons appeared fine except the shortcuts on the homescreen were overlapping a bit with the dock icons and when I went to drawer, the apps weren't centered but were at the top and there was free space on the bottom. I would like to get some more information on this procedure from a few people with experience.

I've got APK-Multi-Tool and I just decompiled the apk.
I went to \res\layout-mdpi\ and I've opened up the launcher.xml and by looking at the code I have a feeling that's the file I should be editing.
There are stuff like this:
Code:
android:layout_width="fill_parent" android:layout_height="45.0dip"
Is this "45.0dip" thing in any way related to the screen density?

EDIT: Here are some screenies of what it appears like:


The problem on the second screenie doesn't really bother me much, the only problem there is the page indicator is at the bottom and overlaps with the dock icons which sucks I would like it to be moved on top of them. But yeah I'd also like to fix the problem with the app widgets going a little more above the dock icons on the first image.

I hope by just changing some weight and height codes everything will solve by itself.

So any ideas on what to do here?

__________________

mitk0o0o0 is offline  
Reply With Quote
Sponsors
Old December 28th, 2012, 11:11 AM   #2 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,932
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 464 Times in 287 Posts
Default

dip is device independant pixels. It's used to place objects without worrying about screen density or size. Using dip means the placement should have the same results no matter what device it is on.
__________________
My blog, Inverted Keystrokes, is looking for aspiring developers (not necessarily with Android) to post articles. If you have any development experience and are interested in participating, please PM me. =)
jonbonazza is online now  
Reply With Quote
The Following User Says Thank You to jonbonazza For This Useful Post:
mitk0o0o0 (December 28th, 2012)
Old December 28th, 2012, 02:10 PM   #3 (permalink)
Junior Member
Thread Author (OP)
 
mitk0o0o0's Avatar
 
Join Date: Feb 2012
Posts: 76
 
Device(s): Samsung Galaxy Y
Carrier: Not Provided

Thanks: 33
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by jonbonazza View Post
dip is device independant pixels. It's used to place objects without worrying about screen density or size. Using dip means the placement should have the same results no matter what device it is on.
Thanks for the information. So that means that is the code I should be editing?
mitk0o0o0 is offline  
Reply With Quote
Old January 3rd, 2013, 09:19 AM   #4 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,932
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 464 Times in 287 Posts
Default

The problem is that the assets that the launcher uses are sized for mdpi and not for ldpi. Changing the code is not what you want to do. You'll want to resize all of the image assets to ldpi.
jonbonazza is online now  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:46 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.