issues almost done
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||||
|
|
||||||
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
||||||
<application
|
<application
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
android:localeConfig="@xml/locales_config"
|
android:localeConfig="@xml/locales_config"
|
||||||
android:theme="@style/Theme.FieldAgent"
|
android:theme="@style/Theme.FieldAgent"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
@ -39,11 +41,13 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.login.LoginActivity"
|
android:name=".ui.login.LoginActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
/>
|
/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.homescreen.HomeActivity"
|
android:name=".ui.homescreen.HomeActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
BIN
app/src/main/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 31 KiB |
|
@ -15,13 +15,12 @@ interface WebService {
|
||||||
private const val INSPECTIONS = "inspections"
|
private const val INSPECTIONS = "inspections"
|
||||||
private const val DAMAGES = "damages"
|
private const val DAMAGES = "damages"
|
||||||
private const val RESTROOM_LIST = "restroom-conditions"
|
private const val RESTROOM_LIST = "restroom-conditions"
|
||||||
private const val ITEM_LIST = "combined-list"
|
|
||||||
private const val CATEGORY = "categories"
|
private const val CATEGORY = "categories"
|
||||||
private const val SELECT_CATEGORY = "categories"
|
private const val SELECT_CATEGORY = "categories"
|
||||||
private const val SUB_CATEGORY = "subcategories"
|
|
||||||
private const val USER = "users"
|
private const val USER = "users"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*POST APIS*/
|
/*POST APIS*/
|
||||||
|
|
|
@ -29,6 +29,9 @@ data class InspectionList (
|
||||||
val totalRestrooms: Long? = null,
|
val totalRestrooms: Long? = null,
|
||||||
val restroomCondition: String? = null,
|
val restroomCondition: String? = null,
|
||||||
val vat: String? = null,
|
val vat: String? = null,
|
||||||
|
|
||||||
|
@SerializedName("unique_hash")
|
||||||
|
val uniqueHash: String? = null,
|
||||||
val image: String? = null,
|
val image: String? = null,
|
||||||
val isCompleted: Boolean? = null,
|
val isCompleted: Boolean? = null,
|
||||||
val isDeleted: Boolean? = null,
|
val isDeleted: Boolean? = null,
|
||||||
|
|
|
@ -8,6 +8,8 @@ import android.content.pm.PackageManager
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.location.Geocoder
|
import android.location.Geocoder
|
||||||
|
import android.location.Location
|
||||||
|
import android.location.LocationRequest
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -53,11 +55,16 @@ import com.example.fieldagent.utils.gone
|
||||||
import com.example.fieldagent.utils.hideKeyboard
|
import com.example.fieldagent.utils.hideKeyboard
|
||||||
import com.example.fieldagent.utils.hideShowView
|
import com.example.fieldagent.utils.hideShowView
|
||||||
import com.example.fieldagent.utils.isConnectedToInternet
|
import com.example.fieldagent.utils.isConnectedToInternet
|
||||||
|
import com.example.fieldagent.utils.showFullScreenImage
|
||||||
import com.example.fieldagent.utils.showSnackBar
|
import com.example.fieldagent.utils.showSnackBar
|
||||||
import com.example.fieldagent.utils.uriToFile
|
import com.example.fieldagent.utils.uriToFile
|
||||||
import com.example.fieldagent.utils.visible
|
import com.example.fieldagent.utils.visible
|
||||||
import com.google.android.gms.location.FusedLocationProviderClient
|
import com.google.android.gms.location.FusedLocationProviderClient
|
||||||
|
import com.google.android.gms.location.LocationCallback
|
||||||
|
import com.google.android.gms.location.LocationResult
|
||||||
import com.google.android.gms.location.LocationServices
|
import com.google.android.gms.location.LocationServices
|
||||||
|
import com.google.android.gms.location.Priority
|
||||||
|
import com.google.android.gms.tasks.CancellationTokenSource
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
@ -228,6 +235,10 @@ class AddSiteFragment : Fragment() {
|
||||||
binding.ivCloseImage.gone()
|
binding.ivCloseImage.gone()
|
||||||
imageUri=null;
|
imageUri=null;
|
||||||
}
|
}
|
||||||
|
binding.ivSetImage.setOnClickListener {
|
||||||
|
|
||||||
|
showFullScreenImage(imageUri.toString(),requireActivity())
|
||||||
|
}
|
||||||
|
|
||||||
// Permission launcher
|
// Permission launcher
|
||||||
permissionLauncher = registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { permissions ->
|
permissionLauncher = registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { permissions ->
|
||||||
|
@ -279,6 +290,9 @@ class AddSiteFragment : Fragment() {
|
||||||
binding.etSupervisorContact.text.toString().isEmpty() -> {
|
binding.etSupervisorContact.text.toString().isEmpty() -> {
|
||||||
binding.etSupervisorContact.showSnackBar(getString(R.string.please_enter_supervisor_contact_number))
|
binding.etSupervisorContact.showSnackBar(getString(R.string.please_enter_supervisor_contact_number))
|
||||||
}
|
}
|
||||||
|
binding.etSupervisorContact.text.toString().length < 7 || binding.etSupervisorContact.text.toString().length > 11 -> {
|
||||||
|
binding.etSupervisorContact.showSnackBar(getString(R.string.contact_number_length_error))
|
||||||
|
}
|
||||||
|
|
||||||
binding.etSupervisorAuthority.text.toString().isEmpty() -> {
|
binding.etSupervisorAuthority.text.toString().isEmpty() -> {
|
||||||
binding.etSupervisorAuthority.showSnackBar(getString(R.string.please_enter_supervisor_authority_mosque))
|
binding.etSupervisorAuthority.showSnackBar(getString(R.string.please_enter_supervisor_authority_mosque))
|
||||||
|
@ -331,7 +345,7 @@ class AddSiteFragment : Fragment() {
|
||||||
it ?: return@Observer
|
it ?: return@Observer
|
||||||
when (it.status) {
|
when (it.status) {
|
||||||
Status.SUCCESS -> {
|
Status.SUCCESS -> {
|
||||||
|
parentFragmentManager.setFragmentResult("refresh_home", Bundle())
|
||||||
findNavController().popBackStack();
|
findNavController().popBackStack();
|
||||||
progressDialog.setLoading(false)
|
progressDialog.setLoading(false)
|
||||||
}
|
}
|
||||||
|
@ -386,12 +400,32 @@ class AddSiteFragment : Fragment() {
|
||||||
|
|
||||||
@SuppressLint("MissingPermission")
|
@SuppressLint("MissingPermission")
|
||||||
private fun getCurrentLocation() {
|
private fun getCurrentLocation() {
|
||||||
fusedLocationClient.lastLocation.addOnSuccessListener { location ->
|
val locationRequest = LocationRequest.Builder(
|
||||||
|
Priority.PRIORITY_HIGH_ACCURACY,
|
||||||
|
5000 // interval in milliseconds
|
||||||
|
).build()
|
||||||
|
fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null)
|
||||||
|
/* fusedLocationClient.lastLocation.addOnSuccessListener { location ->
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
getAddressFromLocation(location.latitude, location.longitude)
|
getAddressFromLocation(location.latitude, location.longitude)
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(requireActivity(), getString(R.string.could_not_fetch_location), Toast.LENGTH_SHORT).show()
|
Toast.makeText(requireActivity(), getString(R.string.could_not_fetch_location), Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop location updates
|
||||||
|
private fun stopLocationUpdates() {
|
||||||
|
fusedLocationClient.removeLocationUpdates(locationCallback)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val locationCallback = object : LocationCallback() {
|
||||||
|
override fun onLocationResult(locationResult: LocationResult) {
|
||||||
|
super.onLocationResult(locationResult)
|
||||||
|
// Process the location data
|
||||||
|
val location: Location = locationResult.lastLocation!!
|
||||||
|
Log.e("ChecLofgggf==>","${location.longitude}")
|
||||||
|
// ... (Display location on map, etc.) ...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,7 +409,9 @@ class DamageDetailsFragment : Fragment() {
|
||||||
val tempData=it.data?.data
|
val tempData=it.data?.data
|
||||||
if(tempData?.categories!=null && tempData.categories.isNotEmpty() && tempData.categories[0].subCategories!=null && tempData.categories[0].subCategories!!.isNotEmpty())
|
if(tempData?.categories!=null && tempData.categories.isNotEmpty() && tempData.categories[0].subCategories!=null && tempData.categories[0].subCategories!!.isNotEmpty())
|
||||||
{
|
{
|
||||||
tempData.categories[0].subCategories?.let { it1 -> subCategoryList.addAll(it1) }
|
tempData.categories[0].subCategories?.let { it1 ->
|
||||||
|
subCategoryList.clear()
|
||||||
|
subCategoryList.addAll(it1) }
|
||||||
binding.llUnits.visible()
|
binding.llUnits.visible()
|
||||||
binding.llSubItem.visible()
|
binding.llSubItem.visible()
|
||||||
val subCategoryNames = subCategoryList.map { it.name }
|
val subCategoryNames = subCategoryList.map { it.name }
|
||||||
|
|
|
@ -11,6 +11,8 @@ import com.example.fieldagent.ui.damagedetails.DamageDetailsFragment
|
||||||
import com.example.fieldagent.utils.gone
|
import com.example.fieldagent.utils.gone
|
||||||
import com.example.fieldagent.utils.visible
|
import com.example.fieldagent.utils.visible
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
|
import com.example.fieldagent.utils.IMAGE_BASE_URL
|
||||||
|
import com.example.fieldagent.utils.showFullScreenImage
|
||||||
|
|
||||||
|
|
||||||
class DamageDetailsAdapter(
|
class DamageDetailsAdapter(
|
||||||
|
@ -57,6 +59,10 @@ class DamageDetailsAdapter(
|
||||||
holder.binding.ivCloseImage.setOnClickListener {
|
holder.binding.ivCloseImage.setOnClickListener {
|
||||||
damageDetailsFragment.removeImage(position)
|
damageDetailsFragment.removeImage(position)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
holder.binding.cardImage.setOnClickListener {
|
||||||
|
showFullScreenImage(imageList[position].toString(),holder.binding.root.context)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
holder.binding.rlUploadImage.visible()
|
holder.binding.rlUploadImage.visible()
|
||||||
holder.binding.cardImage.gone()
|
holder.binding.cardImage.gone()
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
package com.example.fieldagent.ui.damagelist
|
package com.example.fieldagent.ui.damagelist
|
||||||
|
|
||||||
|
import android.app.DownloadManager
|
||||||
import android.content.ContentValues
|
import android.content.ContentValues
|
||||||
|
import android.content.Context
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.Paint
|
import android.graphics.Paint
|
||||||
import android.graphics.pdf.PdfDocument
|
import android.graphics.pdf.PdfDocument
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Environment
|
import android.os.Environment
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
|
import android.util.Log
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -42,6 +46,25 @@ import javax.inject.Inject
|
||||||
import androidx.core.graphics.toColorInt
|
import androidx.core.graphics.toColorInt
|
||||||
import androidx.core.graphics.createBitmap
|
import androidx.core.graphics.createBitmap
|
||||||
import androidx.core.text.layoutDirection
|
import androidx.core.text.layoutDirection
|
||||||
|
import com.example.fieldagent.utils.DOWNLOAD_URL
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.IOException
|
||||||
|
|
||||||
|
import okhttp3.ResponseBody
|
||||||
|
import retrofit2.Retrofit
|
||||||
|
|
||||||
|
import retrofit2.*
|
||||||
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
|
|
||||||
|
import retrofit2.http.GET
|
||||||
|
import retrofit2.http.Streaming
|
||||||
|
import retrofit2.http.Url
|
||||||
|
import java.io.*
|
||||||
|
import retrofit2.Call
|
||||||
|
import retrofit2.Callback
|
||||||
|
import retrofit2.Response
|
||||||
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
|
@ -63,6 +86,7 @@ class DamageListFragment : Fragment() {
|
||||||
private var inspectionId=""
|
private var inspectionId=""
|
||||||
private var clickDeletePos=-1
|
private var clickDeletePos=-1
|
||||||
private var vatValue=""
|
private var vatValue=""
|
||||||
|
private var hashCode=""
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
@ -118,8 +142,12 @@ class DamageListFragment : Fragment() {
|
||||||
binding.btnExportPdf.gone()
|
binding.btnExportPdf.gone()
|
||||||
}else{
|
}else{
|
||||||
vatValue=tempList[0].vat.toString()
|
vatValue=tempList[0].vat.toString()
|
||||||
|
hashCode=tempList[0].uniqueHash.toString()
|
||||||
|
Log.e("Checkkkschhsh==>","${hashCode}")
|
||||||
binding.clNoData.gone()
|
binding.clNoData.gone()
|
||||||
binding.btnExportPdf.visible()
|
binding.btnExportPdf.visible()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
tempList[0].damages?.let { it1 ->
|
tempList[0].damages?.let { it1 ->
|
||||||
adapter.submitList(it1)
|
adapter.submitList(it1)
|
||||||
|
@ -197,6 +225,18 @@ class DamageListFragment : Fragment() {
|
||||||
binding.btnExportPdf.setOnClickListener {
|
binding.btnExportPdf.setOnClickListener {
|
||||||
|
|
||||||
// setUpPdf()
|
// setUpPdf()
|
||||||
|
|
||||||
|
val url = DOWNLOAD_URL+hashCode
|
||||||
|
val downloadsFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
|
||||||
|
val fileName = url.substringAfterLast('/')+".pdf"
|
||||||
|
val destinationFile = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), fileName)
|
||||||
|
Log.e("cHehfehchh===>","${url}");
|
||||||
|
val success = downloadPdfFile(url, destinationFile)
|
||||||
|
/* if (success) {
|
||||||
|
Toast.makeText(context, getString(R.string.pdf_saved), Toast.LENGTH_LONG).show()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(context, getString(R.string.pdf_failed), Toast.LENGTH_LONG).show()
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -562,8 +602,97 @@ class DamageListFragment : Fragment() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fun downloadPdfFile(fileUrl: String, outputFile: File) {
|
||||||
|
|
||||||
|
val okHttpClient = OkHttpClient.Builder()
|
||||||
|
.followRedirects(true)
|
||||||
|
.followSslRedirects(true)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
val retrofit = Retrofit.Builder()
|
||||||
|
.baseUrl("https://example.com/") // Placeholder, overridden by @Url
|
||||||
|
.client(okHttpClient)
|
||||||
|
.addConverterFactory(GsonConverterFactory.create())
|
||||||
|
.build()
|
||||||
|
|
||||||
|
val service = retrofit.create(FileDownloadService::class.java)
|
||||||
|
val call = service.downloadFile(fileUrl)
|
||||||
|
|
||||||
|
call.enqueue(object : Callback<ResponseBody> {
|
||||||
|
override fun onResponse(call: Call<ResponseBody>, response: Response<ResponseBody>) {
|
||||||
|
if (!response.isSuccessful) {
|
||||||
|
println("❌ Server returned error: ${response.code()}")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val contentType = response.body()?.contentType()?.toString()
|
||||||
|
val contentLength = response.body()?.contentLength() ?: 0L
|
||||||
|
|
||||||
|
println("✅ Content-Type: $contentType")
|
||||||
|
println("✅ Content-Length: $contentLength bytes")
|
||||||
|
|
||||||
|
if (contentType?.contains("pdf", ignoreCase = true) == true) {
|
||||||
|
response.body()?.let { body ->
|
||||||
|
val success = saveFile(body, outputFile)
|
||||||
|
if (success) {
|
||||||
|
println("✅ PDF saved at: ${outputFile.absolutePath}")
|
||||||
|
} else {
|
||||||
|
println("❌ Failed to save PDF.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
println("❌ The file is not a PDF (Content-Type: $contentType).")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailure(call: Call<ResponseBody>, t: Throwable) {
|
||||||
|
println("❌ Download error: ${t.localizedMessage}")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun saveFile(body: ResponseBody, outputFile: File): Boolean {
|
||||||
|
return try {
|
||||||
|
val inputStream = body.byteStream()
|
||||||
|
val outputStream = FileOutputStream(outputFile)
|
||||||
|
val buffer = ByteArray(4096)
|
||||||
|
var bytesRead: Int
|
||||||
|
|
||||||
|
while (inputStream.read(buffer).also { bytesRead = it } != -1) {
|
||||||
|
outputStream.write(buffer, 0, bytesRead)
|
||||||
|
}
|
||||||
|
|
||||||
|
outputStream.flush()
|
||||||
|
outputStream.close()
|
||||||
|
inputStream.close()
|
||||||
|
|
||||||
|
// Verify PDF file header
|
||||||
|
val header = FileInputStream(outputFile).use { it.readNBytes(4) }
|
||||||
|
if (String(header) != "%PDF") {
|
||||||
|
outputFile.delete()
|
||||||
|
println("❌ Invalid PDF signature in downloaded file.")
|
||||||
|
false
|
||||||
|
} else {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
} catch (e: IOException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
_binding = null
|
_binding = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface FileDownloadService {
|
||||||
|
@Streaming
|
||||||
|
@GET
|
||||||
|
fun downloadFile(@Url fileUrl: String): Call<ResponseBody>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ class DamageListAdapter(val damageListFragment: DamageListFragment) : RecyclerVi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun submitList(list: ArrayList<Damage>) {
|
fun submitList(list: ArrayList<Damage>) {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.example.fieldagent.databinding.FillImageAdapterBinding
|
||||||
import com.example.fieldagent.ui.homescreen.adapter.HomeAdapter.ViewHolder
|
import com.example.fieldagent.ui.homescreen.adapter.HomeAdapter.ViewHolder
|
||||||
import com.example.fieldagent.utils.DateUtils.getTimeAgo
|
import com.example.fieldagent.utils.DateUtils.getTimeAgo
|
||||||
import com.example.fieldagent.utils.IMAGE_BASE_URL
|
import com.example.fieldagent.utils.IMAGE_BASE_URL
|
||||||
|
import com.example.fieldagent.utils.showFullScreenImage
|
||||||
|
|
||||||
class ShowImageAdapter(private val images: List<String>?) : RecyclerView.Adapter<ShowImageAdapter.ShowImageHolder>() {
|
class ShowImageAdapter(private val images: List<String>?) : RecyclerView.Adapter<ShowImageAdapter.ShowImageHolder>() {
|
||||||
|
|
||||||
|
@ -24,6 +25,10 @@ class ShowImageAdapter(private val images: List<String>?) : RecyclerView.Adapter
|
||||||
.into(binding.ivUploadImage)
|
.into(binding.ivUploadImage)
|
||||||
|
|
||||||
|
|
||||||
|
binding.rvImage.setOnClickListener {
|
||||||
|
|
||||||
|
showFullScreenImage(IMAGE_BASE_URL + imageUrl,binding.root.context)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,11 +117,21 @@ class HomeFragment : Fragment() {
|
||||||
|
|
||||||
prefsManager.save(IS_LOGIN,true)
|
prefsManager.save(IS_LOGIN,true)
|
||||||
|
|
||||||
if (isFirstPage) {
|
if (viewModel.inspections.value?.data?.data?.inspections.isNullOrEmpty()) {
|
||||||
val hashMap = HashMap<String, String>()
|
val hashMap = HashMap<String, String>()
|
||||||
hashMap[LIMIT_TEXT] = PER_PAGE_LOAD
|
hashMap[LIMIT_TEXT] = PER_PAGE_LOAD
|
||||||
hashMap[PAGE_TEXT] = PER_PAGE
|
hashMap[PAGE_TEXT] = PER_PAGE
|
||||||
viewModel.getInspectionList(hashMap);
|
viewModel.getInspectionList(hashMap);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
parentFragmentManager.setFragmentResultListener("refresh_home", viewLifecycleOwner) { _, _ ->
|
||||||
|
refreshPagination()
|
||||||
|
val hashMap = HashMap<String, String>()
|
||||||
|
hashMap[LIMIT_TEXT] = PER_PAGE_LOAD
|
||||||
|
hashMap[PAGE_TEXT] = PER_PAGE
|
||||||
|
viewModel.getInspectionList(hashMap)
|
||||||
|
binding.rvList.scrollToPosition(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,6 +328,8 @@ class HomeFragment : Fragment() {
|
||||||
items.clear() // Clear the list on first load to prevent duplicates
|
items.clear() // Clear the list on first load to prevent duplicates
|
||||||
items.addAll(tempList)
|
items.addAll(tempList)
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
val oldSize = items.size
|
val oldSize = items.size
|
||||||
// Add only new items to avoid duplication
|
// Add only new items to avoid duplication
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.example.fieldagent.utils.DateUtils.getTimeAgo
|
||||||
import com.example.fieldagent.utils.IMAGE_BASE_URL
|
import com.example.fieldagent.utils.IMAGE_BASE_URL
|
||||||
import com.example.fieldagent.utils.LoadingStatus.ITEM
|
import com.example.fieldagent.utils.LoadingStatus.ITEM
|
||||||
import com.example.fieldagent.utils.LoadingStatus.LOADING
|
import com.example.fieldagent.utils.LoadingStatus.LOADING
|
||||||
|
import com.example.fieldagent.utils.showFullScreenImage
|
||||||
|
|
||||||
class HomeAdapter(private val fragment: HomeFragment,private val items: ArrayList<InspectionList>) :
|
class HomeAdapter(private val fragment: HomeFragment,private val items: ArrayList<InspectionList>) :
|
||||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||||
|
@ -76,6 +77,12 @@ class HomeAdapter(private val fragment: HomeFragment,private val items: ArrayLi
|
||||||
.error(R.drawable.home_item) // Set a default image if the requested image fails to load
|
.error(R.drawable.home_item) // Set a default image if the requested image fails to load
|
||||||
.fallback(R.drawable.home_item)
|
.fallback(R.drawable.home_item)
|
||||||
.into(binding.ivImage)
|
.into(binding.ivImage)
|
||||||
|
|
||||||
|
|
||||||
|
binding.ivImage.setOnClickListener {
|
||||||
|
showFullScreenImage(IMAGE_BASE_URL+item.image,binding.root.context)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ const val SEARCH = "search"
|
||||||
const val PAGE_TEXT = "page"
|
const val PAGE_TEXT = "page"
|
||||||
const val PER_PAGE_LOAD = "10"
|
const val PER_PAGE_LOAD = "10"
|
||||||
const val IMAGE_BASE_URL = "https://field-api.dmlabs.in/api/image/"
|
const val IMAGE_BASE_URL = "https://field-api.dmlabs.in/api/image/"
|
||||||
|
const val DOWNLOAD_URL = "https://field-admin.dmlabs.in/inspections/report/"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,21 @@ import com.example.fieldagent.R
|
||||||
fun isConnectedToInternet(context: Context, showAlert: Boolean): Boolean {
|
fun isConnectedToInternet(context: Context, showAlert: Boolean): Boolean {
|
||||||
val isConnected = isConnectedToInternet(context)
|
val isConnected = isConnectedToInternet(context)
|
||||||
|
|
||||||
|
if (!isConnected)
|
||||||
|
{
|
||||||
|
if(showAlert)
|
||||||
|
{
|
||||||
|
Toast.makeText(context,context.getString(R.string.check_internet),Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}else{
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun isConnectedToInternetHome(context: Context, showAlert: Boolean): Boolean {
|
||||||
|
val isConnected = isConnectedToInternet(context)
|
||||||
|
|
||||||
if (!isConnected)
|
if (!isConnected)
|
||||||
{
|
{
|
||||||
Toast.makeText(context,context.getString(R.string.check_internet),Toast.LENGTH_SHORT).show()
|
Toast.makeText(context,context.getString(R.string.check_internet),Toast.LENGTH_SHORT).show()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.example.fieldagent.utils
|
package com.example.fieldagent.utils
|
||||||
|
|
||||||
|
import android.app.AlertDialog
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
@ -7,6 +8,7 @@ import android.graphics.drawable.ColorDrawable
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
@ -21,6 +23,9 @@ import okhttp3.RequestBody
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
import com.example.fieldagent.databinding.DialogFullScreenImageBinding
|
||||||
|
import androidx.core.graphics.drawable.toDrawable
|
||||||
|
|
||||||
|
|
||||||
fun View.gone() {
|
fun View.gone() {
|
||||||
|
@ -139,6 +144,38 @@ fun Context.showUpdateDialog(
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun showFullScreenImage(imagePath: String, context: Context) {
|
||||||
|
|
||||||
|
val dialogBinding = DialogFullScreenImageBinding.inflate(LayoutInflater.from(context))
|
||||||
|
|
||||||
|
val dialog = AlertDialog.Builder(context, R.style.TransparentDialog)
|
||||||
|
.setView(dialogBinding.root)
|
||||||
|
.create()
|
||||||
|
|
||||||
|
val isUrl = imagePath.startsWith("http://") || imagePath.startsWith("https://")
|
||||||
|
|
||||||
|
if (isUrl) {
|
||||||
|
Glide.with(context)
|
||||||
|
.load(imagePath)
|
||||||
|
.into(dialogBinding.fullscreenImage)
|
||||||
|
} else {
|
||||||
|
Glide.with(context)
|
||||||
|
.load(imagePath.toUri())
|
||||||
|
.into(dialogBinding.fullscreenImage)
|
||||||
|
}
|
||||||
|
dialogBinding.closeButton.setOnClickListener { dialog.dismiss() }
|
||||||
|
|
||||||
|
dialog.show()
|
||||||
|
|
||||||
|
|
||||||
|
dialog.window?.setLayout(
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
|
)
|
||||||
|
dialog.window?.setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fun hideKeyboard(fragment: Fragment) {
|
fun hideKeyboard(fragment: Fragment) {
|
||||||
val inputMethodManager = fragment.requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
val inputMethodManager = fragment.requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
|
|
|
@ -6,11 +6,13 @@
|
||||||
android:layout_height="@dimen/dp_100"
|
android:layout_height="@dimen/dp_100"
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:background="@drawable/line_spce_line">
|
>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rlUploadImage"
|
android:id="@+id/rlUploadImage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="@dimen/dp_160"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="@dimen/dp_100"
|
||||||
|
android:background="@drawable/line_spce_line"
|
||||||
>
|
>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -53,8 +55,10 @@
|
||||||
android:id="@+id/cardImage"
|
android:id="@+id/cardImage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:cardCornerRadius="@dimen/dp_4"
|
app:cardCornerRadius="@dimen/dp_4"
|
||||||
|
android:layout_margin="@dimen/dp_1"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
>
|
>
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
24
app/src/main/res/layout/dialog_full_screen_image.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/transparent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/fullscreen_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/close_button"
|
||||||
|
android:layout_width="@dimen/dp_48"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:elevation="@dimen/dp_8"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:padding="@dimen/dp_4"
|
||||||
|
android:src="@drawable/close_circle"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
|
@ -7,6 +7,7 @@
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
app:cardCornerRadius="@dimen/dp_6"
|
app:cardCornerRadius="@dimen/dp_6"
|
||||||
android:layout_margin="@dimen/dp_2"
|
android:layout_margin="@dimen/dp_2"
|
||||||
android:background="@drawable/line_space_line_color">
|
android:background="@drawable/line_space_line_color">
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
android:hint="@string/please_enter_supervisor_contact_number"
|
android:hint="@string/please_enter_supervisor_contact_number"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:maxLength="15"
|
android:maxLength="11"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/montserratregular"
|
android:fontFamily="@font/montserratregular"
|
||||||
|
@ -448,7 +448,7 @@
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
||||||
app:layout_constraintTop_toBottomOf="@id/txtAddImage"
|
app:layout_constraintTop_toBottomOf="@id/txtAddImage"
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:background="@drawable/line_spce_line"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -471,6 +471,7 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:cardCornerRadius="@dimen/dp_4"
|
app:cardCornerRadius="@dimen/dp_4"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
android:layout_margin="@dimen/dp_1"
|
||||||
>
|
>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivSetImage"
|
android:id="@+id/ivSetImage"
|
||||||
|
@ -486,9 +487,10 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/llUploadImage"
|
android:id="@+id/llUploadImage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_160"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/line_spce_line"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
>
|
>
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -63,360 +63,363 @@
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
<LinearLayout
|
android:id="@+id/scrollViewContent"
|
||||||
android:id="@+id/llMainItem"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/rlTop"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
||||||
app:layout_constraintTop_toBottomOf="@id/rlTop">
|
android:fillViewport="true"
|
||||||
|
android:scrollbars="none"
|
||||||
<TextView
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
android:background="@color/white">
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/main_item"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="*"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
|
|
||||||
android:textColor="@color/star_color"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/dropMainItem"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:endIconMode="custom"
|
|
||||||
app:endIconDrawable="@drawable/drop_down"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llMainItem">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/autoCompleteMain"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@drawable/rounded_edit_text_background"
|
|
||||||
android:inputType="none"
|
|
||||||
android:focusable="false"
|
|
||||||
android:clickable="true"
|
|
||||||
android:text="@string/please_select_category"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/llSubItem"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/dropMainItem">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:background="@color/white">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/txtSubItem"
|
android:id="@+id/llMainItem"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/sub_item"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="*"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:textColor="@color/star_color"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/dropSubItem"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:endIconMode="custom"
|
|
||||||
app:endIconDrawable="@drawable/drop_down">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/autoCompleteSub"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/main_item"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
|
||||||
|
android:textColor="@color/star_color"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/dropMainItem"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
|
app:endIconMode="custom"
|
||||||
|
app:endIconDrawable="@drawable/drop_down"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/llMainItem">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/autoCompleteMain"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/rounded_edit_text_background"
|
||||||
|
android:inputType="none"
|
||||||
|
android:focusable="false"
|
||||||
|
android:clickable="true"
|
||||||
|
android:text="@string/please_select_category"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llSubItem"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/dropMainItem">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtSubItem"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/sub_item"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:textColor="@color/star_color"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/dropSubItem"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:endIconMode="custom"
|
||||||
|
app:endIconDrawable="@drawable/drop_down">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/autoCompleteSub"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/rounded_edit_text_background"
|
||||||
|
android:inputType="none"
|
||||||
|
android:focusable="false"
|
||||||
|
android:clickable="true"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llUnits"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/llSubItem"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/units"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
||||||
|
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/llSubItem"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/dropUnits"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
>
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/autoCompleteUnits"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/rounded_edit_text_background"
|
||||||
|
android:inputType="none"
|
||||||
|
android:focusable="false"
|
||||||
|
android:clickable="true"
|
||||||
|
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llItemQuality"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/llUnits"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/item_quantity"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:textColor="@color/star_color"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etItemQuantity"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/rounded_edit_text_background"
|
android:background="@drawable/rounded_edit_text_background"
|
||||||
android:inputType="none"
|
|
||||||
android:focusable="false"
|
app:layout_constraintTop_toBottomOf="@id/llItemQuality"
|
||||||
android:clickable="true"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="@dimen/sp_12"
|
android:maxLength="4"
|
||||||
|
android:hint="@string/please_enter_item_quantity"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:inputType="number"
|
||||||
android:fontFamily="@font/montserratregular"
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/llUnits"
|
android:id="@+id/llItemValue"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llSubItem"
|
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txtUnit"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/units"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llSubItem"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/dropUnits"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
>
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/autoCompleteUnits"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/rounded_edit_text_background"
|
app:layout_constraintTop_toBottomOf="@id/etItemQuantity"
|
||||||
android:inputType="none"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:focusable="false"
|
>
|
||||||
android:clickable="true"
|
|
||||||
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtItemValue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/item_value"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:textColor="@color/star_color"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etItemValue"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/rounded_edit_text_background"
|
||||||
|
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/llItemValue"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:hint="@string/please_enter_item_value"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/montserratregular"
|
android:fontFamily="@font/montserratregular"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</LinearLayout>
|
<LinearLayout
|
||||||
|
android:id="@+id/llImageView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/etItemValue"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/llItemQuality"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llUnits"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/add_image"
|
||||||
|
android:fontFamily="@font/montserratregular"
|
||||||
|
|
||||||
<TextView
|
android:textSize="@dimen/sp_14"
|
||||||
android:layout_width="wrap_content"
|
/>
|
||||||
android:layout_height="wrap_content"
|
<TextView
|
||||||
android:text="@string/item_quantity"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="*"
|
android:text="*"
|
||||||
android:fontFamily="@font/montserratregular"
|
android:fontFamily="@font/montserratregular"
|
||||||
android:textColor="@color/star_color"
|
android:textColor="@color/star_color"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rvImage"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_120"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/llImageView"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:orientation="horizontal"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnReport"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/rvImage"
|
||||||
|
android:layout_marginTop="@dimen/dp_28"
|
||||||
|
android:text="@string/add_to_report"
|
||||||
|
android:paddingTop="@dimen/dp_10"
|
||||||
|
android:paddingBottom="@dimen/dp_10"
|
||||||
|
android:fontFamily="@font/montserratsemibold"
|
||||||
|
android:background="@drawable/rounded_background"
|
||||||
|
android:textColor="#FFFFFF"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etItemQuantity"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/rounded_edit_text_background"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llItemQuality"
|
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
|
||||||
android:text=""
|
|
||||||
android:maxLength="4"
|
|
||||||
android:hint="@string/please_enter_item_quantity"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:inputType="number"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/llItemValue"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/etItemQuantity"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txtItemValue"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/item_value"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="*"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:textColor="@color/star_color"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etItemValue"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/rounded_edit_text_background"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llItemValue"
|
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
|
||||||
android:hint="@string/please_enter_item_value"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:inputType="number"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/llImageView"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/etItemValue"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/add_image"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="*"
|
|
||||||
android:fontFamily="@font/montserratregular"
|
|
||||||
android:textColor="@color/star_color"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rvImage"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="@dimen/dp_120"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llImageView"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:orientation="horizontal"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnReport"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/leftGuide"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/rvImage"
|
|
||||||
android:layout_marginTop="@dimen/dp_28"
|
|
||||||
android:text="@string/add_to_report"
|
|
||||||
android:paddingTop="@dimen/dp_10"
|
|
||||||
android:paddingBottom="@dimen/dp_10"
|
|
||||||
android:fontFamily="@font/montserratsemibold"
|
|
||||||
android:background="@drawable/rounded_background"
|
|
||||||
android:textColor="#FFFFFF"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,8 @@
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/btnExportPdf"
|
||||||
|
android:paddingBottom="@dimen/dp_10"
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
@ -158,14 +160,13 @@
|
||||||
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
app:layout_constraintEnd_toStartOf="@id/rightGuide"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
android:layout_marginTop="@dimen/dp_28"
|
|
||||||
android:text="@string/export_pdf"
|
android:text="@string/export_pdf"
|
||||||
android:paddingTop="@dimen/dp_10"
|
android:paddingTop="@dimen/dp_10"
|
||||||
android:paddingBottom="@dimen/dp_10"
|
android:paddingBottom="@dimen/dp_10"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:fontFamily="@font/montserratsemibold"
|
android:fontFamily="@font/montserratsemibold"
|
||||||
android:background="@drawable/rounded_background"
|
android:background="@drawable/rounded_background"
|
||||||
android:layout_marginBottom="@dimen/dp_40"
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
android:textColor="#FFFFFF"/>
|
android:textColor="#FFFFFF"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
app:layout_constraintTop_toBottomOf="@+id/rlTop"
|
app:layout_constraintTop_toBottomOf="@+id/rlTop"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
>
|
>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 928 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 8.2 KiB |
|
@ -106,6 +106,7 @@
|
||||||
<string name="vat">ضريبة القيمة المضافة</string>
|
<string name="vat">ضريبة القيمة المضافة</string>
|
||||||
<string name="pdf_saved">تم حفظ ملف PDF في المستندات!</string>
|
<string name="pdf_saved">تم حفظ ملف PDF في المستندات!</string>
|
||||||
<string name="pdf_failed">فشل في حفظ ملف PDF!</string>
|
<string name="pdf_failed">فشل في حفظ ملف PDF!</string>
|
||||||
|
<string name="contact_number_length_error">الرجاء إدخال رقم اتصال صالح يتكون من 7 إلى 11 رقمًا</string>
|
||||||
<string name="please_enter_valid_password">يجب أن تتكون كلمة المرور من 6 أحرف على الأقل وتتضمن حرفًا كبيرًا واحدًا ورقمًا واحدًا وحرفًا خاصًا واحدًا</string>
|
<string name="please_enter_valid_password">يجب أن تتكون كلمة المرور من 6 أحرف على الأقل وتتضمن حرفًا كبيرًا واحدًا ورقمًا واحدًا وحرفًا خاصًا واحدًا</string>
|
||||||
|
|
||||||
<string-array name="availability">
|
<string-array name="availability">
|
||||||
|
|
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#FFFFFF</color>
|
||||||
|
</resources>
|
|
@ -106,6 +106,8 @@
|
||||||
<string name="vat">VAT</string>
|
<string name="vat">VAT</string>
|
||||||
<string name="pdf_saved">PDF saved to Documents!</string>
|
<string name="pdf_saved">PDF saved to Documents!</string>
|
||||||
<string name="pdf_failed">Failed to save PDF!</string>
|
<string name="pdf_failed">Failed to save PDF!</string>
|
||||||
|
<string name="contact_number_length_error">Please enter a valid contact number with 7 to 11 digits</string>
|
||||||
|
|
||||||
|
|
||||||
<string-array name="availability">
|
<string-array name="availability">
|
||||||
<item>@string/yes</item>
|
<item>@string/yes</item>
|
||||||
|
|
|
@ -6,4 +6,12 @@
|
||||||
<item name="android:windowBackground">@android:color/transparent</item>
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="TransparentDialog" parent="Theme.AppCompat.Dialog">
|
||||||
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
|
<item name="android:windowIsFloating">false</item>
|
||||||
|
<item name="android:windowFullscreen">true</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|