ICode9

精准搜索请尝试: 精确搜索
  • 在Android中实现滑动叠加面板的最简单方法2019-11-22 01:27:07

    我需要最简单的方法为我的应用程序实现滑动覆盖面板. 这是我想做的: 我在主要活动中有一个图像的网格视图,当用户单击一个图像时,滑动叠加层从屏幕顶部下降到显示图像细节并部分隐藏网格视图内容的一半,我进行了大量搜索并找到了这些图像文章; > Using FrameLayout,> SlidingUp Libra

  • 在Android上打开键盘时如何隐藏广告横幅2019-11-19 19:36:00

    我将MoPubView用于我的应用中的广告.但是,当我打开键盘时,该横幅会升起并关闭小部件. 这是来自布局的代码: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/container

  • 从MainActivity调用TextView到Android中的Fragment2019-11-19 05:26:51

    是否可以将MainActivity控件TextView调用为Fragment?我不知道这是否可行. 有DrawerLayout,它包含TextView.验证布局包含TextView. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawerLayout" a

  • Android-无法将android.widget.ImageView强制转换为android.view.ViewGroup2019-10-27 20:27:39

    试图在模拟比萨表单上获取比萨徽标的背景. 出于某种原因,我不断收到错误消息. 这是布局xml: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_heig

  • Android框架布局点击侦听器不起作用2019-10-25 16:34:10

    我有一个带有两个嵌套的LinearLayouts的FrameLayout.我想要一个用于框架布局的onClickListener().搜索后,我得到了一个解决方案clickable =“ false”. 这是我的布局文件: <FrameLayout android:id="@+id/flOuter" android:paddingLeft="@dimen/half_margin" android:p

  • java-是否可以将按钮添加到以编程方式设置的框架布局中?2019-10-12 10:01:56

    这有点难以描述,但我会尽力而为: 我正在开发一个使用自定义摄像头活动的android应用.在此摄影机活动中,我使用编程方式创建一个表面视图,并将其设置为xml布局文件中定义的框架布局(全屏显示). 我现在的问题是,如何在框架布局中添加其他元素?仅以编程方式?我问是因为到目前为止,我只能

  • android-如何在运行时将两个片段一起添加到frameLayout中2019-10-12 02:34:32

    我正在开发带有导航抽屉的andorid应用程序,并且我有一个contentview的布局,如下所示: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_pare

  • android – requestWindowFeature(Window.FEATURE_NO_TITLE);导致应用程序崩溃?2019-10-02 22:24:15

    添加此行时,应用程序崩溃 `requestWindowFeature(Window.FEATURE_NO_TITLE); 可能解决方案很简单,但我真的不知道该修复它的人. Java代码: public class GLSurfaceCameraSurfaceDemo2Activity extends Activity { /** Called when the activity is first created. */ GLSurfaceVie

  • java – 如何通过拖放将图像保留在布局中2019-10-01 10:02:15

    我有以下XML: <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/palette2" android:id="@+id/fl" > <ImageView android

  • java – 尝试findViewById时抛出Nullpointerexception2019-09-28 05:27:44

    我有以下活动: public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState == null) {

  • android – 将帧布局转换为图像并保存2019-09-23 21:23:19

    任何人都可以帮助我知道如何将FrameLayout的内容捕获到图像中并将其保存到内部或外部存储.解决方法:尝试将视图(framelayout)转换为位图: public Bitmap viewToBitmap(View view) { Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB

  • android – 在FrameLayout中切换视图2019-09-03 10:26:29

    如何在FrameLayout中的视图之间切换?例如,我在FrameLayout中有一个SurfaceView,我希望它在游戏结束时显示DialogBox以接收用户文本输入.我假设DialogBox将被存储为FrameLayout中的另一个视图,但我该如何实际显示它?我需要从SurfaceView中调用它,因为当SurfaceView中发生某些事情时,需

  • android – 如何在活动视图中重绘画布2019-09-01 00:23:42

    我有一个扩展View的类,并实现了onDraw方法 在我的xml文件中,我有一个带有我视图的FrameLayout和一个带按钮的RelativeLayout <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_wid

  • 当孩子被提升时,Android FrameLayout z-index问题2019-08-28 23:25:28

    我有以下Android XML布局文件: <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/AutoComplete_marginSides" android:layout_marg

  • android – 从FrameLayout中删除前景视图2019-08-24 22:29:01

    我正在使用以下命令在frameLayout上绘制边框: frameLayout.setForeground(getResources().getDrawable(R.drawable.blue_border)); 现在我想删除这个前景drawable ..我怎么能这样做?解决方法:传递null作为参数应该足够了: frameLayout.setForeground(null);

  • 当在FrameLayout中查看时,layout_marginLeft在Android API <11上正常工作2019-07-29 04:25:26

    当我使用layout_marginLeft或从代码设置左边距时,它可以作为layout_marginRight使用.当我在FrameLayout中放置View with layout_marginLeft或在Android API上放置布局根目录时,会出现此行为. 11. <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://sche

  • android – 如何在主屏幕小部件中包含CardView2019-07-27 10:36:28

    我正在尝试构建一个具有多个时钟(不同区域)的简单主屏幕小部件.设计方面,我想使用CardView(例如谷歌搜索栏)作为根布局元素,但由于小部件不支持,我该如何复制它?我可以以某种方式使用其父类,即帧布局吗?解决方法:您可以使用受支持的视图类并将背景drawable设置为此处定义的card_drawa

  • Android:FrameLayout的自定义边框2019-07-22 17:23:47

    我正在尝试向framelayout添加自定义边框. framelayout用作片段的容器.因此,我想显示带边框的片段.边框应该在framelayout外部,不应占用framelayout内部的空间.它应该根据屏幕尺寸的变化进行调整. 我现在能想到的是某种自定义ViewGroup,为边框添加ImageView.使用图像处理来获取image

  • android – 线性布局内的两个框架布局2019-07-17 16:33:58

    这是我现在的代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_paren

  • android – 在Activity中获取Fragment实例2019-07-13 11:23:31

    I have added Fragment to Activity like getSupportFragmentManager().beginTransaction() .add(R.id.container,new MyFragment).commit(); 其中container是FrameLayout的id <FrameLayout android:id="@+id/container"

  • Android:如何在不保留纵横比的情况下缩放图像以填充LinearLayout的背景?2019-06-25 12:10:49

    我有一个像这样的RelativeLayout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/favoriteLinearLayout"

  • android – 无法在logcat上看到StrictMode的详细信息 – 屏幕旋转时抑制了StrictMode策略违规2019-06-23 03:22:34

    我的问题是这个,我试图理解这个跟踪的来源: 11-06 22:07:36.593 2744-3492/com.spot.spottester W/f: Suppressed StrictMode policy violation: StrictModeDiskReadViolation 11-06 22:07:36.594 2744-2744/com.spot.spottester W/f: Suppressed StrictMode policy violation: Str

  • android – 以编程方式将MATCH_PARENT用于FrameLayout中的RelativeLayout2019-06-12 14:10:48

    我正在继承Horizo​​ntalScrollView(这是一个FrameLayout)并以编程方式向它添加RelativeLayout. FrameLayout正确填充父视图,但内部的RelativeLayout不会显示. MainActivity:在OnCreate() setContentView(R.layout.activity_main); CustomHorizontalScrollView custom = new Cust

  • 以编程方式在framelayout中覆盖imageview上的文本 – Android2019-06-10 04:10:52

    我正在尝试在布局的中心和底部的framelayout中的图像上实现textview,如下所示: http://developer.android.com/resources/articles/layout-tricks-merge.html <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" a

  • android – 无法使视图覆盖FrameLayout中的另一个视图2019-06-09 07:11:56

    我想在我的Button上创建我的ImageView,但是无论我选择哪种布局或者我安排布局的方式,按钮都会覆盖ImageView,这是我尝试过的FrameLayout示例: 编辑: 只是为了简化我的问题:为什么FrameLayout不能正常工作? (您可以将此代码复制到Android Studio并亲眼看看) <?xml version="1.0" encodi

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有