MDPI to LDPI


  1. mitk0o0o0

    mitk0o0o0 Well-Known Member

    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 (Text):
    1. 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:
    [​IMG] [​IMG]

    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?

    Advertisement
    :
  2. jonbonazza

    jonbonazza Well-Known Member

    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.
    mitk0o0o0 likes this.
  3. mitk0o0o0

    mitk0o0o0 Well-Known Member

    Thanks for the information. So that means that is the code I should be editing?
  4. jonbonazza

    jonbonazza Well-Known Member

    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.
Loading...

Share This Page