腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Android
在
片段
中
添加
片段
android
、
android-fragments
、
kotlin
、
fragment
、
fragmenttransaction
我正在尝试
在
DialogFragment的子类
中
添加
一个
片段
。我有一个带有id pref_container的FrameLayout,我想用一个名为settingsFragment的
片段
替换它。问题是fragmentTransaction找不到R.id.pref_container,我不知道这是不是因为pref_container只
在
onCreateView
中
膨胀,而不是活动的一部分?我对
Android
编程非常陌生,所以感谢您的宝贵时间。> &l
浏览 23
提问于2019-02-20
得票数 0
回答已采纳
1
回答
Android
在
片段
中
添加
片段
android
、
android-fragments
、
android-nested-fragment
、
fragmentmanager
你好(谢谢), 我有一个类似Google商店布局的应用程序(使用带有5个子
片段
的PagerTabStrip )。在其中的一些
片段
中
,我需要显示一些关于上次更新数据的信息。我立即考虑创建一个
片段
(LastUpdatedFragment),然后将其
添加
(嵌套)到我需要的
片段
中
。一开始,由于上次更新的日期应该对每个屏幕都是相同的,所以一切都正常工作(我只是
在
我需要的父
片段
的xml
中
添加
了
片段</e
浏览 2
提问于2015-01-06
得票数 4
回答已采纳
2
回答
二进制XML文件第9行:二进制XML文件第9行:膨胀类
片段
时出错
java
、
android
、
xml
、
android-fragments
当我试图
添加
一个
片段
到我的类时,我一直收到这个错误,我不确定如何修复这个错误,我非常确定我
添加
的
片段
是正确的,但是当我试图运行它的时候,这个错误一直出现并使我的应用崩溃,你知道如何修复它吗?> <
android
.support.constraint.ConstraintLayout xmlns:
android
="http://schemas.
android
.com/apk/res/
andro
浏览 0
提问于2017-10-09
得票数 0
3
回答
Android
片段
与之前的视图和按钮侦听器重叠
android
、
android-fragments
我有一个活动A,里面有一个
片段
A。Fragment f = new FragB();ft.replace(R.id.FrameLayout1, f);
浏览 0
提问于2013-03-12
得票数 1
1
回答
如何在具有相同id的ViewPager
片段
中
添加
片段
,
在
视图寻呼机
中
添加
的每个
片段
都是相同的?
android
、
android-fragments
、
android-viewpager
、
fragment
我试图
在
另一个
片段
中
添加
一个
片段
,该
片段
被
添加
到视图寻呼机
中
。视图寻呼机内部的所有
片段
都是相同的。我只是在用刷卡看他们。
在
单击按钮时,我使用add
片段
在
我们的主
片段
中
添加
了一个
片段
。在这样做的时候,这个新的
片段
将被
添加
到视图寻呼机的最后一个
片段
中</
浏览 1
提问于2015-08-11
得票数 0
回答已采纳
2
回答
片段
中间(II):动态
在
片段
中
添加
行,
Android
java
、
android
、
android-fragments
、
android-tablelayout
我试图动态地将行
添加
到
片段
中
的表
中
。然而,我正面临一些运行时错误,并严重需要一些建议。
android
.view.LayoutInflater;import
android
.view.ViewGroup;import
android
.widget.EditText; import
and
浏览 3
提问于2014-03-31
得票数 1
回答已采纳
2
回答
ChildFragmentManager.findFragmentByID()
在
Android
4.4.2上返回null
android
、
android-fragments
、
android-4.4-kitkat
、
android-5.1.1-lollipop
、
child-fragment
我开发了一个应用程序,它使用
片段
作为
片段
的一部分。这段代码运行在
Android
5.1.1上,非常有魅力。但是,
在
Android
4.4.2上运行它,会在userNameFrage和passwordFrag
中
返回null。
在
4.4.3
中
使用getChildFragmentManager()时,有什么需要考虑的吗?<LinearLayout
android
:layou
浏览 3
提问于2015-09-03
得票数 5
回答已采纳
1
回答
在
Android
中
添加
FrameLayout
片段
java
、
android
、
switch-statement
、
fragment
现在,当我对
片段
进行事务处理时,它基本上使用了初学者事务。但是我
在
android
.app.FragmentManager fragmentManager = getFragmentManager();上得到了这个错误消息,我还尝试了
android
.support.v4
在
我的抽屉导航onClickListener` mNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelect
浏览 1
提问于2015-12-17
得票数 2
回答已采纳
1
回答
Android
:从
片段
中
向活动
添加
片段
android
、
android-fragments
当我单击Navigator
中
的一个按钮时,我想替换显示在内容框架
中
的
片段
。所以首先,我
在
我的导航器
中
创建了点击监听器: private Callbacks mCallbacks;mCallbacks.onFunctionSelected(1); }); } 然后
在
我的replace(R.id.content_
浏览 1
提问于2018-02-27
得票数 1
回答已采纳
4
回答
Android
在
片段
中
添加
Tab
android
、
tabs
、
fragment
我试图
在
片段
中
添加
一个TabHost,...The代码
在
片段
中
给出bellow.Here,我试图
添加
TabHost以显示两个选项卡 NewsFragment.class); spec = tabHost.newTabSpec("
Android
"
浏览 3
提问于2014-01-26
得票数 7
回答已采纳
1
回答
Android
添加
片段
android
、
android-fragments
回来后,我更新TextView以显示来自数据对象的文本,但是TextView
在
使用add方法时没有更新。当我使用replace时,它很好地工作,但出于某些原因,我必须使用add。希望你能帮忙谢谢。
浏览 2
提问于2014-01-14
得票数 0
1
回答
膨胀的活性
片段
android
、
android-fragments
我试图把碎片放大到这个活动
中
。" xmlns:
android
="http://schemas.
android
.com/apk/res/
android
"><fragment <e
浏览 2
提问于2017-11-16
得票数 3
回答已采纳
2
回答
android
.view.InflateException:二进制XML文件行#0:二进制XML文件行#0:错误充气类
片段
java
、
android
、
google-maps
我试图从我的主要活动启动Map活动,
在
调用Map活动之后我得到了以下错误: Process:Check that <meta-data
android
:name="com.google.
android
.geo.API_KEY"
android
:value="your API key"/> isfindFragmentById(R.id.map);
浏览 0
提问于2018-05-14
得票数 0
回答已采纳
3
回答
每个other...and上的
片段
重叠的
片段
正在单击
android
、
android-fragments
、
android-activity
我创建了一个应用程序,其中我有1活动和8
片段
,在其中,我将每个
片段
都膨胀到活动
中
。但我的问题是,每个
片段
都是相互重叠的,。我改变了每个
片段
的背景色,但是当我点击前一个
片段
的空白按钮时,会被点击。
浏览 1
提问于2019-03-04
得票数 3
回答已采纳
4
回答
将
片段
动态
添加
到
片段
中
android
、
android-fragments
我还没能找到一种方法来动态
添加
片段
到现有的动态
添加
的
片段
中
。你知道吗,如果可能的话?我是这样生成
片段
的:FragmentTransaction xact = fragMgr.beginTransactionfragMgr.findFragmentByTag(FRAG4_TAG)) {
浏览 0
提问于2011-10-27
得票数 19
回答已采纳
2
回答
未显示
在
活动顶部的
片段
android
、
android-fragments
当我
在
操作栏
中
单击一个项目时,我想显示一个
片段
,
在
代码
中
我这样做: public boolean onOptionsItemSelected(MenuItem itemView view = inflater.inflate(R.layout.boundary_maps, container, false); }<GridLayout xmlns:
android</e
浏览 3
提问于2014-08-31
得票数 1
回答已采纳
2
回答
如何在使用制表符和
片段
容器时识别活动的当前
片段
?
android
、
android-fragments
我想从我的活动
中
调用一个
片段
方法,描述如下所示: testFrag.testMethod("Test"); 如图所示,它们通过ID标识
片段
,这是
在
xml
中
设置的。因为我只有一个
片段
容器,所以我的
片段
布局
中</e
浏览 3
提问于2013-09-03
得票数 2
回答已采纳
8
回答
上一个
片段
在
新
片段
下可见
android
、
android-actionbar
、
android-viewpager
我有一个选项卡+ ViewPager布局,在其中一个选项卡
中
,我有一个列表视图。当我
在
onclick上替换该列表
片段
时,我仍然可以
在
新
片段
下看到旧
片段
。
浏览 46
提问于2013-05-20
得票数 29
回答已采纳
2
回答
片段
java.lang.ClassCastException误差
java
、
android
、
android-intent
、
android-fragments
、
android-activity
实际上,我正在尝试打开Activity上的“通过”按钮到
片段
活动。
Android
MainFest :LogCat:12-04 15:22:43.132: E/AndroidRuntime(25873): at
android
.app.Activ
浏览 4
提问于2013-12-04
得票数 0
回答已采纳
4
回答
FrameLayout上的
片段
重叠
android
、
android-fragments
、
android-framelayout
我正在尝试向一个FrameLayout
添加
多个
片段
。我需要把它们加在另一个下面。但它们是重叠的。<?>
android
:id="@+id/fragment_container" <
浏览 0
提问于2017-03-21
得票数 1
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券