我试图在Android中使用SwitchCompat,我把它放在build.gradle中:
compile 'com.android.support:appcompat-v7:21.+'但拇指不是以滑块为中心的。

这是我的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" />你能帮帮我吗?
发布于 2015-02-24 17:33:50
我终于发现了这个问题: appcompat (目前的版本21.0.3)中有一个错误困扰着hdpi设备。更多信息:https://code.google.com/p/android/issues/detail?id=78262
解决办法:将此文件复制到您的应用程序的res/drawable中:https://www.mediafire.com/?6c7537yi73m1e6m
https://stackoverflow.com/questions/28496914
复制相似问题