You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitProject1/doc/向金成——精读代码/layout/add_account_text.xml

43 lines
1.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="50dip"
android:gravity="center_vertical"
android:orientation="vertical">
<!--
1、声明了一个线性布局容器宽度与父组件一样高度与内容匹配即能刚好包含内容
2、android:minHeight属性 指定了最小高度当前值50dip
3、对齐方式 垂直居中
4、方向 垂直
-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/preferences_add_account" />
<!--
1、声明了一个显示文本view对象高度和宽度与内容适配
2、android:layout_gravity属性 是指定了该控件整体与父组件的对齐方式,而不是内容 当前很横纵居中
3、android:textAppearance属性 指定了文本外观,当前是对于预定义样式的引用
4、android:text属性 指定该view对象显示的文本字符串资源引用
-->
</LinearLayout>