Android SwitchCompat拇指未对齐

时间:2015-02-13 10:00:12

标签: java android android-appcompat switchcompat

我试图在Android Studio中使用SwitchCompat,我把它放在build.gradle中:

compile 'com.android.support:appcompat-v7:21.+'

但拇指不在滑块的中心位置。

Screenshot

这是我的xml:

<android.support.v7.widget.SwitchCompat
    android:id="@+id/allarme"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="5dp"
    android:layout_gravity="right" />

你能帮帮我吗?

1 个答案:

答案 0 :(得分:0)

我终于找到了问题:appcompat(目前为v21.0.3)中存在一个问题,它会影响hdpi设备。 更多:https://code.google.com/p/android/issues/detail?id=78262

的解决方法: 将此文件复制到应用的res / drawable-hdpi:https://www.mediafire.com/?6c7537yi73m1e6m

相关问题