android减少两个垂直TextViews之间的空间

标签 android android-layout

<分区>

我的应用程序中有两个垂直的 TextView 元素。 TextViews 之间有很多空间,pading 和 layoutMargin 都是 0

有没有办法减少这个空间?

On image space between two text views-padding and margin are 0

编辑 这是我的代码:

.
.

<LinearLayout 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="right"
            android:paddingRight="10dp"
            android:layout_weight="1">
                <TextView 
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="@dimen/text_size_extra_small"
                    android:textColor="@color/home_tab_text_normal"
                    android:text="Test1"/>
                <TextView 
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/orange_text_color"
                    android:textSize="@dimen/text_size_large"
                    android:textStyle="bold"
                    android:text="Text2"/>


        </LinearLayout>         

.
.

谢谢

最佳答案

android:includeFontPadding="false"

关于android减少两个垂直TextViews之间的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7162500/

相关文章:

java - Android 中未获取 Base64 图像数据

javascript - React native - 多条路线的 React Navigation

android - 添加 Scrollview 会将整个布局推到一半 View 大小?

android - 使用 Android 的 RecyclerView 时在滑动行下添加带有文本/图标的彩色背景

android - 始终将 float 操作按钮放在顶部

android - 如何在适配器 ListView 中添加 onclick 按钮

android - 如何创建如下所示的自定义选项卡 View

android - 以编程方式清除浏览器缓存/历史记录

android - VideoView 与 MediaPlayer?

android - 当 Fragment 在工具栏下时如何解决这个问题?