Java Eclipse图形布局突然停止工作
突然,我的图形布局编辑器不会显示任何元素。除了所有的视图都是不可见的之外,一切看起来都很正常。这适用于所有项目和几乎所有控件 所以我可以标记任何按钮、布局等。它们周围有蓝色正方形,但它们不会渲染 我在谷歌上搜索过,但找不到任何解决办法。我想一定有人也有同样的问题。这才突然开始 我所有的布局都是白色的,如果拖放一个新控件(如按钮),它会添加到xml中,但不会显示 有人知道什么吗 手机上的布局完美无瑕。所以这只是一个Eclipse问题 这里有一个例子。 下面是它在图形布局中的外观(我需要隐藏标题):Java Eclipse图形布局突然停止工作,java,android,xml,eclipse,user-interface,Java,Android,Xml,Eclipse,User Interface,突然,我的图形布局编辑器不会显示任何元素。除了所有的视图都是不可见的之外,一切看起来都很正常。这适用于所有项目和几乎所有控件 所以我可以标记任何按钮、布局等。它们周围有蓝色正方形,但它们不会渲染 我在谷歌上搜索过,但找不到任何解决办法。我想一定有人也有同样的问题。这才突然开始 我所有的布局都是白色的,如果拖放一个新控件(如按钮),它会添加到xml中,但不会显示 有人知道什么吗 手机上的布局完美无瑕。所以这只是一个Eclipse问题 这里有一个例子。 下面是它在图形布局中的外观(我需要隐藏标题)
第一件事:在另一个驱动器中备份当前代码。可能是您的ADT捆绑包有问题,请尝试使用最新的。图形窗口下是否有任何错误消息?奇怪的是……有时自定义视图有问题,你能做一个屏幕截图吗?@Toph我是说Android渲染库版本:在
UI设计面板中右上角的coner Android徽标图标:version 4.0.3(15)
<TextView
android:id="@+id/timerSetup_exerciseName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/timer_setup_exercise_name"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#FFFFFF" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/border"
android:orientation="vertical"
android:layoutAnimation="@anim/views_animation" >
<TableRow
android:id="@+id/timerSetup_row1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<TextView
android:id="@+id/timerSetup_txtMaxReps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/max_reps_label"
android:textAppearance="?android:attr/textAppearanceSmall" />
</TableRow>
<TableRow
android:id="@+id/timerSetup_row2"
android:layout_width="match_parent"
android:minHeight="@dimen/exercise_table_row_height"
android:gravity="center_vertical" >
<TextView
android:id="@+id/timerSetup_repsLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="20dp"
android:text="@string/reps_metronome_label" />
<ToggleButton
android:id="@+id/timerSetup_metronomeToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOn="@string/on"
android:textOff="@string/off" />
</TableRow>
<TableRow
android:id="@+id/timerSetup_row3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/timer_setup_row_vertical_margin" >
<TextView
android:id="@+id/timerSetup_rpmLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rpm_min_label" />
<Spinner
android:id="@+id/timerSetup_rpm_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</TableRow>
</TableLayout>
</LinearLayout>
public TimerSetupView(Context context, AttributeSet attrs) {
super(context, attrs);
if (!isInEditMode()) {
_context = context;
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.timer_setup, this);