草庐IT

UIView-Encapsulated-Layout-Width

全部标签

安卓 : Show layout from the bottom of the screen on button click

最近我从名为walnut的Play商店安装了一个应用程序,在那里我看到了弹出的新功能。在主屏幕上有一个FloatingActionMenu,当单击菜单按钮时,它会展开并显示其上的项目,在顶部该扩展菜单中有一个用于添加帐户的选项,单击该选项时,弹出窗口将从屏幕底部到达一定高度。我想知道屏幕底部的弹出窗口使用什么功能。它真的是弹出式或滑动式抽屉吗?我想在我的android应用程序中使用完全相同的功能。如果有人知道此功能,请帮助我。下面是在核桃应用程序中单击按钮时弹出布局的屏幕截图。 最佳答案 您可以使用带有自定义布局的对话框。您唯一需要

android - 我如何解决 R.layout.main 无法在我的 android 应用程序中解析?

我是一名Android应用开发新手。我发现一个问题。那就是R.layout.main无法解析。我该如何解决我的问题。我的代码在这里。请解决我的问题。packagecom.android;importandroid.R;importandroid.app.Activity;importandroid.content.Intent;importandroid.os.Bundle;importandroid.view.View;importandroid.widget.Button;publicclassHelloActivityextendsActivity{/**Calledwhenth

android - 缺少必需的 layout_width 和 layout_height 属性

我有以下布局xml:但是我一直收到这个错误:缺少必需的layout_width和layout_height属性这是在第2、9、10行报告的。这看起来很奇怪。这是我试图复活的一个旧项目(>5年)。 最佳答案 我认为menu布局在res/layout中无效,您需要将其放置在res/menu中,如documentation中所述Todefinethemenu,createanXMLfileinsideyourproject'sres/menu/directoryandbuildthemenuwiththefollowingelements

android - 移动到 Android 设计支持 v23 后,TabLayout 样式无法解析 @dimen/tab_max_width

在迁移到Android设计支持v23.0.0后,AndroidStudio无法构建一个使用Android设计支持v22.2.1构建良好的项目:找不到与给定名称匹配的资源(在“tabMaxWidth”处,值为“@dimen/tab_max_width”)。这是怎么回事? 最佳答案 简而言之:您可能只需要在这些值前加上“design_”。很高兴你问,帅哥。v23.0.0更改了一堆值,这里是v22.2.1中的旧值:#FFDD2C00#0A000000#0F000000#1AFFFFFF#2EFFFFFF@android:color/tra

Android AltBeacon 库 : how to find the beacon layout?

我正在测试一种新型的信标,这是我从调试中得到的结果:onScanResult()-ScanResult{mDevice=20:73:2A:09:3E:41,mScanRecord=ScanRecord[mAdvertiseFlags=26,mServiceUuids=null,mManufacturerSpecificData={76=[2,21,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,0,5,0,10,-40]},mServiceData={},mTxPowerLevel=-2147483648,mDeviceName=null

android - 如何在android中隐藏一个Layout控件

我正在使用以下代码为线性布局设置“visibility=gone”//onCreatemethod//setcontentview....LinearLayoutrlayout1=(LinearLayout)findViewById(R.id.readerBottomLayout);rlayout1.setVisibility(2);但是当Activity运行时控件仍然可见。为什么?有什么想法吗? 最佳答案 设置rlayout1.setVisibility(View.INVISIBLE)

android - 是什么导致 "RuntimeException: Binary XML file line #20: You must supply a layout_height attribute."(怀疑是ActionBarSherlock)?

我有带ActionBarScherlock的应用程序,我使用ACRA。我收到一些用户的崩溃报告,其中包含以下错误:"java.lang.RuntimeException:BinaryXMLfileline#20:Youmustsupplyalayout_heightattribute.atandroid.content.res.TypedArray.getLayoutDimension(TypedArray.java:491)atandroid.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3602)atand

在约束layout中使用ViewStub,而ViewStub未充气时,相对定位更改为“父”

我使用如下示例的视图之间使用相对定位。https://developer.android.com/reference/android/support/constraint/constraint/constraintlayout.html#relativePositioning就我而言,按钮A是一个ViewStub,它在特定情况下膨胀。如果按钮A不会夸大。然后,按钮B的相对定位将更改为“父”。当按钮A未充气时,按钮B的相对定位可能会更改为“按钮A的相对定位”?看答案为了重申您的视图A和B。通常,如果A膨胀,则(例如)左B连接到A.|<-[a]<-[b]如果A未充气,则将其视为消失。它

android - android :layout_alignRight ="ID" and android:layout_toRightOf ="ID"?有什么区别

android:layout_alignRight="@id/someId"和android:layout_toRightOf="@id/someId"有什么区别? 最佳答案 这张图片将解释不同之处: 关于android-android:layout_alignRight="ID"andandroid:layout_toRightOf="ID"?有什么区别,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.co

ffmpeg将图片转换为视频报错:width not divisible by 2(原因:H.264使用4x4和16x16的块进行编码,输入图像宽度或者高度需要能被2整除)图片转视频

文章目录用ffmpeg将图片转换为视频报错了原因我把图片长宽调整为能被2整除的大小,果然可以了用ffmpeg将图片转换为视频报错了我有一张图片,需要把它转换为一个mp4h.264编码视频,我用ffmpeg转换,但是过程中报错了:ffmpeg-loop1-iLena_Soderberg.jpg-c:vlibx264-t10output.mp4提示:[libx264@0x5573424b8980]widthnotdivisibleby2(497x373)Errorinitializingoutputstream0:0--Errorwhileopeningencoderforoutputstream