This paper will analyze the picture placement strategy of three manufacturers, hoping to give you some reference.

1. Taobao

Mdpi:

Some of the original Android ICONS remain in MDPI, as can be seen from the names and prefixes. According to the image size analysis, there are some small ICONS and some unused ICONS in this directory. (This picture of the Launcher also illustrates the history of Taobao very well).

HDP:

The HDP is divided into two parts: expressions and other images. F + digital pictures are emoticons, taobao only has a set of emoticons, and they are placed in this directory. Except for a few images that match the MDIP images (such as place_holder for user portraits), the rest of the images are completely different from the MDPI images. By the way, except for emoticons, all the ICONS in this directory are small ICONS, which definitely belong to the small category.

Xhdpi:

Xhdpi differs from HDPI in that it has a large number of national ICONS. In addition, there are some ICONS that require high definition.

Xxhdpi:

Xxhdpi is nothing, just a few pictures.

Other:

In the folders with suffixes, except for 5 or so ICONS of Taobao, the rest are pictures of the system, all beginning with ABC. I don’t know if Taobao actually uses any of these images, but I can definitely say that there are redundant images, and maybe a plan for further optimization.

Summary: Taobao’s picture placement strategy is to place a large number of pictures in HDPI and XHDPI. For example, emoticograms in HDPI and country pictures in XHDPI are mostly set, and a few global ICONS will have more than one set (few, estimated to be only a dozen). Xxhdpi and MHDPI are only supplements and do not have much effect.

The most curious thing about Taobao is that its resource file is small, but the SO file is quite large:

2. Weibo

Weibo is a typical Android style app. Its drawable is all suffixed, which fully conforms to the default packaging strategy of Android standard. It also has pictures based on pixel density and even ldPI directory.

mdpi-v4

There are a lot of small ICONS in MDPI, among which there is one named share_wx. From its name, we can immediately know that it is the icon shared by wechat, but it is actually the logo of Weibo, which is quite interesting. The rest are just a few corner ICONS, not a lot of them, so the main image is definitely not here.

hdpi-v4

This is the main directory where weibo pictures are stored, with many big backgrounds and expressions. Like Taobao, weibo’s expression pictures are all in HDPI. It starts with LXH, emoji and other prefixes, which are used to distinguish different styles of expressions.

Xhdpi – v4 and xxhdpi – v4 *

I put some big background images here, and I found a lot of the same images as in HDPI, so it’s safe to assume that weibo made different pixel images. This confirms my belief that Weibo is a pretty standard Android app.

ldpi-v4

This directory is really useless, weibo itself does not maintain this directory, it is all third-party library and app store images, weibo developers just need to put in.

Dp sw400dp and sw32dp – 400

These directories contain identical ICONS for different resolutions, as well as weibo’s own logo.

3. WeChat

Through the above analysis, can we draw some experience?

  • A lot of images are in HDPI and XDPI
  • Emoticons are in HDPI
  • The Anim directory is full of XML files
  • The drawable directory has a lot of XML and a few PNG and.9 diagrams
  • The layout file contains all the XML
  • Place audio in RAW
  • SVG images are in RAW, Drawable, or Assets
  • The largest folder is picture files
  • Layout file is small
  • The same picture, high – score screen must be larger than low – split screen

Ok, now we can look at the resources of wechat, what is the fear of confusion, umeng confused ABCD code can understand, wechat ADCD resources should not be difficult.

raw(a9)

This directory contains a large number of SVG images and MP3 files. From a professional point of view, the drawable directory does not hold MP3s, so this must be a RAW file. There is a lot of SVG in this directory, so you can see that wechat has implemented full SVG and is running stably online. This can also be proved in the early public accounts of wechat, please see SVG on Android wechat for details.

It mentioned:

The first step is to take the resource file with the.svg suffix (the UI is very good for exporting such images) and place it in the RAW directory instead of the Drawable directory. Second, replace r.lawable. XXX with R.law. XXX. Replace @drawable/ XXX with @raw/ XXX.

layout(f)

Now that we have two clues, our first guess is that the three directories above must be common ones, or they wouldn’t be that big.

After opening F, I found that this is the layout file, so the rest must be the picture file.

hdpi(y)


A2:

Y:

Y is 11KB and A2 is 76KB, which clearly indicates that y is HDPI and A2 is xHDPI.

Xhdpi (a2) :

There are not many pictures in XHDPI that are the same as those in HDPI. Wechat puts some large pictures here.

drawable(k)

Drawable itself is nothing to say, but wechat’s drawable has a small share of.9 images, so I wonder if SVG can do some of the work of.9 to some extent?

Conclusion:

  1. Wechat’s emoticons are all in HDPI, with only one set of pictures, which has almost become the standard
  2. Wechat has implemented SVG, SVG images in RAW
  3. Wechat tends to place larger images in XHDPI and produce only one set of images
  4. Wechat and Taobao are as far as possible to choose a set of pictures to meet the needs