Android的XML视图并不在Eclipse中显示切换按钮 [英] android XML view Does not display ToggleButton in Eclipse

查看:780
本文介绍了Android的XML视图并不在Eclipse中显示切换按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid XML图形布局,我无法显示我的切换按钮。我收到一些错误(见下文)。另外,我不能编辑任何其他使用图形布局。

<的RelativeLayout的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    的xmlns:工具=htt​​p://schemas.android.com/tool​​s
    机器人:layout_width =match_parent
    机器人:layout_height =match_parent
    机器人:paddingBottom会=@扪/ activity_vertical_margin
    机器人:paddingLeft =@扪/ activity_horizo​​ntal_margin
    机器人:paddingRight =@扪/ activity_horizo​​ntal_margin
    机器人:paddingTop =@扪/ activity_vertical_margin
    工具:上下文=com.thunder4apps.lanterna.corinthians.MainActivity>    <切换按钮
    机器人:ID =@ + ID /切换按钮
    机器人:layout_width =WRAP_CONTENT
    机器人:layout_height =WRAP_CONTENT
    机器人:纹元=震动的
    机器人:textOff =振动关闭
    安卓的onClick =onToggleClicked/>
< / RelativeLayout的>

错误:

渲染过程中提出的异常:-1
异常详细信息记录在窗口>显示视图>错误LogThe图形$在布局编辑器p $ PVIEW可能不准确:
不同角尺寸不Path.addRoundRect支持。 (忽略此会话)
不支持Path.isConvex。 (忽略此会话)


解决方案

转到您的图形布局和定位的下降,可能是你使用的是最后一个21 API级别的下降,你没有必要安装,根据您的应用程序切换到另一个杠杆。

In my android XML Graphical Layout, I am unable to display my ToggleButton. I receive some errors (see below). Also, I am not able to edit anything else using the Graphical Layout.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.thunder4apps.lanterna.corinthians.MainActivity" >



    <ToggleButton 
    android:id="@+id/togglebutton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textOn="Vibrate on"
    android:textOff="Vibrate off"
    android:onClick="onToggleClicked"/>


</RelativeLayout>

Error :

Exception raised during rendering: -1
Exception details are logged in Window > Show View > Error LogThe graphics preview in the layout editor may not be accurate:
Different corner sizes are not supported in Path.addRoundRect. (Ignore for this session)
Path.isConvex is not supported. (Ignore for this session)

解决方案

Go to your graphical layout and locate the drop down of the API levels, probably you are using the last one 21, and you don´t have it installed, change to other lever according to your app.

这篇关于Android的XML视图并不在Eclipse中显示切换按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