Skip to content

Commit

Permalink
1.0 v beta
Browse files Browse the repository at this point in the history
  • Loading branch information
0developers committed Feb 8, 2024
1 parent 8603145 commit 6d2b680
Show file tree
Hide file tree
Showing 24 changed files with 87 additions and 257 deletions.
Binary file modified .gradle/8.0/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/8.0/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/8.0/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/8.0/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/8.0/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file modified .gradle/file-system.probe
Binary file not shown.
19 changes: 3 additions & 16 deletions .idea/assetWizardSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
}

android {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/zerodev/todo/BugReport/ReportBug.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import android.content.Context
import android.os.Build
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import okhttp3.ResponseBody
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

Expand All @@ -29,8 +29,8 @@ class ReportBug {
val service = retrofit.create(DiscordApi::class.java)
val webhookdata = WebhookData(message)
service.sendMessage(
"1191698044211703950",
"ZZ_6hKT0xB2MtR6gyLIJPi6razz9PjmOpWMi2UlY0Op_JHbvM1nrhxDJ9HkmN6J_7IhC",
"webhook ID",
"Webhook token",
webhookdata
).enqueue(object : Callback<ResponseBody> {
override fun onResponse(
Expand Down
17 changes: 10 additions & 7 deletions app/src/main/java/com/zerodev/todo/TaskAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,20 @@ package com.zerodev.todo
import android.annotation.SuppressLint
import android.app.AlertDialog
import android.content.Context
import android.content.res.Configuration
import android.graphics.Color
import android.graphics.Paint
import android.opengl.Visibility
import android.text.Spannable
import android.text.SpannableString
import android.text.SpannableStringBuilder
import android.text.style.ForegroundColorSpan
import android.graphics.PorterDuff
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.CheckBox
import android.widget.ImageView
import android.widget.PopupMenu
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.google.gson.Gson
import java.text.SimpleDateFormat
import java.time.Instant
import java.util.Date


Expand Down Expand Up @@ -72,6 +67,10 @@ class TaskAdapter(private var tasks: MutableList<Task> , private val context: Co
refreshSharedPref()
notifyItemChanged(position)
}
if (isDarkMode(context))
holder.moreimg.setColorFilter(Color.WHITE , PorterDuff.Mode.MULTIPLY)
else
holder.moreimg.setColorFilter(Color.BLACK , PorterDuff.Mode.MULTIPLY)
// more details
//TODO : Add a edit dialog in the next update
holder.moreimg.setOnClickListener {
Expand Down Expand Up @@ -163,6 +162,10 @@ class TaskAdapter(private var tasks: MutableList<Task> , private val context: Co

return finisehdDate == today
}
fun isDarkMode(context: Context): Boolean {
val darkModeFlag = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
return darkModeFlag == Configuration.UI_MODE_NIGHT_YES
}



Expand Down
25 changes: 23 additions & 2 deletions app/src/main/java/com/zerodev/todo/ui/aboutus/AboutUsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import com.zerodev.todo.databinding.FragmentAboutusBinding
Expand Down Expand Up @@ -47,8 +46,17 @@ class AboutUsFragment : Fragment() {
}
}
// instagram
// for now i remove the instagram
binding.instagram.visibility = View.GONE
binding.instagram.setOnClickListener{
//TODO: add the code here
val insUrl = ""
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(insUrl))
intent.setPackage("com.discord")
if (context?.let { isIntentAvailable(it, intent) } == true) {
startActivity(intent)
} else {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(insUrl)))
}
}
binding.discord.setOnClickListener{
val disUrl = "https://discord.gg/FQxG3pmEB7"
Expand All @@ -60,6 +68,19 @@ class AboutUsFragment : Fragment() {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(disUrl)))
}
}
binding.tiktok.setOnClickListener {
val Url = "https://www.tiktok.com/@grandffyt?_t=8jiaWme2IUo&_r=1"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(Url))
intent.setPackage("com.zhiliaoapp.musically")
if (context?.let { isIntentAvailable(it, intent) } == true) {
startActivity(intent)
} else {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(Url)))
}
}
binding.github.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://www.tiktok.com/@grandffyt?_t=8jiaWme2IUo&_r=1")))
}

