Pārlūkot izejas kodu

chore: How home tasks will look like

beautusg 7 gadi atpakaļ
vecāks
revīzija
e438f0143b

+ 8 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/notes/NotesFragment.kt

@@ -1,11 +1,19 @@
 package com.sduduzog.slimlauncher.ui.notes
 
+import android.os.Bundle
+import android.view.LayoutInflater
 import android.view.View
+import android.view.ViewGroup
 import android.widget.TextView
+import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.ui.BaseFragment
 
 class NotesFragment : BaseFragment(){
     override fun getFragmentView(): View {
         return TextView(context)
     }
+
+    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
+        return inflater.inflate(R.layout.notes_fragment, container, false)
+    }
 }

+ 9 - 0
app/src/main/res/layout/home_fragment.xml

@@ -33,6 +33,15 @@
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_12sdp" />
 
+    <TextView
+        android:id="@+id/home_fragment_tasks"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:padding="12dp"
+        android:text="@string/home_fragment_tasks"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="@dimen/_24ssp" />
+
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/home_fragment_list"
         android:layout_width="0dp"

+ 13 - 0
app/src/main/res/layout/home_motion_end.xml

@@ -40,6 +40,19 @@
         app:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
         app:layout_constraintStart_toStartOf="@+id/home_fragment_time" />
 
+    <TextView
+        android:id="@+id/home_fragment_tasks"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="64dp"
+        android:padding="12dp"
+        android:text="@string/home_fragment_tasks"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="@dimen/_24ssp"
+        android:alpha="-1"
+        app:layout_constraintBottom_toTopOf="@+id/home_fragment_list"
+        app:layout_constraintStart_toStartOf="@+id/home_fragment_list" />
+
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/home_fragment_list"
         android:layout_width="0dp"

+ 13 - 1
app/src/main/res/layout/home_motion_start.xml

@@ -41,6 +41,18 @@
         app:layout_constraintStart_toStartOf="@+id/home_fragment_time"
         app:layout_constraintTop_toBottomOf="@+id/home_fragment_time" />
 
+    <TextView
+        android:id="@+id/home_fragment_tasks"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="4dp"
+        android:padding="12dp"
+        android:text="@string/home_fragment_tasks"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="@dimen/_24ssp"
+        app:layout_constraintBottom_toTopOf="@+id/home_fragment_list"
+        app:layout_constraintStart_toStartOf="@+id/home_fragment_list" />
+
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/home_fragment_list"
         android:layout_width="0dp"
@@ -56,7 +68,7 @@
         app:layout_constraintHorizontal_bias="0.0"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="@+id/home_fragment_time"
-        app:layout_constraintVertical_bias="0.494"
+        app:layout_constraintVertical_bias="0.650"
         tools:itemCount="4"
         tools:listitem="@layout/main_fragment_list_item" />
 

+ 23 - 0
app/src/main/res/layout/notes_fragment.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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:id="@+id/notes_fragment"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".ui.notes.NotesFragment">
+
+    <TextView
+        android:id="@+id/textView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="32dp"
+        android:text="@string/main_fragment_notes"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="@dimen/_36ssp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -52,6 +52,7 @@
     <string name="menu_remove">Remove</string>
     <string name="customise_apps_fragment_counter">%d slot(s) left</string>
     <string name="choose_theme_dialog_title">Choose Theme</string>
+    <string name="home_fragment_tasks">Tasks</string>
 
 
 </resources>