草庐IT

graphical-layout-editor

全部标签

android - 找不到应用程序 :layout_scrollflags from CollapsingToolbarLayout 的资源 ID

这个问题的标题基本上说明了一切。我得到错误:从CollapsingToolbarLayout中找不到app:layout_scrollflags的资源标识符。我使用eclipse并导入了设计库jar文件。我可以在我的类(class)中使用设计支持布局,这是正确的这是我使用的一段代码:示例:http://android-developers.blogspot.in/2015/05/android-design-support-library.html 最佳答案 只导入设计库jar文件是不够的。您需要导入android-design-l

android - 找不到应用程序 :layout_scrollflags from CollapsingToolbarLayout 的资源 ID

这个问题的标题基本上说明了一切。我得到错误:从CollapsingToolbarLayout中找不到app:layout_scrollflags的资源标识符。我使用eclipse并导入了设计库jar文件。我可以在我的类(class)中使用设计支持布局,这是正确的这是我使用的一段代码:示例:http://android-developers.blogspot.in/2015/05/android-design-support-library.html 最佳答案 只导入设计库jar文件是不够的。您需要导入android-design-l

android - 设置应用程序 :layout_behavior programmatically

我有一个带有recyclerview的协调器布局,我想以编程方式添加它。以编程方式添加它的原因是因为膨胀协调器布局的不同fragment可能使用不同类型的回收View。通常对于回收View,为了设置此行为,我会将其添加到xml中:app:layout_behavior="@string/appbar_scrolling_view_behavior"效果很好。但是,当我以编程方式创建回收站View然后将它们添加到框架布局时,我完全不知道如何添加此行为: 最佳答案 说明Behavior是CoordinatorLayout.LayoutP

android - 设置应用程序 :layout_behavior programmatically

我有一个带有recyclerview的协调器布局,我想以编程方式添加它。以编程方式添加它的原因是因为膨胀协调器布局的不同fragment可能使用不同类型的回收View。通常对于回收View,为了设置此行为,我会将其添加到xml中:app:layout_behavior="@string/appbar_scrolling_view_behavior"效果很好。但是,当我以编程方式创建回收站View然后将它们添加到框架布局时,我完全不知道如何添加此行为: 最佳答案 说明Behavior是CoordinatorLayout.LayoutP

android - parseSdkContent 失败无法初始化类 android.graphics.Typeface

当我打开布局编辑器时,eclipse出现此错误:parseSdkContentfailedCouldnotinitializeclassandroid.graphics.Typeface当我尝试运行项目时,它给出了这个错误:Aninternalerroroccurredduring:"Launchingmyapp".java.lang.NullPointerException每次我收到此错误时,我都必须重新启动Eclipse。有什么解决办法吗?今天突然出现这个问题。XML文件:错误图片: 最佳答案 我删除了home/.android

android - parseSdkContent 失败无法初始化类 android.graphics.Typeface

当我打开布局编辑器时,eclipse出现此错误:parseSdkContentfailedCouldnotinitializeclassandroid.graphics.Typeface当我尝试运行项目时,它给出了这个错误:Aninternalerroroccurredduring:"Launchingmyapp".java.lang.NullPointerException每次我收到此错误时,我都必须重新启动Eclipse。有什么解决办法吗?今天突然出现这个问题。XML文件:错误图片: 最佳答案 我删除了home/.android

Android - 尝试在空对象引用上调用虚拟方法 'void android.view.View.getBoundsOnScreen(android.graphics.Rect)'

我有一个这样的简单地址表格:Java:publicclassNewAddressActivityextendsAppCompatActivity{privateTextInputLayoutmStreetLayout;privateTextInputLayoutmNumberLayout;privateTextInputLayoutmNeighborhoodLayout;privateTextInputLayoutmCityLayout;privateTextInputLayoutmStateLayout;privateTextInputLayoutmCepLayout;private

Android - 尝试在空对象引用上调用虚拟方法 'void android.view.View.getBoundsOnScreen(android.graphics.Rect)'

我有一个这样的简单地址表格:Java:publicclassNewAddressActivityextendsAppCompatActivity{privateTextInputLayoutmStreetLayout;privateTextInputLayoutmNumberLayout;privateTextInputLayoutmNeighborhoodLayout;privateTextInputLayoutmCityLayout;privateTextInputLayoutmStateLayout;privateTextInputLayoutmCepLayout;private

android:layout_height 屏幕大小的 50%

我刚刚在LinearLayout中实现了一个ListView,但我需要定义LinearLayout的高度(它必须是屏幕高度的50%)。这可能吗?我为按钮和EditText做了类似的事情,但似乎不适用于布局。这是我的代码://capturethesizeofthedevicesscreenDisplaydisplay=getWindowManager().getDefaultDisplay();doublewidth=display.getWidth();//myEditTextwillbesmallerthanfullscreen(80%)doubledoubleSize=(width

android:layout_height 屏幕大小的 50%

我刚刚在LinearLayout中实现了一个ListView,但我需要定义LinearLayout的高度(它必须是屏幕高度的50%)。这可能吗?我为按钮和EditText做了类似的事情,但似乎不适用于布局。这是我的代码://capturethesizeofthedevicesscreenDisplaydisplay=getWindowManager().getDefaultDisplay();doublewidth=display.getWidth();//myEditTextwillbesmallerthanfullscreen(80%)doubledoubleSize=(width