Skip to content

A Simple Todo Application in kotlin using Room database following mvvm design pattern

Notifications You must be signed in to change notification settings

janakbist/Todo-App

Repository files navigation

Todo-App

A Simple Todo Application in kotlin using Room database following mvvm design pattern

<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">

<androidx.appcompat.widget.Toolbar
    android:id="@+id/action_bar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    app:titleTextColor="@color/white"
    android:textAlignment="center"
    android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<EditText
    android:id="@+id/input"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="Enter note here"
    android:textSize="16sp"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintBottom_toTopOf="@id/addButton"
    android:layout_marginTop="10dp"
    android:textAlignment="center"
    app:layout_constraintTop_toBottomOf="@id/action_bar"/>
<Button
    android:id="@+id/addButton"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:layout_constraintTop_toBottomOf="@+id/input"
    android:layout_margin="16dp"
    android:text="Submit"
    android:onClick="submitData"
    android:textColor="#ffffff"/>

<androidx.recyclerview.widget.RecyclerView
    android:id="@+id/recyclerView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    tools:listitem="@layout/item_note"
    android:layout_marginTop="1dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/addButton"
    app:layout_constraintVertical_bias="0.089" />

</androidx.constraintlayout.widget.ConstraintLayout>

About

A Simple Todo Application in kotlin using Room database following mvvm design pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages