【发布时间】:2019-12-29 01:31:08
【问题描述】:
我使用的是 1.3.0。
代码按预期运行,但为什么我在布局编辑器中看不到对象?我尝试过使用 RelativeLayout 和 ConstraintLayout。
当我使用库时,在布局编辑器中集成特定项目小部件有什么魔力?
我尝试过干净的项目,与 gradle 同步并构建。 缺少什么?
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.github.anastr.speedviewlib.SpeedView
android:id="@+id/speedView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
【问题讨论】:
-
只是为了测试用一些
"100dp"替换<com.github.anastr.speedviewlib.SpeedView中的"wrap_content",有什么区别吗? -
没有区别。我想知道什么?表示在组件树中(快照)?
-
?是什么意思? -
查看快照:在组件树中它显示了 speedView 对象。有一个?这让我觉得我错过了整合中的一些东西。在“添加对象”中相同,我搜索 SpeedView 但没有找到?
-
整合?在
<com.github.anastr.speedviewlib.SpeedView中将鼠标移动到SpeedView部分并执行Ctrl-left click,它会转到SpeedView来源吗?
标签: android android-layout android-studio