This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.text.SimpleDateFormat | |
| import java.util.* | |
| fun getDefaultDateTime(date: String): String { | |
| val formatter = SimpleDateFormat("dd-MM-yyyy hh:mm aa") | |
| return formatter.format(date.toDate()) | |
| } | |
| fun getDefaultDateTime1(date: String): String { | |
| val formatter = SimpleDateFormat("dd-MM-yyyy HH:MM") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun onDocument(): Intent { | |
| val mimeTypes = arrayOf( | |
| "application/pdf", | |
| "image/*" | |
| ) | |
| val intent = Intent(Intent.ACTION_GET_CONTENT) | |
| intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); | |
| intent.addCategory(Intent.CATEGORY_OPENABLE) | |
| intent.type = if (mimeTypes.size == 1) mimeTypes[0] else "*/*" | |
| if (mimeTypes.isNotEmpty()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.text.TextUtils | |
| import android.widget.EditText | |
| import androidx.appcompat.widget.AppCompatEditText | |
| fun String.isEmpty(): Boolean { | |
| return (TextUtils.isEmpty(this) | |
| || this.equals("", ignoreCase = true) | |
| || this.equals("{}", ignoreCase = true) | |
| || this.equals("null", ignoreCase = true) | |
| || this.equals("undefined", ignoreCase = true)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.android.gms.maps.GoogleMap | |
| import com.google.android.gms.maps.model.LatLng | |
| import com.google.android.gms.maps.model.Polyline | |
| import com.google.android.gms.maps.model.PolylineOptions | |
| import com.google.maps.android.SphericalUtil | |
| val optionsForeground: PolylineOptions? = null | |
| fun showCurvedPolyline( | |
| googleMap: GoogleMap, |
OlderNewer