我必须在我的Android应用中管理不同的屏幕尺寸和不同的密度.我没有正确获得目录结构.
到目前为止我所了解的是屏幕尺寸有四种类型:
和不同的密度:
现在每个设备的尺寸(小,正常,大和xlarge)应映射每个密度.因为每个尺寸都可以有不同的密度,对吧?如果是,那么我们可以说小屏幕具有所有密度,即(ldpi,mdpi,hdpi,xhdpi)相同的正常,大和xlarge.
关键是我将如何在可绘制的目录中管理它们.是否有四个不同尺寸的小屏幕尺寸的文件夹(drawable-small-ldpi,drawable-small-mdpi,drawable-small-hdpi,drawable-small-xhdpi)?
其他屏幕尺寸也是如此.
如果没有,那么我将如何管理(drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable-xhdpi)文件夹中的所有图像,因为不同的屏幕尺寸我将拥有不同大小的图像.那么如何在同一密度文件夹中管理具有不同密度的小型设备和具有不同尺寸的大型设备.
当我阅读所有内容时,请不要给我任何Android文档的参考.
如果有人不能明白我的意思,请告诉我.我很困惑.
请检查下面图片的链接。由于声誉低,我无法发布图片。
https://i.stack.imgur.com/nupZo.png
我的目标是得到像左边那样的布局,而不是得到右边的布局。这是我的布局 xml 代码。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:background="@color/metalDark"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/topPanel"
android:layout_width="fill_parent"
android:layout_height="65dp"
android:background="@color/metalList"
android:elevation="6dp"
android:layout_marginBottom="5dp"
android:orientation="horizontal">
<TextView
.../>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/topPanel"
android:layout_margin="10dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/albumheader"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@color/metalList"
android:elevation="6dp">
<LinearLayout
android:id="@+id/underlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp"
android:layout_marginBottom="25dp"
android:background="@drawable/canvas2">
<ImageView
android:id="@+id/al_art"
android:layout_width="135dp"
android:layout_height="135dp"
android:layout_toLeftOf="@+id/al_details"
android:layout_marginLeft="25dp"
android:layout_marginTop="-17dp"
android:elevation="4dp"/>
<LinearLayout
android:id="@+id/al_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="right|center"
android:orientation="vertical">
<TextView
.../>
<TextView
.../>
<TextView
.../>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/metalList"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:elevation="6dp"
>
<ListView
..../>
</LinearLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我在 Android 谷歌地图 api 上创建了自定义标记,但它在显示时给出了一个模糊的图像。我如何获得更好的令人惊叹的自定义标记并且在低分辨率下没有模糊(我的标记分辨率为 25x26 像素)。我没有使用像 250x250 像素这样的高分辨率图像,因为它在地图中显示了一个很大的自定义标记。
我看了这个链接:
res/values-sw720dp/dimens.xml(800*1280)
但是当我在Neymus 7上运行我的布局 - 在Genymotion上使用API 19 800*1280时,它会使用
值,华电国际
代替
价值观sw720dp
!

我的min api是14.
为什么?