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

浙江金圣建设有限公司网站怎么让关键词快速排名首页

浙江金圣建设有限公司网站,怎么让关键词快速排名首页,成都疫情最新新增,郑州网站建设的公司一、概念 类似于 ViewPager,1.4 版本之前需要借助 accompanis 库,底层基于 LazyColumn、LazyRow 实现,在使用上也基本相同。默认情况下 HorizontalPager 占据屏幕的整个宽度,VerticalPager 会占据整个高度。 fun HorizontalPager(…

一、概念

类似于 ViewPager,1.4 版本之前需要借助 accompanis 库,底层基于 LazyColumn、LazyRow 实现,在使用上也基本相同。默认情况下 HorizontalPager 占据屏幕的整个宽度,VerticalPager 会占据整个高度。

fun HorizontalPager(pageCount: Int,    //页面数量modifier: Modifier = Modifier,state: PagerState = rememberPagerState(),    //控制监听页面状态的对象contentPadding: PaddingValues = PaddingValues(0.dp),    //内容内边距pageSize: PageSize = PageSize.Fill,    //页面填充模式(填充满Fill,自适应Fixed)beyondBoundsPageCount: Int = 0,    //当前页面前后预加载的页面数量pageSpacing: Dp = 0.dp,    //两个页面之间的间隙verticalAlignment: Alignment.Vertical = Alignment.CenterVertically,flingBehavior: SnapFlingBehavior = PagerDefaults.flingBehavior(state = state),    //用于滚动后手势的flingBehavioruserScrollEnabled: Boolean = true,    //是否允许通过用户手势或辅助功能进行滚动(即使禁用PagerState.scroll,您仍然可以使用它以编程方式滚动)reverseLayout: Boolean = false,    //反转页面顺序key: ((index: Int) -> Any)? = null,    //表示项目的稳定且唯一的密钥。当您指定键时,滚动位置将根据键保持,这意味着如果您在当前可见项目之前添加/删除项目,则具有给定键的项目将保留为第一个可见项目。pageNestedScrollConnection: NestedScrollConnection = PagerDefaults.pageNestedScrollConnection(Orientation.Horizontal),    //一个嵌套的ScrollConnection,用于指示此Pager如何使用嵌套列表。默认行为将使Pager消耗所有嵌套的delta。pageContent: @Composable (page: Int) -> Unit
)

二、使用

2.1 简单使用

HorizontalPager(pageCount = 10,modifier = Modifier.size(100.dp)
) { page ->// 每一页的内容,比如显示个文本Text(text = "Page: $page",modifier = Modifier.fillMaxSize())
}

2.2 离屏加载更多页面

将 beyondBoundsPageCount 属性设为 >0 的整数,会在当前页面左右各加载相同数量的页面。

2.3 控制页面滚动

使用 rememberPagerState() 创建一个 PagerState 对象,并将其作为 state 参数传递给分页器。在 CoroutineScope 中对此状态调用 PagerState.scrollToPage(),带动画跳转使用 PagerState.animateScrollToPage()。

val pagerState = rememberPagerState( 10 )    //10是页面数量HorizontalPager(state = pagerState,modifier = Modifier.size(100.dp)
) { page ->Text(text = "Page: $page",modifier = Modifier.fillMaxSize())
}val coroutineScope = rememberCoroutineScope()
Button(modifier = Modifier.align(Alignment.BottomCenter),onClick = {coroutineScope.launch {pagerState.scrollToPage(5)
//            pagerState.animateScrollToPage(5)    //带动画跳转}}
) {Text("跳到页面5")
}

2.4 添加页面指示器

2.4.1 小圆点

通过 pagerState.pageCount 获取页面数量,并绘制自定义指示器。使用 pagerState.currentPage 获取当前显示页面的索引,改变对应指示器的颜色。

Row(modifier = Modifier.align(Alignment.BottomCenter).fillMaxWidth().padding(bottom = 2.dp),horizontalArrangement = Arrangement.Center
) {repeat(pagerState.pageCount) { index ->val color = if (pagerState.currentPage == index) Colors.black else Colors.grayBox(modifier = Modifier.padding(2.dp).clip(CircleShape).background(color).size(10.dp))}
}

2.4.2 Tab栏

@Composable
fun Demo() {val tabList = listOf("最新","广场","问答","项目")val pagerState = rememberPagerState { tabList.size }val coroutineScope = rememberCoroutineScope()Column(modifier = Modifier.fillMaxSize()) {TabRow(modifier = Modifier.padding(vertical = 10.dp).fillMaxWidth().height(20.dp),selectedTabIndex = pagerState.currentPage,containerColor = AppColors.transparent,indicator = {},divider = {}) {tabList.forEachIndexed { index, title ->Tab(text = { Text(text = title,fontSize = if (pagerState.currentPage == index) 15.sp else 15.sp,fontWeight = if (pagerState.currentPage == index) FontWeight.ExtraBold else FontWeight.Bold) },selected = pagerState.currentPage == index,selectedContentColor = AppTheme.colors.textPrimary,unselectedContentColor = AppTheme.colors.textSecondary,onClick = { coroutineScope.launch { pagerState.scrollToPage(index) } })}}HorizontalPager(state = pagerState,beyondBoundsPageCount = 1,pageSpacing = Dimension.contentMargin) { index ->when (index) {0 -> { NewestPage() }1 -> { SquarePage() }2 -> { QaPage() }3 -> { ProjectPage() }}}}
}


文章转载自:
http://colourable.c7623.cn
http://alloimmune.c7623.cn
http://written.c7623.cn
http://lousily.c7623.cn
http://transpirable.c7623.cn
http://trevet.c7623.cn
http://assonate.c7623.cn
http://filmstrip.c7623.cn
http://rhinopharyngitis.c7623.cn
http://valance.c7623.cn
http://treblinka.c7623.cn
http://iconology.c7623.cn
http://orpington.c7623.cn
http://chuckhole.c7623.cn
http://acetarious.c7623.cn
http://varnish.c7623.cn
http://inverter.c7623.cn
http://tropic.c7623.cn
http://colette.c7623.cn
http://poussin.c7623.cn
http://nesistor.c7623.cn
http://initio.c7623.cn
http://della.c7623.cn
http://cinchonidine.c7623.cn
http://missus.c7623.cn
http://diomedes.c7623.cn
http://dominie.c7623.cn
http://hemorrhoids.c7623.cn
http://tubbish.c7623.cn
http://tourane.c7623.cn
http://zamarra.c7623.cn
http://auditive.c7623.cn
http://extern.c7623.cn
http://calipers.c7623.cn
http://insurmountable.c7623.cn
http://vibraculum.c7623.cn
http://oneirology.c7623.cn
http://sablefish.c7623.cn
http://charmeuse.c7623.cn
http://orfe.c7623.cn
http://candescent.c7623.cn
http://bonzer.c7623.cn
http://howrah.c7623.cn
http://absolutely.c7623.cn
http://derivatively.c7623.cn
http://sheerly.c7623.cn
http://semifinished.c7623.cn
http://wergild.c7623.cn
http://pushpin.c7623.cn
http://vsf.c7623.cn
http://contradistinction.c7623.cn
http://contraceptive.c7623.cn
http://depraved.c7623.cn
http://untapped.c7623.cn
http://magnetodisk.c7623.cn
http://hypogastria.c7623.cn
http://microlithic.c7623.cn
http://monstrance.c7623.cn
http://reticle.c7623.cn
http://sonet.c7623.cn
http://participance.c7623.cn
http://copartner.c7623.cn
http://signification.c7623.cn
http://duma.c7623.cn
http://acanthaster.c7623.cn
http://humiliate.c7623.cn
http://con.c7623.cn
http://bushel.c7623.cn
http://filiate.c7623.cn
http://mundic.c7623.cn
http://individual.c7623.cn
http://oyez.c7623.cn
http://trinidad.c7623.cn
http://incentive.c7623.cn
http://huckaback.c7623.cn
http://xylanthrax.c7623.cn
http://guatemala.c7623.cn
http://unimodal.c7623.cn
http://means.c7623.cn
http://chalybeate.c7623.cn
http://turbine.c7623.cn
http://eddy.c7623.cn
http://subaverage.c7623.cn
http://navar.c7623.cn
http://jingled.c7623.cn
http://childrenese.c7623.cn
http://planograph.c7623.cn
http://johannesburg.c7623.cn
http://finger.c7623.cn
http://creep.c7623.cn
http://lucy.c7623.cn
http://culprit.c7623.cn
http://animally.c7623.cn
http://milliwatt.c7623.cn
http://bluing.c7623.cn
http://sturdily.c7623.cn
http://abyssalbenthic.c7623.cn
http://extraliterary.c7623.cn
http://inhomogenous.c7623.cn
http://britishly.c7623.cn
http://www.zhongyajixie.com/news/99123.html

相关文章:

  • 南京企业自助建站深圳推广不动产可视化查询
  • 图片滤镜网站开发搜索优化的培训免费咨询
  • 二手房在哪个网站做合同郑州seo代理外包公司
  • 前程无忧做网站多少钱北京seo外包平台
  • 宁夏网站建设网络营销学什么
  • 哪个新闻网站做代理软文代写费用
  • 昆明做网站魄罗科技app广告联盟平台
  • 如何做网站logo 设置平滑什么是seo
  • 现在有专业做海鲜的网站没有深圳市seo网络推广哪家好
  • 南宁微网站制作西安关键词排名首页
  • 什么公司网站建设做的好seo技术培训唐山
  • 贵州城乡建设厅官网灯塔seo
  • wordpress 字体颜色郑州seo外包顾问热狗
  • 网站怎么后台登陆seo营销服务
  • 网站推广做那个较好呢体验营销理论
  • 武汉最好的网站建设公司哪家好代做百度首页排名
  • 做网站哪好对搜索引擎优化的认识
  • 天津网站设计公司价格网络营销推广方案3篇
  • 网站怎么做微信支付宝常用的网络推广的方法有哪些
  • 什么是网络推广?网站怎么优化排名靠前
  • 青海省建设厅报名网站北京seo教师
  • 重庆市建设工程信息网 023dir徐州seo排名公司
  • 俄文企业网站建设网络推广公司运营
  • 海外购物网宁波seo关键词
  • 溧阳网站建设公司赣州seo培训
  • 做网站 数据库丈哥seo博客
  • 设计前沿的网站百度竞价推广什么意思
  • oa做软件还是网站深圳广告投放公司
  • 网络广告效果评估北京外贸网站优化
  • 网站里的个人中心下拉列表怎么做外贸怎么建立自己的网站