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

网站域名注册商wordpress没有登陆框

网站域名注册商,wordpress没有登陆框,建站公司一般用什么框架,营销型网站建设遨龙UI学习 UI分类 安卓的UI分为两大类#xff1a;一类叫做View视图#xff0c;一类叫做ViewGroup容器 View视图#xff1a;TextView,Button,ImageView都是常见的视图ViewGroup容器#xff1a;内部尅承载、放置、添加View视图的容器 布局方式 安卓布局主要有#xff1a;线…UI学习 UI分类 安卓的UI分为两大类一类叫做View视图一类叫做ViewGroup容器 View视图TextView,Button,ImageView都是常见的视图ViewGroup容器内部尅承载、放置、添加View视图的容器 布局方式 安卓布局主要有线性布局、相对布局、帧布局、约束布局 LinearLayout线性布局 LinearLayout线性布局横着或者竖着 按顺序排列 其属性主要有 orientation排列方向主要有vertical垂直排列、horizontal水平排列layout_width/height宽度主要有三种类型 填充父容器剩余空间match_parent根据子视图宽度自适应自己的宽高wrap_content自定义大小比如50dp background背景颜色gravity重力决定子控件相对该父容器的位置。主要有三种 center居中显示 horizontal_center水平居中 vertical_center垂直居中layout_gravity决定该容器相对它的父容器的位置 ?xml version1.0 encodingutf-8? LinearLayout xmlns:androidhttp://schemas.android.com/apk/res/androidandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:orientationverticalandroid:background#FF2299android:gravitycenterButtonandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:backgroundTint#FF00FF/Buttonandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:backgroundTint#FFFF00/Buttonandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:backgroundTint#00FF00//LinearLayout RelativeLayout相对布局 在摆放子视图位置时按照指定的参考系摆放子视图的位置默认以屏幕左上角(0, 0)位置作为参考系摆放位置 主要有三大类 相对父元素相对兄弟元素相对兄弟元素对齐方式 ?xml version1.0 encodingutf-8? RelativeLayout xmlns:androidhttp://schemas.android.com/apk/res/androidandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentButtonandroid:idid/btn1android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:insetTop0dpandroid:insetBottom0dpandroid:text按钮1/Buttonandroid:idid/btn2android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:insetTop0dpandroid:insetBottom0dpandroid:text按钮2android:layout_toRightOfid/btn1android:layout_belowid/btn1/Buttonandroid:idid/btn3android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:insetTop0dpandroid:insetBottom0dpandroid:text按钮3android:layout_toRightOfid/btn2android:layout_belowid/btn2/Buttonandroid:idid/btn4android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:insetTopdpandroid:insetBottom0dpandroid:text按钮4android:layout_toRightOfid/btn3android:layout_belowid/btn3/ /RelativeLayoutFrameLayout帧布局 组件的默认位置都是左上角组件之间可以重叠 设置方式与线性布局相似 具体UI Button之MaterialButton Material: 重要的 MaterialButton是Google推出的新控件比较好用 使用步骤 1.添加依赖 在app下的build.gradle文件下dependencies里添加依赖implementation com.google.android.material:material:1.10.0 然后执行Sync Now 2.修改app的theme主题 修改地方 将其parenter修改为Theme.MaterialComponents.Light.NoActionBar 一些常见属性 写的一些效果 MaterialButtonToggleGroup 类似于iOS的segment com.google.android.material.button.MaterialButtonToggleGroupandroid:idid/material_groupandroid:layout_widthmatch_parentandroid:layout_height60dpandroid:layout_marginLeft10dpandroid:layout_marginRight10dpandroid:gravitycenterapp:checkedButtonid/btn2com.google.android.material.button.MaterialButtonandroid:idid/btn1android:layout_width0dpandroid:layout_height50dpandroid:layout_weight1android:textTAB1app:cornerRadius15dpandroid:insetTop0dpandroid:insetBottom0dpandroid:gravitycenter/com.google.android.material.button.MaterialButtonandroid:idid/btn2android:layout_width0dpandroid:layout_height50dpandroid:layout_weight1android:textTAB2app:cornerRadius20dpandroid:insetTop0dpandroid:insetBottom0dpandroid:gravitycenter/com.google.android.material.button.MaterialButtonandroid:idid/btn3android:layout_width0dpandroid:layout_height50dpandroid:layout_weight1android:textTAB3app:cornerRadius20dpandroid:insetTop0dpandroid:insetBottom0dpandroid:gravitycenter//com.google.android.material.button.MaterialButtonToggleGroup监听的时候 //通过id找到对象val toggleGroup findViewByIdMaterialButtonToggleGroup(R.id.material_group)//对象添加监听//参数是一个接口前面需要加上object: 关键字toggleGroup.addOnButtonCheckedListener(object: MaterialButtonToggleGroup.OnButtonCheckedListener{//里面是实现接口的方法override fun onButtonChecked(group: MaterialButtonToggleGroup?,checkedId: Int,isChecked: Boolean) {Log.e(MaterialButton, ${checkedId}, ${isChecked.toString()});}})TextView LinearLayout xmlns:androidhttp://schemas.android.com/apk/res/androidandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:gravitycenter_horizontalTextViewandroid:idid/textView2android:layout_width200dpandroid:layout_height160dpandroid:text111111111111111111111111111111android:textSize22dpandroid:textColor#ffffff//使用这个跑马灯才管用android:singleLinetrueandroid:backgroundcolor/purple_700android:layout_marginTop30dpandroid:ellipsizemarqueeandroid:marqueeRepeatLimit-1android:focusabletrueandroid:focusableInTouchModetrueandroid:drawableLeftandroid:drawable/btn_starandroid:drawableRightandroid:drawable/btn_starandroid:drawableTopandroid:drawable/btn_dialogandroid:drawableBottomandroid:drawable/btn_dropdown//LinearLayout在activity里面调用val tv findViewByIdTextView(R.id.textView2) tv.requestFocus()ImageView 图片名不能以数字开头 center :保持原图的大小显示在ImageView的中心。当原图的长(宽)大于ImageView的长(宽)超过部分裁剪处理。centerCrop :以填满整个ImageView为目的将原图的中心对准ImageView的中心等比例放大原图直到填满ImageView为止指的是ImageView的宽和高都要填满原图超过ImageView的部分作裁剪处理。centerInside :以原图完全显示为目的将图片的内容完整居中显示通过按比例缩小原图的长(宽)等于或小于ImageView的长(宽)。如果原图的长宽本身就小于ImageView的长宽则原图不作任何处理居中显示在ImageView。fitCenter :把原图按比例扩大或缩小到ImageView的ImageView的高度居中显示fitEnd :把原图按比例扩大(缩小)到ImageView的高度显示在ImageView的下部分位置fitStart :把原图按比例扩大(缩小)到ImageView的高度显示在ImageView的上部分位置fitXY :把原图按照指定的大小在View中显示拉伸显示图片不保持原比例填满ImageView.matrix :不改变原图的大小从ImageView的左上角开始绘制原图原图超过ImageView的部 分作裁剪处理。 RecyclerView 类似tableViewcollectionView adapter数据源 来一个简单的List private val data listOf(Apple, Banana, Orange, Watermelon, Pear, Grape, Pineapple, Strawberry, Cherry, Mango, Apple, Banana, Orange, Watermelon, Pear, Grape, Pineapple, Strawberry, Cherry, Mango)override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContentView(R.layout.activity_main)//注意android.R.layout.simple_list_item_1val adapter ArrayAdapterString(this, android.R.layout.simple_list_item_1, data)val recyclerView findViewByIdListView(R.id.listView)recyclerView.adapter adapter}在xml上写上ListViewListViewandroid:idid/listViewandroid:layout_widthmatch_parentandroid:layout_heightmatch_parent/自定义列表 使用recyclerView class MainActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContentView(R.layout.activity_main)//找到recyclerViewval recyclerView findViewByIdRecyclerView(R.id.recyclerView)//管理者负责列表的布局recyclerView.layoutManager LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)recyclerView.adapter MyAdapter1()}//创建一个adapter负责数据的适配class MyAdapter1: RecyclerView.AdapterMyViewHolder() {override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {//找到itemval cellView LayoutInflater.from(parent.context).inflate(R.layout.textview_test, parent, false)return MyViewHolder(cellView)}//个数override fun getItemCount(): Int {return 20}override fun onBindViewHolder(holder: MyViewHolder, position: Int) {}}//负责列表的复用class MyViewHolder(view: View): RecyclerView.ViewHolder(view){} } 跳转 显示跳转 val btn findViewByIdMaterialButton(R.id.jump_button)btn.setOnClickListener {val intent Intent(this, secondActivity::class.java)//传值intent.putExtra(key, 22222)startActivity(intent)}//接收值val dataString intent.getStringExtra(key)例子 作业结果
http://www.zqtcl.cn/news/18429/

相关文章:

  • 空调网站模板赣州金图网络科技有限公司
  • 深圳网站建设ejiew淘宝网页版登录入口官方
  • 贵南县网站建设公司seo案例分析方案
  • 内蒙古建设厅网站在线设计平台的用户群分析
  • php建站软件哪个好傻瓜式php网站开发
  • 新公司网站建设费用怎么入账wordpress价钱
  • 新站整站排名优化火速公司wordpress require_once
  • 郑州网站建设修改seo优化百度自然排名
  • 网站建设 美词公司网站建设合同要交印花税吗
  • 网站logo如何做链接上海公司起名
  • 网站轮播图制作网站模板论坛
  • 做网站设计需要多少钱开发公司工作总结
  • 阿里巴巴 网站 建设如何完整地备份wordpress
  • 重庆做网站重庆做网站wordpress按修改时间排序
  • 做视频网站需要流量手机站喝茶影视
  • 服装网站建设开发语言wordpress 添加附件
  • 如何保护网站名百度seo提高排名费用
  • php酒店网站源码个人博客排名
  • 找钢网网站建设政务服务平台
  • 北京网站维护一般价格多少wordpress安装指南
  • 网页设计样图苏州seo快速优化
  • 手机网站设计建设服务网站建设的网
  • 免费做印章的网站百度seo优化软件
  • 昆山网站制作wordpress怎样弄栏目
  • 如何查一个网站的备案号为国外的公司提供网站建设 维护
  • 网站seo站群软件手机网站设计字体大小
  • 江苏省住房与城乡建设部网站网站群集约化建设通知
  • 住房城乡建设部门户网站网站设计的第一步是
  • 南京网站制作哪家好做网站和编程
  • 免费做爰小说网站建网站怎么做