Commit a90963cf authored by Timothé KOBAK's avatar Timothé KOBAK

UI

parent 78f44799
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
......
package com.example.elbuenopeso.ui.dashboard package com.example.elbuenopeso.ui.dashboard
import android.os.Bundle import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.navigation.fragment.findNavController
import com.example.elbuenopeso.databinding.FragmentDashboardBinding import com.example.elbuenopeso.databinding.FragmentDashboardBinding
class DashboardFragment : Fragment() { class DashboardFragment : Fragment() {
...@@ -32,6 +34,15 @@ class DashboardFragment : Fragment() { ...@@ -32,6 +34,15 @@ class DashboardFragment : Fragment() {
dashboardViewModel.text.observe(viewLifecycleOwner) { dashboardViewModel.text.observe(viewLifecycleOwner) {
textView.text = it textView.text = it
} }
binding.button6.setOnClickListener {
// TODO
}
return root return root
} }
......
...@@ -7,7 +7,7 @@ import androidx.lifecycle.ViewModel ...@@ -7,7 +7,7 @@ import androidx.lifecycle.ViewModel
class HomeViewModel : ViewModel() { class HomeViewModel : ViewModel() {
private val _text = MutableLiveData<String>().apply { private val _text = MutableLiveData<String>().apply {
value = "This is home Fragment" value = "Welcome to ElBuenoPeso !"
} }
val text: LiveData<String> = _text val text: LiveData<String> = _text
} }
\ No newline at end of file
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
...@@ -19,4 +19,14 @@ ...@@ -19,4 +19,14 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
app:layout_constraintBottom_toTopOf="@+id/text_dashboard"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -6,17 +6,29 @@ ...@@ -6,17 +6,29 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.home.HomeFragment"> tools:context=".ui.home.HomeFragment">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="354dp"
android:src="@drawable/marketplace"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/text_home" android:id="@+id/text_home"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:textAlignment="center" android:textAlignment="center"
android:textSize="20sp" android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="@+id/imageView"
app:layout_constraintVertical_bias="0.051" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
<item <item
android:id="@+id/navigation_dashboard" android:id="@+id/navigation_dashboard"
android:icon="@drawable/ic_dashboard_black_24dp" android:icon="@drawable/ic_dashboard_black_24dp"
android:title="@string/title_dashboard" /> android:title="Market" />
<item <item
android:id="@+id/navigation_notifications" android:id="@+id/navigation_notifications"
android:icon="@drawable/ic_notifications_black_24dp" android:icon="@drawable/baseline_add_24"
android:title="@string/title_notifications" /> android:title="Add" />
</menu> </menu>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.ElBuenoPeso" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.ElBuenoPeso" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item> <item name="colorPrimary">@color/navy</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/bluee</item>
<item name="colorOnPrimary">@color/white</item> <item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/teal_200</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment