Textview属性未在Android Studio中显示

数据十字军

我是一个初学者,是android开发的新手。我无法修改textview属性,即使在手动修改后XML也没有显示。我尝试单击蓝色箭头,它没有显示任何内容。

当前是这样的:

在此处输入图片说明

我希望属性显示如下:

在此处输入图片说明

Edit1:Xml代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.robpercival.demoapp.MainActivity">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="My Great App"
    android:id="@+id/textView"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:textSize="50sp"
    android:textColor="#080808"
    android:background="#2cfb03"
    android:padding="10dp" />

通过文本视图属性,我的意思是文本颜色,大小,重力,填充等

任何帮助将非常感激。

Poovarasan Selvaraj

如果不需要背景色,将其删除 android:background="#2cfb03"

上方文字显示在屏幕中央,请在textview属性内使用此文字

android:layout_centerInParent="true"

在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

在TextView的内容没有显示(Android Studio中)

Cardview在Android Studio中3.5.1不显示

文件名称未在Android Studio的TextView中正确显示

字符串未在Android Studio中显示

为什么AVD Manager选项未在Android Studio中显示

NUnit类别未在Visual Studio中显示

Magento 2.1.9属性未在导航中显示。

设计视图未在Android Studio上显示

在资源管理器中显示未在android studio 3.1.0中打开

Android Studio-TextView未在设计视图布局中显示

AnkhSVN未在Visual Studio 2017中显示

Nox播放器未在Android Studio中显示

SpannableString未在Android的Oreo的TextView中设置

所有插件未在android studio中显示

应用程序栏未在Android Studio中显示,但在实际的android设备上显示

应用未在Android Studio的Profiler中显示网络活动

工具栏未在Android Studio预览中显示

ServiceStack未在Visual Studio中显示

吐司未在Android Studio中显示

收到的短信未在TextView中完全显示

显示在sharedpreferences中放置的值未在textView中显示

如何显示计算结果以在Android Studio / Java中显示提示的TextView?

Android Studio 中的 TextView 未显示

在android studio中显示JSON typeMismatch错误

如何让 Android Studio 在 textView 中显示计算值

android studio 视图未在设计模式中显示

图像未在 android studio 中与 Picasso 一起显示

在数据库检查器按钮中运行 SQLite 语句未在 Android Studio 中显示

Android Studio:图像占用空间但未在ListView中显示