Android 索尼Xperia S(LT26i)似乎没有显示复合可拉丝

Android 索尼Xperia S(LT26i)似乎没有显示复合可拉丝,android,sony,sony-xperia,compound-drawables,Android,Sony,Sony Xperia,Compound Drawables,我们正在测试我们的新应用程序,我们在几个文本视图中使用复合绘图功能。不幸的是,索尼Xperia S(LT26i)忽略了setCompoundDrawables和SetCompoundDrawablesWithinInstincBounds 有人能证实这个错误吗?或者有人有工作的变通方法吗?这种效果会影响其他手机吗 感谢并问候我可以在我的LT26i/4.1.2/build 6.2.B.1.96上确认相同的行为 我的解决方法是在使用适当的可提取项重新分配之前清除所有复合可提取项: final int

我们正在测试我们的新应用程序,我们在几个文本视图中使用复合绘图功能。不幸的是,索尼Xperia S(LT26i)忽略了setCompoundDrawables和SetCompoundDrawablesWithinInstincBounds

有人能证实这个错误吗?或者有人有工作的变通方法吗?这种效果会影响其他手机吗


感谢并问候

我可以在我的LT26i/4.1.2/build 6.2.B.1.96上确认相同的行为

我的解决方法是在使用适当的可提取项重新分配之前清除所有复合可提取项:

final int oldPadding = getCompoundDrawablePadding();

// In order to be able to reset the drawables, set padding to zero.
// (this step is specific to this Android issue/bug)
setCompoundDrawablePadding(0);
// Reset drawables
setCompoundDrawables(null, null, null, null);

// Set drawables and restore padding
setCompoundDrawables(myDrawables[0], myDrawables[1], myDrawables[2], myDrawables[3]);
setCompoundDrawablePadding(oldPadding);

我可以在LT26i/4.1.2/build 6.2.B.1.96上确认相同的行为

我的解决方法是在使用适当的可提取项重新分配之前清除所有复合可提取项:

final int oldPadding = getCompoundDrawablePadding();

// In order to be able to reset the drawables, set padding to zero.
// (this step is specific to this Android issue/bug)
setCompoundDrawablePadding(0);
// Reset drawables
setCompoundDrawables(null, null, null, null);

// Set drawables and restore padding
setCompoundDrawables(myDrawables[0], myDrawables[1], myDrawables[2], myDrawables[3]);
setCompoundDrawablePadding(oldPadding);

我在Xperia S(LT26i)上也发现了同样的行为。 我在几个不同的设备上试过,包括其他4.1.2设备,这是唯一一个出现错误的设备。 我修改了Melv的答案(非常感谢,我不知道为什么会发生这种情况!)


我在Xperia S(LT26i)上也发现了同样的行为。 我在几个不同的设备上试过,包括其他4.1.2设备,这是唯一一个出现错误的设备。 我修改了Melv的答案(非常感谢,我不知道为什么会发生这种情况!)


可能相关:,但我找不到任何与Xperia或
setCompoundDrawables()相关的bug
可能相关:,但我找不到任何与Xperia或
setCompoundDrawables()相关的bug。
你救了我一天!顺便说一句,这种行为只发生在LT26i或任何4.1.2设备上?你救了我一天!顺便说一句,这种行为只发生在LT26i或任何4.1.2设备上?