文本视图未出现在应用程序屏幕中。(Android)
代码如下:当我在我的设备上运行时,文本视图“当前位置”和“用户地址”在应用程序屏幕上不可见。而在设计模式下,它们是可见的。我的布局代码是:文本视图未出现在应用程序屏幕中。(Android),android,android-layout,android-fragments,Android,Android Layout,Android Fragments,代码如下:当我在我的设备上运行时,文本视图“当前位置”和“用户地址”在应用程序屏幕上不可见。而在设计模式下,它们是可见的。我的布局代码是: 屏幕是:根据您的代码,您缺少设置TextView将要使用的字符串(android:text)。现在你只是在使用工具:text=“Current Location”,它只会在预览屏幕上显示一个文本。让我们看看。该死……这是正确的……有时我想知道为什么我会监督这样的事情:)道具鹰眼本尼 <RelativeLayout androi
屏幕是:根据您的代码,您缺少设置TextView将要使用的字符串(
android:text
)。现在你只是在使用工具:text=“Current Location”,它只会在预览屏幕上显示一个文本。让我们看看。该死……这是正确的……有时我想知道为什么我会监督这样的事情:)道具鹰眼本尼
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/_40dp"
android:paddingLeft="@dimen/_10dp"
android:paddingRight="@dimen/_10dp"
android:background="@color/colorPrimary"
android:paddingBottom="@dimen/_40dp"
>
<TextView
android:layout_width="fill_parent" android:id="@+id/current"
android:layout_height="wrap_content" android:layout_marginLeft="@dimen/_30dp"
android:textSize="15dp" android:textColor="@color/background"
tools:text="Current Location" />
<TextView
android:layout_width="fill_parent" android:id="@+id/user_current_addr" android:layout_marginTop="@dimen/_10dp"
android:layout_height="wrap_content" android:layout_marginLeft="@dimen/_30dp"
android:layout_centerVertical="true" android:layout_below="@+id/current"
android:textSize="20dp" android:textColor="@color/background"
tools:text="User Address" />
</RelativeLayout>
<FrameLayout
android:id="@+id/child_fragment_container"
android:layout_width="match_parent"
android:layout_height="0dp" android:background="@color/background"
android:layout_weight="1" />
</LinearLayout>
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_my_location, container, false);
return view;
}