网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
08月09日漏签0天
android开发吧 关注:225,942贴子:948,963
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 4回复贴,共1页
<<返回android开发吧
>0< 加载中...

Android开发【03-22求助贴】点击事件

  • 只看楼主
  • 收藏

  • 回复
  • ywz小七
  • 二年级
    5
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
用点击底部导航条事件,显示相应页面PagerView,点击事件发生了,页面却没有转跳,这是怎么回事,本人用的是管理器
public void Show(int index){
FragmentManager manager = getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
//返回字体颜色
resetTextView();
if (currentIndex == index) {
return;
}
switch (index) {
case 0:
if (buFragment == null) {
buFragment = new BuFragment();
transaction.add(R.id.pager_main, buFragment);
}
transaction.show(buFragment);
break;
case 1:
if (mfFragment == null) {
mfFragment = new MfFragment();
transaction.add(R.id.pager_main, mfFragment);
}
transaction.show(mfFragment);
break;
case 2:
if(amFragment==null) {
amFragment = new AmFragment();
transaction.add(R.id.pager_main, amFragment);
}
transaction.show(amFragment);
break;
case 3:
if (moreFragment == null) {
moreFragment = new MoreFragment();
transaction.add(R.id.pager_main, moreFragment);
}
transaction.show(moreFragment);
break;
}
switch(currentIndex){
case 0:
if(buFragment!=null)transaction.hide(buFragment);
break;
case 1:if(mfFragment!=null)transaction.hide(mfFragment);
break;
case 2:if(amFragment!=null)transaction.hide(amFragment);
break;
case 3:if(moreFragment!=null)transaction.hide(moreFragment);
break;
}
transaction.commit();
currentIndex=index;
}
}
这是报错信息
E/GED: Failed to get GED Log Buf, err(0)
W/MALI: gles_context_new:222: [MALI]ctx init(phase:7) takes more than 20ms here. Elapse time(us): 34345
E/libPowerStretch: LUCID_1 (1490142889342) PowerXtend Common Architecture Integration Call - libinput.so
E/libPowerStretch: LUCID_1 (1490142912864) PowerXtend identified package name: com.example.administrator.myhealth. Application is not handled by PowerXtend
Application terminated.


  • ywz小七
  • 二年级
    5
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
Application is not handled by PowerXtend


2025-08-09 04:01:25
广告
不感兴趣
开通SVIP免广告
  • ywz小七
  • 二年级
    5
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
Application is not handled by PowerXtend 错误提示
!


  • 令仪sj
  • 托儿所
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
楼主解决了吗


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 4回复贴,共1页
<<返回android开发吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示