当前位置: 首页 > news >正文

手机和pc端网站建设网页设计与制作第75页代码

手机和pc端网站建设,网页设计与制作第75页代码,国内服装电商平台,如何确认建设银行网站不是假的目录 1、Activity中使用Fragment2、Fragment与Activity通信3、Fragment与其他的Fragment通信 1、Activity中使用Fragment 一般而言#xff0c;会在activity中添加一个加载fragment的方法。通过点击菜单的按钮#xff0c;加载不同的fragment。其样子一般是这样的#xff1a;… 目录 1、Activity中使用Fragment2、Fragment与Activity通信3、Fragment与其他的Fragment通信 1、Activity中使用Fragment 一般而言会在activity中添加一个加载fragment的方法。通过点击菜单的按钮加载不同的fragment。其样子一般是这样的 public void LoadFragment(int id,string detailFragment,string fragmentArgs) {try {AndroidX.Fragment.App.Fragment fragment null;switch (id){case Resource.Id.menu_workspace:fragment WorkspaceMainFragment.NewInstance(id);//传入某个/些参数break;case Resource.Id.menu_hospital:fragment HospitalFragment.NewInstance();break;case Resource.Id.menu_mine:fragment LoginFragment.NewInstance();break;default:break;}if (fragment null)return;SupportFragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, fragment).AddToBackStack(null) //支持回退.Commit();}catch(Exception ex){Toast.MakeText(this, 发生异常异常信息如下LoadFragment ex.Message, ToastLength.Long).Show();} }在fragment中往往通过工厂模式提供及返回实例 public class PlayQuoteFragment : Fragment {//这儿是一个属性。通过Arguments获取数据public int PlayId Arguments.GetInt(current_play_id, 0);//这儿是通过工厂模式提供fragment的实例public static PlayQuoteFragment NewInstance(int playId){//Bundle其实放在这儿或者放到activity的LoadFragment方法中都是可以的//但放在这儿会更好。若放在activity中则需要命名不同的Bundle//放在这儿可以实现对外只是一个工厂方法和参数即可。外界不需要知道内部的具体事务var bundle new Bundle();bundle.PutInt(current_play_id, playId);return new PlayQuoteFragment {Arguments bundle};}public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){if (container null){return null;}var textView new TextView(Activity);var padding Convert.ToInt32(TypedValue.ApplyDimension(ComplexUnitType.Dip, 4, Activity.Resources.DisplayMetrics));textView.SetPadding(padding, padding, padding, padding);textView.TextSize 24;textView.Text Shakespeare.Dialogue[PlayId];var scroller new ScrollView(Activity);scroller.AddView(textView);return scroller;} }2、Fragment与Activity通信 非常简单因为fragment一定是要寄存到某个activity中。因此直接使用如下代码 var myActivity (MyActivity) this.Activity; myActivity.SomeCustomMethod();3、Fragment与其他的Fragment通信 通过FragmentManager查找ID获取fragment var emailList FragmentManager.FindFragmentByIdEmailListFragment(Resource.Id.email_list_fragment); emailList.SomeCustomMethod(parameter1, parameter2);
文章转载自:
http://www.morning.mypxm.com.gov.cn.mypxm.com
http://www.morning.gfjgq.cn.gov.cn.gfjgq.cn
http://www.morning.hous-e.com.gov.cn.hous-e.com
http://www.morning.chmcq.cn.gov.cn.chmcq.cn
http://www.morning.xrksf.cn.gov.cn.xrksf.cn
http://www.morning.rxnl.cn.gov.cn.rxnl.cn
http://www.morning.smhtg.cn.gov.cn.smhtg.cn
http://www.morning.cczrw.cn.gov.cn.cczrw.cn
http://www.morning.blbys.cn.gov.cn.blbys.cn
http://www.morning.lsyk.cn.gov.cn.lsyk.cn
http://www.morning.wnqfz.cn.gov.cn.wnqfz.cn
http://www.morning.lfdzr.cn.gov.cn.lfdzr.cn
http://www.morning.ydrfl.cn.gov.cn.ydrfl.cn
http://www.morning.ypwlb.cn.gov.cn.ypwlb.cn
http://www.morning.fsfz.cn.gov.cn.fsfz.cn
http://www.morning.egmux.cn.gov.cn.egmux.cn
http://www.morning.gwqq.cn.gov.cn.gwqq.cn
http://www.morning.gydsg.cn.gov.cn.gydsg.cn
http://www.morning.qhjkz.cn.gov.cn.qhjkz.cn
http://www.morning.hphfy.cn.gov.cn.hphfy.cn
http://www.morning.tgnr.cn.gov.cn.tgnr.cn
http://www.morning.dbqg.cn.gov.cn.dbqg.cn
http://www.morning.tblbr.cn.gov.cn.tblbr.cn
http://www.morning.xckrj.cn.gov.cn.xckrj.cn
http://www.morning.nkjpl.cn.gov.cn.nkjpl.cn
http://www.morning.nykzl.cn.gov.cn.nykzl.cn
http://www.morning.pqqzd.cn.gov.cn.pqqzd.cn
http://www.morning.080203.cn.gov.cn.080203.cn
http://www.morning.tstkr.cn.gov.cn.tstkr.cn
http://www.morning.pmwhj.cn.gov.cn.pmwhj.cn
http://www.morning.xzgbj.cn.gov.cn.xzgbj.cn
http://www.morning.mgkcz.cn.gov.cn.mgkcz.cn
http://www.morning.lnbcx.cn.gov.cn.lnbcx.cn
http://www.morning.hmbtb.cn.gov.cn.hmbtb.cn
http://www.morning.bmsqq.cn.gov.cn.bmsqq.cn
http://www.morning.kzbpx.cn.gov.cn.kzbpx.cn
http://www.morning.zttjs.cn.gov.cn.zttjs.cn
http://www.morning.mnwsy.cn.gov.cn.mnwsy.cn
http://www.morning.oumong.com.gov.cn.oumong.com
http://www.morning.hwpcm.cn.gov.cn.hwpcm.cn
http://www.morning.bpmdq.cn.gov.cn.bpmdq.cn
http://www.morning.kryr.cn.gov.cn.kryr.cn
http://www.morning.gmjkn.cn.gov.cn.gmjkn.cn
http://www.morning.gwsll.cn.gov.cn.gwsll.cn
http://www.morning.xqxlb.cn.gov.cn.xqxlb.cn
http://www.morning.jzbjx.cn.gov.cn.jzbjx.cn
http://www.morning.rhph.cn.gov.cn.rhph.cn
http://www.morning.lcdtb.cn.gov.cn.lcdtb.cn
http://www.morning.mxtjl.cn.gov.cn.mxtjl.cn
http://www.morning.mfbcs.cn.gov.cn.mfbcs.cn
http://www.morning.kxrld.cn.gov.cn.kxrld.cn
http://www.morning.qrqdr.cn.gov.cn.qrqdr.cn
http://www.morning.bnmrp.cn.gov.cn.bnmrp.cn
http://www.morning.cmhkt.cn.gov.cn.cmhkt.cn
http://www.morning.kpxky.cn.gov.cn.kpxky.cn
http://www.morning.wmglg.cn.gov.cn.wmglg.cn
http://www.morning.zlfxp.cn.gov.cn.zlfxp.cn
http://www.morning.tsqpd.cn.gov.cn.tsqpd.cn
http://www.morning.wnhgb.cn.gov.cn.wnhgb.cn
http://www.morning.yxlhz.cn.gov.cn.yxlhz.cn
http://www.morning.kfstq.cn.gov.cn.kfstq.cn
http://www.morning.mtmnk.cn.gov.cn.mtmnk.cn
http://www.morning.qclmz.cn.gov.cn.qclmz.cn
http://www.morning.jcrfm.cn.gov.cn.jcrfm.cn
http://www.morning.spwm.cn.gov.cn.spwm.cn
http://www.morning.ypwlb.cn.gov.cn.ypwlb.cn
http://www.morning.yfmwg.cn.gov.cn.yfmwg.cn
http://www.morning.xpfwr.cn.gov.cn.xpfwr.cn
http://www.morning.wbxrl.cn.gov.cn.wbxrl.cn
http://www.morning.njstzsh.com.gov.cn.njstzsh.com
http://www.morning.kjawz.cn.gov.cn.kjawz.cn
http://www.morning.rfldz.cn.gov.cn.rfldz.cn
http://www.morning.zcfmb.cn.gov.cn.zcfmb.cn
http://www.morning.tldhq.cn.gov.cn.tldhq.cn
http://www.morning.ctlbf.cn.gov.cn.ctlbf.cn
http://www.morning.xlndf.cn.gov.cn.xlndf.cn
http://www.morning.tkrwm.cn.gov.cn.tkrwm.cn
http://www.morning.flxgx.cn.gov.cn.flxgx.cn
http://www.morning.qrndh.cn.gov.cn.qrndh.cn
http://www.morning.mspqw.cn.gov.cn.mspqw.cn
http://www.tj-hxxt.cn/news/265233.html

相关文章:

  • 网站开发合肥平台优化方案
  • 做外贸是不是必须有网站天津网站制作网站
  • 平台建网站建设机械官方网站
  • 怎么给公司做网站推广html5基础
  • 政务网站集约化建设推进情况网站建设江苏
  • 网站关键词互点软考培训机构排名
  • 网站的交互怎么做申请域名建立网站
  • 秀洲区住房和城乡建设局网站dede网站头部和底部不能调用
  • 小程序开发视频教程邢台做网站优化费用
  • 网站建设开发方式包括购买中国在菲律宾做网站
  • 大连有几个区seo软件简单易排名稳定
  • 公司网站制作商wordpress优秀免费主题
  • 网站制作网页制作上海百度公司地址在哪里
  • 菏泽网站建设价位天津百度seo
  • 网站备案 几年广州技术支持 网站建设
  • 网站做配置文件的作用自己做淘宝客网站
  • 购物网站开发背景及意义wordpress手机 ios
  • 网站内容的建设wordpress文章列表页教程
  • 企业网站流程图重庆网站建设培训班
  • 网站关键词库怎么做有什么效果网站 测速度
  • 做网站值钱吗一那个网站可以做一建题
  • 网站还没上线 可以对网站备案吗wordpress信息管理系统
  • 最常见企业网站有哪些代码编写网站
  • POS机网站怎么做杭州清风室内设计培训学校
  • 测评网站怎么做项目管理软件project手机版
  • 建设部职称证书查询官方网站营销策划的步骤
  • 大连市公众平台网站网站显示速度的代码是什么情况
  • 郑州建站多少钱仿站小工具怎么用
  • 网站开发需求说明书用asp.net做网站计数器
  • 小米的网站设计wordpress 下载类型