This file contains 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
val relativeLayout = view.findViewById<RelativeLayout>(R.id.edit_profile_relative_layout) | |
val emailTextInputLayout = TextInputLayout(requireContext(), null, R.style.Widget_MaterialComponents_TextInputLayout_OutlinedBox) | |
val emailTextInputLayoutParams : LinearLayout.LayoutParams = LinearLayout.LayoutParams( | |
LinearLayout.LayoutParams.MATCH_PARENT, | |
LinearLayout.LayoutParams.WRAP_CONTENT | |
) | |
emailTextInputLayout.hint = "Please Enter Email Address" | |
emailTextInputLayout.boxBackgroundMode = TextInputLayout.BOX_BACKGROUND_OUTLINE | |
emailTextInputLayout.setBackgroundColor(Color.WHITE) | |
emailTextInputLayoutParams.setMargins(0,0,0,10) |
This file contains 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
@SuppressLint("Recycle") | |
class CurrencyEditText @JvmOverloads constructor( | |
context: Context, | |
attrs: AttributeSet? = null, | |
defStyleAttr: Int = com.google.android.material.R.attr.editTextStyle | |
): TextInputEditText(context, attrs, defStyleAttr) { | |
private var current = "" | |
private val editText = this@CurrencyEditText | |
private var currency = "" |
This file contains 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.content.res.Configuration | |
import android.content.res.Resources | |
import android.os.Bundle | |
import android.util.Log | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.fragment.app.Fragment | |
import com.google.android.material.snackbar.Snackbar |
This file contains 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 requestTaskDirection(requestedUrl: String) { | |
viewModelScope.launch { | |
var routes: List<List<HashMap<String, String>>> = listOf() | |
withContext(Dispatchers.IO) { | |
// background io thread | |
val responseString = getDirectionFromPlaceApi(requestedUrl) | |
routes = parseDirection(responseString) | |
} | |
var points: ArrayList<LatLng>? = null |