我已经进行了彻底的搜索,但是看来这不是一个普遍的问题-由于我还很新,并且并不真正知道在这方面寻找什么,这一事实可能会进一步加剧。 / p>
无论如何,我上次运行此代码的效果很好,但是现在显示只是白色-因此即使是黑色书写也不会显示。非常感谢您提供的任何帮助。
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"
tools:context=".MainActivity">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
android:src="@drawable/background" />
<TextView
android:id="@+id/mocha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/price_mocha"
android:layout_alignParentStart="true"
android:layout_marginStart="15dp"
android:text="Price of mocha"
android:textColor="#060505" />
<TextView
android:id="@+id/price_mocha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="234dp"
android:layout_marginStart="35dp"
android:text="3.99"
android:textColor="#ffffff" />
</RelativeLayout>