Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/res/layout/activity_main.xml
ongbodev
哈哈哈哈哈士奇 6 years ago
parent 040e658d47
commit 75144a004e

@ -65,7 +65,7 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//setDefaultFragment(); //上面写的那个函数
setDefaultFragment(); //上面写的那个函数
BottomNavigationView navView = findViewById(R.id.nav_view);
mTextMessage = findViewById(R.id.message);
navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);

@ -14,6 +14,6 @@ public class MainContent extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate( R.layout.activity_main, container, false ); //要加载的layout文件
return inflater.inflate( R.layout.activity_home, container, false ); //要加载的layout文件
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/home"
tools:ignore="ContentDescription" />
</LinearLayout>

@ -26,4 +26,5 @@
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_nav_menu" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Loading…
Cancel
Save