mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-06 18:12:55 +00:00
Added fragments interaction
This commit is contained in:
BIN
app/src/main/res/drawable/ic_menu_allfriends.png
Normal file
BIN
app/src/main/res/drawable/ic_menu_allfriends.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/drawable/ic_menu_home.png
Normal file
BIN
app/src/main/res/drawable/ic_menu_home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
@ -1,28 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<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="org.communiquons.android.comunic.client.MainActivity">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2" />
|
||||
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/main_bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?android:attr/windowBackground"
|
||||
app:menu="@menu/main_bottom_navigation" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/test_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_width="100dp"
|
||||
tools:layout_height="100dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</LinearLayout>
|
11
app/src/main/res/layout/fragment_friendslist.xml
Normal file
11
app/src/main/res/layout/fragment_friendslist.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello from friends list"/>
|
||||
|
||||
</LinearLayout>
|
11
app/src/main/res/layout/fragment_userinfos.xml
Normal file
11
app/src/main/res/layout/fragment_userinfos.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello from informations fragment !"/>
|
||||
|
||||
</LinearLayout>
|
15
app/src/main/res/menu/main_bottom_navigation.xml
Normal file
15
app/src/main/res/menu/main_bottom_navigation.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/main_bottom_navigation_friends_list"
|
||||
android:title="@string/navigation_bottom_friends_item"
|
||||
android:icon="@drawable/ic_menu_allfriends"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/main_bottom_navigation_me_view"
|
||||
android:title="@string/navigation_bottom_me_item"
|
||||
android:icon="@drawable/ic_menu_home"
|
||||
/>
|
||||
|
||||
</menu>
|
@ -14,4 +14,6 @@
|
||||
<string name="popup_signout_message">Are you sure do you want to sign out ?</string>
|
||||
<string name="popup_signout_confirm_button">Sign out</string>
|
||||
<string name="popup_signout_cancel_button">Cancel</string>
|
||||
<string name="navigation_bottom_friends_item">Friends</string>
|
||||
<string name="navigation_bottom_me_item">Me</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user