Skip to content

Commit

Permalink
Merge pull request #83 from Red-velvet-cake/feature/general_enhancements
Browse files Browse the repository at this point in the history
Feature/general enhancements
  • Loading branch information
Mohammed-Alhams authored Apr 20, 2023
2 parents 9ed4d7c + 6ee2eda commit 0514849
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.red_velvet_cake.dailytodo.ui.createTodo
package com.red_velvet_cake.dailytodo.ui.create_todo

import android.view.LayoutInflater
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.red_velvet_cake.dailytodo.ui.createTodo
package com.red_velvet_cake.dailytodo.ui.create_todo

import com.red_velvet_cake.dailytodo.data.model.CreateTodoPersonalResponse
import com.red_velvet_cake.dailytodo.data.model.CreateTodoTeamResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.red_velvet_cake.dailytodo.ui.createTodo
package com.red_velvet_cake.dailytodo.ui.create_todo

interface CreateTodoView {
fun showCreateSuccessMessage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.red_velvet_cake.dailytodo.data.model.TeamTodo
import com.red_velvet_cake.dailytodo.databinding.FragmentHomeBinding
import com.red_velvet_cake.dailytodo.ui.activity.AuthActivity
import com.red_velvet_cake.dailytodo.ui.base.BaseFragment
import com.red_velvet_cake.dailytodo.ui.createTodo.CreateTodoFragment
import com.red_velvet_cake.dailytodo.ui.create_todo.CreateTodoFragment
import com.red_velvet_cake.dailytodo.ui.home.adapter.HomeAdapter
import com.red_velvet_cake.dailytodo.ui.home.adapter.HomeItemType
import com.red_velvet_cake.dailytodo.ui.home.adapter.HomeItems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,6 @@ class TeamTodoDetailsFragment : BaseFragment<FragmentTeamTodoDetailsBinding>(),
requireActivity().navigateBack()
}

companion object {
private const val KEY_DETAILS_PARAM = "team todo details"

fun newInstance(teamTodo: TeamTodo) = TeamTodoDetailsFragment().apply {
arguments = Bundle().apply {
putParcelable(KEY_DETAILS_PARAM, teamTodo)
}
}
}

override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
when (position) {
Constants.TODO -> {
Expand All @@ -113,4 +103,14 @@ class TeamTodoDetailsFragment : BaseFragment<FragmentTeamTodoDetailsBinding>(),
Toast.makeText(requireContext(), "Nothing Selected ", Toast.LENGTH_SHORT)
.show()
}

companion object {
private const val KEY_DETAILS_PARAM = "team todo details"

fun newInstance(teamTodo: TeamTodo) = TeamTodoDetailsFragment().apply {
arguments = Bundle().apply {
putParcelable(KEY_DETAILS_PARAM, teamTodo)
}
}
}
}
9 changes: 1 addition & 8 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,14 @@
android:background="@color/background"
tools:context=".ui.home.HomeFragment">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout_home"
android:layout_width="match_parent"
android:layout_height="@dimen/_80dp"
android:background="@color/background"
app:layout_constraintTop_toTopOf="parent" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_home"
android:layout_width="match_parent"
android:layout_height="@dimen/_0dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_bar_layout_home"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_personal_todo" />

<androidx.appcompat.widget.AppCompatImageButton
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/fragment_personal_todo_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:id="@+id/text_view_creation_date"
style="@style/TextViewInTodoDetails"
android:layout_width="wrap_content"
android:layout_height="@dimen/_12dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_16dp"
android:layout_marginTop="@dimen/_12dp"
android:drawablePadding="@dimen/_6dp"
Expand All @@ -67,7 +67,7 @@
android:id="@+id/text_view_todo_creation_time"
style="@style/TextViewInTodoDetails"
android:layout_width="wrap_content"
android:layout_height="@dimen/_12dp"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/_6dp"
app:drawableStartCompat="@drawable/ic_time_small"
app:layout_constraintStart_toEndOf="@id/text_view_creation_date"
Expand All @@ -82,6 +82,7 @@
android:layout_marginVertical="@dimen/_18dp"
android:fontFamily="@font/poppins"
android:textColor="@color/secondary_text"
android:textSize="@dimen/_12sp"
app:layout_constraintTop_toBottomOf="@id/text_view_creation_date"
tools:text="@string/details_todos" />

Expand Down
12 changes: 7 additions & 5 deletions app/src/main/res/layout/fragment_team_todo_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@
android:textColor="@color/primary_text"
android:textSize="@dimen/_16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appbar"
tools:ignore="RtlSymmetry"
tools:text="UX UI Studio Meeting " />

<TextView
android:id="@+id/text_view_assigne_name"
style="@style/TextViewInTodoDetails"
android:layout_width="wrap_content"
android:layout_height="@dimen/_12dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_16dp"
android:layout_marginTop="@dimen/_12dp"
android:fontFamily="@font/poppins"
Expand All @@ -51,11 +52,11 @@
tools:text="Yaseen Zaqut" />

<Spinner
android:popupBackground="@drawable/spinner_background"
android:id="@+id/spinner_todo_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/_16dp"
android:popupBackground="@drawable/spinner_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/text_view_todo_title"
tools:ignore="RtlSymmetry" />
Expand All @@ -65,7 +66,7 @@
android:id="@+id/text_view_creation_date"
style="@style/TextViewInTodoDetails"
android:layout_width="wrap_content"
android:layout_height="@dimen/_12dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_16dp"
android:layout_marginTop="@dimen/_26dp"
android:drawablePadding="@dimen/_6dp"
Expand All @@ -79,7 +80,7 @@
android:id="@+id/text_view_todo_creation_time"
style="@style/TextViewInTodoDetails"
android:layout_width="wrap_content"
android:layout_height="@dimen/_12dp"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/_6dp"
app:drawableStartCompat="@drawable/ic_time_small"
app:layout_constraintStart_toEndOf="@id/text_view_creation_date"
Expand All @@ -94,6 +95,7 @@
android:layout_marginVertical="@dimen/_18dp"
android:fontFamily="@font/poppins"
android:textColor="@color/secondary_text"
android:textSize="@dimen/_12sp"
app:layout_constraintTop_toBottomOf="@id/text_view_creation_date"
tools:text="@string/details_todos" />

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/item_personal_todo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
android:layout_marginEnd="@dimen/_16dp"
android:layout_marginBottom="@dimen/_18dp"
android:background="@android:color/transparent"
android:drawableStart="@drawable/ic_calnder"
android:drawablePadding="@dimen/_6dp"
android:elevation="@dimen/_1dp"
android:fontFamily="@font/poppins_medium"
android:gravity="center_vertical"
android:textColor="@color/accent_text"
android:textSize="@dimen/_8sp"
android:textSize="@dimen/_12sp"
app:drawableStartCompat="@drawable/ic_calnder"
app:layout_constraintBottom_toBottomOf="@id/card_view_todo"
app:layout_constraintEnd_toEndOf="@id/card_view_todo"
tools:text="24-08-2023" />
Expand All @@ -72,13 +72,13 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/_14dp"
android:background="@android:color/transparent"
android:drawableStart="@drawable/ic_time"
android:drawablePadding="@dimen/_6dp"
android:gravity="center_vertical"
android:elevation="@dimen/_1dp"
android:fontFamily="@font/poppins_medium"
android:gravity="center_vertical"
android:textColor="@color/accent_text"
android:textSize="@dimen/_8sp"
android:textSize="@dimen/_12sp"
app:drawableStartCompat="@drawable/ic_time"
app:layout_constraintEnd_toStartOf="@id/text_view_update_date"
app:layout_constraintTop_toTopOf="@id/text_view_update_date"
tools:text="21:30" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_section_personal_todos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_marginStart="@dimen/_16dp"
android:layout_marginTop="@dimen/_16dp"
android:fontFamily="@font/poppins_medium"
android:text="@string/personal_task"
android:text="@string/personal"
android:textColor="@color/primary_text"
android:textSize="@dimen/_16sp"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_section_team_todos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:layout_marginStart="@dimen/_16dp"
android:layout_marginTop="@dimen/_16dp"
android:fontFamily="@font/poppins_medium"
android:text="@string/team_task"
android:text="@string/team"
android:textColor="@color/primary_text"
android:textSize="@dimen/_16sp"
app:layout_constraintStart_toStartOf="parent"
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/item_team_todo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
android:elevation="@dimen/_1dp"
android:fontFamily="@font/poppins_medium"
android:textColor="@color/accent_text"
android:textSize="@dimen/_8sp"
android:textSize="@dimen/_12sp"
app:layout_constraintBottom_toBottomOf="@id/card_view_todo"
app:layout_constraintStart_toStartOf="@id/card_view_todo"
tools:text="Mahmoud Al Mallahi" />
Expand All @@ -71,13 +71,13 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/_16dp"
android:background="@android:color/transparent"
android:drawableStart="@drawable/ic_calnder"
android:drawablePadding="@dimen/_6dp"
android:elevation="@dimen/_1dp"
android:fontFamily="@font/poppins_medium"
android:gravity="center_vertical"
android:textColor="@color/accent_text"
android:textSize="@dimen/_8sp"
android:textSize="@dimen/_12sp"
app:drawableStartCompat="@drawable/ic_calnder"
app:layout_constraintBottom_toBottomOf="@id/text_view_assignment"
app:layout_constraintEnd_toEndOf="@id/card_view_todo"
app:layout_constraintTop_toTopOf="@id/text_view_assignment"
Expand All @@ -89,13 +89,13 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/_14dp"
android:background="@android:color/transparent"
android:drawableStart="@drawable/ic_time"
android:drawablePadding="@dimen/_6dp"
android:elevation="@dimen/_1dp"
android:fontFamily="@font/poppins_medium"
android:gravity="center_vertical"
android:textColor="@color/accent_text"
android:textSize="@dimen/_8sp"
android:textSize="@dimen/_12sp"
app:drawableStartCompat="@drawable/ic_time"
app:layout_constraintBottom_toBottomOf="@id/text_view_assignment"
app:layout_constraintEnd_toStartOf="@id/text_view_update_date"
app:layout_constraintTop_toTopOf="@id/text_view_assignment"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</style>

<style name="TextViewInTodoDetails" parent="Widget.AppCompat.TextView">
<item name="android:textSize">@dimen/_8dp</item>
<item name="android:textSize">@dimen/_12sp</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:fontFamily">@font/poppins</item>
<item name="android:layout_marginStart">@dimen/_8dp</item>
Expand Down

0 comments on commit 0514849

Please sign in to comment.