return root
}
Expand Down
9 changes: 7 additions & 2 deletions app/src/main/java/com/zerodev/todo/ui/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ class HomeFragment : Fragment() {
_binding = FragmentHomeBinding.inflate(inflater, container, false)

binding.fab.setOnClickListener { view ->
val dialogView = LayoutInflater.from(context).inflate(R.layout.new_item_dialog, null)
val dialogView = LayoutInflater.from(context).inflate(R.layout.new_item_dialog , null)

val taskEditText = dialogView.findViewById<EditText>(R.id.taskEditText)
val desc = dialogView.findViewById<EditText>(R.id.desc)
val cancelButton = dialogView.findViewById<Button>(R.id.cancelButton)
val addButton = dialogView.findViewById<Button>(R.id.addButton)
val pickDueDate = dialogView.findViewById<Button>(R.id.pickDueDate)
// we remove this for now since it dosen't work
pickDueDate.visibility = View.GONE
val repeatSpinner = dialogView.findViewById<Spinner>(R.id.spinner)
// we remove this for now since it dosen't work
repeatSpinner.visibility = View.GONE
val reminderCheckBox = dialogView.findViewById<CheckBox>(R.id.reminderCheckbox)
val calendar = Calendar.getInstance()
val year = calendar.get(Calendar.YEAR)
Expand Down Expand Up @@ -161,12 +166,12 @@ class HomeFragment : Fragment() {
}

}
dialog.show()
val dialogHeight = context?.let { dpToPx(450, it) }
val dialogWidth = context?.let { dpToPx(400, it) }
if (dialogWidth != null && dialogHeight != null) {
dialog.window?.setLayout(dialogWidth, dialogHeight)
}
dialog.show()

}

Expand Down
18 changes: 0 additions & 18 deletions app/src/main/java/com/zerodev/todo/ui/settings/SettingsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,18 @@ import android.annotation.SuppressLint
import android.app.AlertDialog
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
import android.content.SharedPreferences
import android.graphics.Color
import android.os.Bundle
import android.os.Environment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContracts
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import com.anggrayudi.storage.SimpleStorageHelper
import com.google.android.material.snackbar.Snackbar
import com.google.firebase.FirebaseApp
import com.google.firebase.auth.FirebaseAuth
import com.zerodev.todo.Data.NotifSounds
import com.zerodev.todo.databinding.FragmentSettingsBinding
import com.zerodev.todo.signupActivity
import java.io.File
import java.io.FileOutputStream
import java.io.IOException

class SettingsFragment : Fragment() {

Expand Down Expand Up @@ -54,8 +44,6 @@ class SettingsFragment : Fragment() {
val settingsPref = context?.getSharedPreferences("settings", Context.MODE_PRIVATE)
val notifSounds = context?.let { NotifSounds(it) }
val notifSoundArray = notifSounds?.soundArray
val intent = Intent(this.requireContext(), signupActivity::class.java)
startActivity(intent)
if (settingsPref != null) {
settingsViewModel.setSharedPref(settingsPref)
}
Expand All @@ -70,8 +58,6 @@ class SettingsFragment : Fragment() {
binding.notifImportancetxt.text =
" ${notifImportance[settingsPref.getInt("notifImportance", 0)]}"
}
// backup list click


// notif sound click listener
binding.notifSound.setOnClickListener {
Expand Down Expand Up @@ -149,10 +135,6 @@ class SettingsFragment : Fragment() {
}






override fun onDestroyView() {
super.onDestroyView()
_binding = null
Expand Down
Loading

0 comments on commit 6d2b680

Please sign in to comment.