pull/6/head
Baptiiiiste 2 years ago
parent 00c73807db
commit f91a64bc15

@ -0,0 +1,6 @@
package uca.baptistearthur.geocaching.data
class Stub {
}

@ -3,6 +3,7 @@ package uca.baptistearthur.geocaching.ui.activity
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.commit
import com.google.android.material.bottomnavigation.BottomNavigationView import com.google.android.material.bottomnavigation.BottomNavigationView
import uca.baptistearthur.geocaching.R import uca.baptistearthur.geocaching.R
import uca.baptistearthur.geocaching.ui.fragment.Map import uca.baptistearthur.geocaching.ui.fragment.Map
@ -16,6 +17,7 @@ class MainWindow: AppCompatActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.main_window) setContentView(R.layout.main_window)
// Bottom menu
loadFragment(Map()) loadFragment(Map())
val navigation = findViewById<BottomNavigationView>(R.id.bottom_navigation) val navigation = findViewById<BottomNavigationView>(R.id.bottom_navigation)
navigation.selectedItemId= R.id.map navigation.selectedItemId= R.id.map
@ -32,11 +34,20 @@ class MainWindow: AppCompatActivity() {
else -> false else -> false
} }
} }
// Map
// code here
// Voyages
// code here
} }
private fun loadFragment(fragment: Fragment){ private fun loadFragment(fragment: Fragment){
val transaction = supportFragmentManager.beginTransaction() val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragment_container, fragment) transaction.replace(R.id.fragment_container, fragment)
transaction.commit() transaction.commit()
} }
} }

@ -6,29 +6,28 @@
<Button <Button
android:id="@+id/btnGetRoadTripsInfo" android:id="@+id/btnGetRoadTripsInfo"
android:layout_width="match_parent" android:layout_width="314dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/app_name" android:layout_gravity="start"
android:layout_gravity="center"
android:layout_marginLeft="20dp"
android:textSize="20sp"
android:layout_marginStart="20dp"
android:background="@color/white" android:background="@color/white"
android:textColor="@color/black"
android:drawableLeft="@drawable/right_arrow"
android:drawableStart="@drawable/right_arrow" android:drawableStart="@drawable/right_arrow"
android:drawableLeft="@drawable/right_arrow"
android:gravity="left"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="20sp"
/> />
<ImageButton <ImageButton
android:id="@+id/btnDeleteRoadTrips" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="end"
android:src="@drawable/bin" android:src="@drawable/bin"
android:background="@color/white" android:background="@color/white"
android:layout_marginRight="20dp" android:scaleType="fitCenter"
/> />
</LinearLayout> </LinearLayout>

@ -15,10 +15,17 @@
android:padding="10dp" android:padding="10dp"
android:textSize="20dp"/> android:textSize="20dp"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_roadtrip_button"
android:layout_gravity="center"
/>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewRoadTripList" android:id="@+id/recyclerViewRoadTripList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
/> />
</LinearLayout> </LinearLayout>

@ -3,6 +3,7 @@
<string name="carte">Carte</string> <string name="carte">Carte</string>
<string name="voyages">Voyages</string> <string name="voyages">Voyages</string>
<string name="roadtrip_title">Mes RoadTrips:</string>v <string name="roadtrip_title">Mes RoadTrips:</string>v
<string name="add_roadtrip_button">+ Ajouter un voyage</string>v
<!-- TODO: Remove or change this placeholder text --> <!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string> <string name="hello_blank_fragment">Hello blank fragment</string>
</resources> </resources>
Loading…
Cancel
Save