zoukankan      html  css  js  c++  java
  • 第八次

    package com.example.myapplication;

    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;

    import com.example.myapplication.ui.frist.FristFragment;
    import com.example.myapplication.ui.frist.FristViewModel;

    public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    FristFragment fragment=new FristFragment();

    }
    }
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/frist"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.frist.FristFragment">

    <TextView
    android:id="@+id/message"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="FristFragment"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

    <fragment
    android:name="com.example.myapplication.ui.frist.FristFragment"
    android:id="@+id/b_1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

    </LinearLayout>
    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".Frist" />
  • 相关阅读:
    ubuntu下Nodic开发环境搭建
    usb_modeswitch移植
    STM32F4编程手册学习2_内存模型
    STM32F4 编程手册学习1_编程模型
    ARM架构中的程序执行与调用
    锲形文字 数字
    疑问
    lisp 题目
    面试官在面试时让我去破解一个软件,我成功了
    php CI ip限制
  • 原文地址:https://www.cnblogs.com/lixiaoai/p/11727136.html
Copyright © 2011-2022 走看看