凌雪
2018-10-24
来源 :网络
阅读 1401
评论 0
摘要:本文将带你了解Android应用开发之android 布局常见调整手段,怎样查看margin,padding等等,希望本文对大家学Android有所帮助。
本文将带你了解Android应用开发之android 布局常见调整手段,怎样查看margin,padding等等,希望本文对大家学Android有所帮助。
<linearlayout android:gravity="center_horizontal" android:id="@+id/item_call_show_switch" android:layout_alignparentend="true" android:layout_alignparenttop="true" android:layout_gravity="center_horizontal" android:layout_height="52dp" android:layout_margintop="8dp" android:layout_width="match_parent" android:orientation="horizontal" android:paddingleft="10dp" android:paddingright="18dp"> <imageview android:background="@mipmap/setting_icon_flash" android:layout_gravity="center" android:layout_height="wrap_content" android:layout_marginleft="3dp" android:layout_marginright="12dp" android:layout_width="wrap_content"> <textview android:gravity="center_vertical" android:layout_height="match_parent" android:layout_weight="1" android:layout_width="0dp" android:text="@string/item_call_show" android:textcolor="@color/base_black" android:textsize="16sp"> <pre class="brush:java;">android:layout_marginLeft="50dp"</pre><pre class="brush:java;"> android:id="@+id/call_show_switch" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </pre><pre class="brush:java;">在这个layout中在Linearlayout中有个padding,造成switch不能靠边。在这时间你不知道什么原因造成switch不能靠右边</pre><p>这时你就在switch做一个背景,具体的看看什么原因。这是比较笨的手法。</p></android.support.v7.widget.switchcompat></textview></imageview></linearlayout>
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标移动开发之Android频道!
喜欢 | 0
不喜欢 | 0
您输入的评论内容中包含违禁敏感词
我知道了

请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号