Skip to content

Commit

Permalink
ui updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Fa-d committed Nov 27, 2022
1 parent 2536cb7 commit 2905524
Show file tree
Hide file tree
Showing 56 changed files with 5,378 additions and 60 deletions.
17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

15 changes: 4 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,17 @@ dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'

def lifecycle_version = "2.5.1"
/* def lifecycle_version = "2.5.1"
implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"*/

implementation 'com.google.android.material:material:1.7.0'
implementation 'com.google.android.exoplayer:exoplayer:2.18.1'

implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.20"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"

Expand All @@ -86,8 +81,6 @@ dependencies {
def compiler_version = "1.0.0"
kapt "androidx.hilt:hilt-compiler:$compiler_version"
implementation "androidx.hilt:hilt-common:$compiler_version"
implementation "androidx.hilt:hilt-work:$compiler_version"
implementation 'androidx.work:work-runtime-ktx:2.7.1'

def room_version = "2.4.3"
implementation "androidx.room:room-runtime:$room_version"
Expand All @@ -102,9 +95,9 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.7"
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'

// Firebase and Firestore
/* // Firebase and Firestore
implementation 'com.google.firebase:firebase-auth-ktx:21.1.0'
implementation 'com.google.firebase:firebase-firestore-ktx:24.4.1'
implementation 'com.google.firebase:firebase-firestore-ktx:24.4.1'*/

implementation 'com.jakewharton.timber:timber:5.0.1'

Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
27 changes: 1 addition & 26 deletions app/src/main/java/dev/faddy/vyt1/di/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
package dev.faddy.vyt1.di

import android.app.Application
import androidx.hilt.work.HiltWorkerFactory
import androidx.work.Configuration
import dagger.hilt.android.HiltAndroidApp
import dev.faddy.vyt1.BuildConfig
import timber.log.Timber
import javax.inject.Inject

@HiltAndroidApp
class MainApplication : Application(), Configuration.Provider {
@Inject
lateinit var workerFactory: HiltWorkerFactory

override fun getWorkManagerConfiguration(): Configuration {
return if (BuildConfig.DEBUG) {
Configuration.Builder().setWorkerFactory(workerFactory)
.setMinimumLoggingLevel(android.util.Log.DEBUG).build()
} else {
Configuration.Builder().setWorkerFactory(workerFactory)
.setMinimumLoggingLevel(android.util.Log.ERROR).build()
}
}

override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
}
}
class MainApplication : Application()
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package dev.faddy.vyt1.fragments.bankAccount

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import dev.faddy.vyt1.databinding.FragmentAddBankAccountBinding

class AddBankAccountFragment : Fragment() {

private lateinit var binding: FragmentAddBankAccountBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
return FragmentAddBankAccountBinding.inflate(layoutInflater).also { binding = it }.root
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initView()
initClickListener()
}

private fun initView() {

}

private fun initClickListener() {
binding.saveButton.setOnClickListener {
findNavController().popBackStack()
}
binding.backButton.setOnClickListener {
findNavController().popBackStack()
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package dev.faddy.vyt1.fragments.bankAccount.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import dev.faddy.vyt1.databinding.ItemviewTransactionsDashboardBinding

class TransactionsDashboardAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>() {

var onItemClick: ((index: Int) -> Unit)? = null

private var datalist: MutableList<String> = mutableListOf()

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return ViewHolder(
ItemviewTransactionsDashboardBinding.inflate(
LayoutInflater.from(parent.context), parent, false
)
)
}

override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
if (holder is ViewHolder) {
val model = datalist[position]
val binding = holder.binding
binding.cusNameText.text = model
}
}

override fun getItemCount() = datalist.size

internal inner class ViewHolder(val binding: ItemviewTransactionsDashboardBinding) :
RecyclerView.ViewHolder(binding.root) {
init {
binding.root.setOnClickListener {
if (absoluteAdapterPosition != RecyclerView.NO_POSITION) {

}
}
}
}

fun intiData(dataP: MutableList<String>) {
datalist.clear()
datalist.addAll(dataP)
notifyDataSetChanged()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package dev.faddy.vyt1.fragments.payment_in

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import dev.faddy.vyt1.databinding.FragmentAdditionalChargesBinding

class AdditionalChargesFragment : Fragment() {

private lateinit var binding: FragmentAdditionalChargesBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
return FragmentAdditionalChargesBinding.inflate(layoutInflater).also { binding = it }.root
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initView()
initData()
initClickListener()
}

private fun initData() {
}

private fun initClickListener() {

}

private fun initView() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package dev.faddy.vyt1.fragments.payment_in

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import dev.faddy.vyt1.R

// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"

/**
* A simple [Fragment] subclass.
* Use the [AdditionalFieldsFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class AdditionalFieldsFragment : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_additional_fields, container, false)
}

companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment AdditionalFieldsFragment.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
AdditionalFieldsFragment().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package dev.faddy.vyt1.fragments.payment_in

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import dev.faddy.vyt1.databinding.FragmentDueDatesAndPaymentTermsBinding


class DueDatesAndPaymentTermsFragment : Fragment() {

private lateinit var binding: FragmentDueDatesAndPaymentTermsBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
return FragmentDueDatesAndPaymentTermsBinding.inflate(layoutInflater)
.also { binding = it }.root
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initView()
initData()
initClickListener()
}

private fun initClickListener() {

}

private fun initData() {

}

private fun initView() {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import dev.faddy.vyt1.R
import dev.faddy.vyt1.databinding.FragmentPaymentInBinding
import dev.faddy.vyt1.fragments.payment_in.bottomsheets.CashSelectBottomSheet
import dev.faddy.vyt1.fragments.payment_in.bottomsheets.PaymentInBottomSheet
import dev.faddy.vyt1.fragments.payment_in.bottomsheets.ShareBottomSheet
import dev.faddy.vyt1.utils.DatePickerFactory
Expand Down Expand Up @@ -50,6 +52,12 @@ class PaymentInFragment : Fragment() {
binding.buttonShare.setOnClickListener {
ShareBottomSheet().show(childFragmentManager, "ShareBottomSheet")
}
binding.cashSelectText.setOnClickListener {
CashSelectBottomSheet().show(childFragmentManager, "CashSelectBottomSheet")
}
binding.settingsButton.setOnClickListener {
findNavController().navigate(R.id.action_paymentInFragment_to_paymnetInSettingsFragment)
}
}

private fun initData() {}
Expand Down
Loading

0 comments on commit 2905524

Please sign in to comment.