首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在哪里使用Main.axml?

在哪里使用Main.axml?
EN

Stack Overflow用户
提问于 2018-07-27 23:38:35
回答 1查看 22关注 0票数 0

在我的Android项目中,我有一个名为Main.axml的文件,它大致包含以下内容...

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="10dp">
    <TextView
        android:text="HELLO WORLD"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/msgText"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:padding="10dp" />
</LinearLayout>

这个文件在哪里被引用,TextView出现在哪里?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-29 01:37:34

在主活动的OnCreate重写中,有...

代码语言:javascript
复制
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

SetContentView(Resource.Layout.Main);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51561287

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档