Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatteryWidget 组件不显示 #54

Closed
MRYangY opened this issue Jul 26, 2019 · 5 comments
Closed

BatteryWidget 组件不显示 #54

MRYangY opened this issue Jul 26, 2019 · 5 comments

Comments

@MRYangY
Copy link

MRYangY commented Jul 26, 2019

父容器是constraintlayout,关于BatteryWidget的xml代码如下:

@MRYangY
Copy link
Author

MRYangY commented Jul 26, 2019

<dji.ux.widget.BatteryWidget
android:id="@+id/dji_drone_battery"
android:layout_width="50dp"
android:layout_height="50dp"
custom:excludeView="singleVoltage|doubleVoltage"
custom:layout_constraintBottom_toBottomOf="parent"
custom:layout_constraintLeft_toRightOf="@+id/dji_drone_gpssignal"
custom:layout_constraintTop_toBottomOf="@+id/dji_pre_flight_status">

</dji.ux.widget.BatteryWidget>

@MRYangY
Copy link
Author

MRYangY commented Jul 26, 2019

连接dji飞行器后,battery组件会闪现一下(位置是不对的),然后又不见了

@dji-dev
Copy link
Contributor

dji-dev commented Jul 26, 2019

Public comment from Luce Luo in Zendesk ticket #26451:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。
您可以参考一下UXSDK官方示例中的布局和使用方式:
https://github.com/dji-sdk/Mobile-UXSDK-Android/blob/master/sample/app/src/main/res/layout/activity_customized_widgets.xml

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持

@MRYangY
Copy link
Author

MRYangY commented Aug 2, 2019

使用LinearLayout线性布局的话,没问题,如果用相对布局和约束布局就会出现问题。

@MRYangY MRYangY closed this as completed Aug 2, 2019
@dji-dev
Copy link
Contributor

dji-dev commented Aug 2, 2019

Public comment from Luce Luo in Zendesk ticket #26451:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。
抱歉,与工程师确认了。为了兼容所有的小部件能够正常运行,UXSDK布局方面是特别定制的,
对于UXSDK小部件建议您使用线性布局而不要使用其他布局。

如果有特殊需要,建议您可以使用MSDK自行重构一个类似组件。

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants