最近开始在布局中使用拖拽方式了,留下记录自己看的
设置一条横向辅助线在屏幕的位置,按照百分比来设置
activity_main.xml

<?xml version="1.0" encoding="utf-8"?>"http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent">"@+id/guideline3"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:orientation="horizontal"//这里控制方向,引导线在屏幕是横向还是纵向如果设置为vertical则效果如图二        app:layout_constraintEnd_toEndOf="parent"        app:layout_constraintGuide_percent="0.6"//设置在屏幕比例0。6的地方        app:layout_constraintStart_toStartOf="parent" />

效果:

    android:orientation="horizontal"

    android:orientation="vertical"

更多相关文章

  1. Android(安卓)编程设置 APN
  2. Android(安卓)底层渲染 - 屏幕刷新机制源码分析
  3. Android虚拟机大屏幕设置
  4. Android(安卓)屏幕适配
  5. Android中获取屏幕相关信息(屏幕大小,状态栏、标题栏高度)
  6. Android:漫画APP开发笔记之ListView中图片按屏幕宽度缩放
  7. Android多屏幕支持Multi-WindowSupport
  8. Android(安卓)Map开发基础知识学习笔记(转)
  9. 安卓开发38:安卓的滚动条相关属性

随机推荐

  1. 客户端笔记——Android(安卓)序列化
  2. 动画专题研究 一
  3. 《第一行代码Android》学习总结第三章 编
  4. Android发展简史
  5. Android启动另一个App的Service
  6. Android编程之Android(安卓)Permission
  7. Android(安卓)RecyclerView 设置item之间
  8. Android实战简易教程(自定义控件实现数字
  9. Android(安卓)EditText 通过TextWatcher
  10. Android四大组件:BroadcastReceiver史上最