UX SDK中控件不显示

Comments

4 comments

  • 尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 RadarWidget 已经定义在一个 LinearLayout 中,但你为它提供了约束布局(ConstraintLayout)专用的属性(如 app:layout_constraintEnd_toEndOf="parent")。这些属性在 LinearLayout 中是无效的,因为 LinearLayout 使用的是线性排列逻辑,而不是约束。可以尝试将 LinearLayout 改为其他适合使用约束属性的布局(如 ConstraintLayout),或去除冗余的属性,只使用 LinearLayout 支持的属性。 不过在sample中,RadarWidget里大部分代码都被注释了,已经不可用了,这个控件更新了,新的控件叫做HorizontalSituationIndicatorWidget 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • 请求 #134923“UXSDK 不显示”已被关闭,并已合并到此请求。请求 #134923 中的最后评论: 为什么这个控件在手机上不显示呢,还有其他很多控件也不显示,是因为没有连接无人机吗?
    0
    Comment actions Permalink
  • 修改后,还是没有任何显示
    0
    Comment actions Permalink
  • ccc
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="start"
    android:orientation="vertical"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent">

    <dji.v5.ux.core.widget.airsense.AirSenseWidget
    android:id="@+id/widget_air_sense"
    android:layout_width="22dp"
    android:layout_weight="1"
    android:layout_height="wrap_content" />


    <dji.v5.ux.core.widget.battery.BatteryWidget
    android:id="@+id/widget_battery"
    android:layout_width="100dp"
    android:layout_height="200dp"
    android:layout_weight="2"
    app:uxsdk_voltageVisibility="true"
    android:visibility="visible"

    />
    <dji.v5.ux.core.widget.hsi.HorizontalSituationIndicatorWidget
    android:layout_width="340dp"
    android:layout_height="160dp"
    android:layout_weight="2"
    android:visibility="visible" />

    </LinearLayout> 只有最下面一个控件显示出来了

     

    0
    Comment actions Permalink

Please sign in to leave a comment.