Android中返回上一个Fragment

上传者: u012511706 | 上传时间: 2021-08-10 01:10:05 | 文件大小: 2.48MB | 文件类型: ZIP
一个点击手机返回键后回到前一个Fragment的最简单的demo,里面有关键代码的说明,以及Android中栈应用的基本操作

文件下载

资源详情

[{"title":"( 67 个子文件 2.48MB ) Android中返回上一个Fragment","children":[{"title":"fragmentgoback","children":[{"title":".project <span style='color:#111;'> 850B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 868B </span>","children":null,"spread":false},{"title":"dexedLibs","children":[{"title":"appcompat_v7-2fe1ae63a01959e8217f623737bcf770.jar <span style='color:#111;'> 166B </span>","children":null,"spread":false},{"title":"android-support-v4-70ca553f757a52d16882122729a0e52d.jar <span style='color:#111;'> 267.35KB </span>","children":null,"spread":false},{"title":"android-support-v7-appcompat-eaa0ebab2105722ef0d250006e7e7460.jar <span style='color:#111;'> 147.04KB </span>","children":null,"spread":false}],"spread":true},{"title":"fragmentgoback.apk <span style='color:#111;'> 812.55KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"crunch","children":[{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 17.47KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"resources.ap_ <span style='color:#111;'> 377.15KB </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"android","children":[{"title":"support","children":[{"title":"v7","children":[{"title":"appcompat","children":[{"title":"R$string.class <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 5.07KB </span>","children":null,"spread":false},{"title":"R$bool.class <span style='color:#111;'> 763B </span>","children":null,"spread":false},{"title":"R$anim.class <span style='color:#111;'> 629B </span>","children":null,"spread":false},{"title":"R$styleable.class <span style='color:#111;'> 6.39KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 9.36KB </span>","children":null,"spread":false},{"title":"R$color.class <span style='color:#111;'> 594B </span>","children":null,"spread":false},{"title":"R$integer.class <span style='color:#111;'> 445B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 5.02KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"com","children":[{"title":"example","children":[{"title":"fragmentgoback","children":[{"title":"R$string.class <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"MainActivity.class <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 5.10KB </span>","children":null,"spread":false},{"title":"R$bool.class <span style='color:#111;'> 757B </span>","children":null,"spread":false},{"title":"R$anim.class <span style='color:#111;'> 623B </span>","children":null,"spread":false},{"title":"R$styleable.class <span style='color:#111;'> 6.56KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 987B </span>","children":null,"spread":false},{"title":"Fragment2.class <span style='color:#111;'> 796B </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 9.42KB </span>","children":null,"spread":false},{"title":"R$color.class <span style='color:#111;'> 588B </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 361B </span>","children":null,"spread":false},{"title":"Fragment1.class <span style='color:#111;'> 796B </span>","children":null,"spread":false},{"title":"R$integer.class <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 5.01KB </span>","children":null,"spread":false},{"title":"MainActivity$1.class <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"R.txt <span style='color:#111;'> 29.95KB </span>","children":null,"spread":false},{"title":"classes.dex <span style='color:#111;'> 1.46MB </span>","children":null,"spread":false}],"spread":true},{"title":"ic_launcher-web.png <span style='color:#111;'> 50.19KB </span>","children":null,"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 868B </span>","children":null,"spread":false},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 740.94KB </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"example","children":[{"title":"fragmentgoback","children":[{"title":"Fragment1.java <span style='color:#111;'> 491B </span>","children":null,"spread":false},{"title":"MainActivity.java <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"Fragment2.java <span style='color:#111;'> 491B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"project.properties <span style='color:#111;'> 607B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"values","children":[{"title":"styles.xml <span style='color:#111;'> 699B </span>","children":null,"spread":false},{"title":"strings.xml <span style='color:#111;'> 177B </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"activity_main.xml <span style='color:#111;'> 627B </span>","children":null,"spread":false},{"title":"fragment2.xml <span style='color:#111;'> 452B </span>","children":null,"spread":false},{"title":"fragment1.xml <span style='color:#111;'> 418B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-ldpi","children":null,"spread":false},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 331B </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 12.22KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false}],"spread":false},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 388B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"android","children":[{"title":"support","children":[{"title":"v7","children":[{"title":"appcompat","children":[{"title":"R.java <span style='color:#111;'> 40.12KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"com","children":[{"title":"example","children":[{"title":"fragmentgoback","children":[{"title":"R.java <span style='color:#111;'> 177.00KB </span>","children":null,"spread":false},{"title":"BuildConfig.java <span style='color:#111;'> 168B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"assets","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • qq_30698461 :
    亲测可用。
    2017-11-29
  • txl910514 :
    这个demo非常不错, 解决了我的问题
    2016-12-18
  • u013364701 :
    不错的代码,学习了
    2016-08-25
  • yezisuifengbiao :
    看代码简单明了
    2015-11-04
  • myvar :
    亲测可用。
    2015-03-23

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明