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
package com.gokberkyagci.enhancedecommerce | |
import android.content.Intent | |
import android.os.Bundle | |
import android.os.Handler | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.android.gms.tagmanager.TagManagerPreviewActivity | |
import com.google.firebase.analytics.FirebaseAnalytics | |
import com.google.firebase.analytics.FirebaseAnalytics.Param | |
import kotlinx.android.synthetic.main.activity_main.* |
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
package com.gokberkyagci.enhancedecommerce | |
import android.content.Intent | |
import android.os.Bundle | |
import android.os.Handler | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.android.gms.tagmanager.TagManagerPreviewActivity | |
import com.google.firebase.analytics.FirebaseAnalytics | |
import com.google.firebase.analytics.FirebaseAnalytics.Param | |
import kotlinx.android.synthetic.main.activity_main.* |
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
package com.gokberkyagci.enhancedecommerce | |
import android.content.Intent | |
import android.os.Bundle | |
import android.os.Handler | |
import android.util.Log | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.android.gms.tagmanager.TagManagerPreviewActivity | |
import com.google.firebase.analytics.FirebaseAnalytics | |
import com.google.firebase.analytics.FirebaseAnalytics.Param |
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 kotlinx.coroutines.* | |
import java.util.* | |
import kotlin.collections.ArrayList | |
fun main() { | |
Screen().onCreateView() | |
} | |
class Screen : ConversationEngine { |
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
welcomeStep = | |
ConversationStep( | |
promptText = "istegelsin", | |
actions = arrayListOf(goToBasketAction, addProductAction), | |
_unhandledActionStep = ConversationStep( | |
promptText = "Anlayamadım", | |
actions = arrayListOf(goToBasketAction, addProductAction), | |
_unhandledActionStep = null | |
) | |
) |
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 kotlinx.coroutines.* | |
import java.lang.Exception | |
import kotlin.coroutines.CoroutineContext | |
import kotlin.coroutines.resume | |
import kotlin.coroutines.suspendCoroutine | |
fun main() { | |
val parentJob = Job() | |
val viewScope = CoroutineScope(Dispatchers.IO + parentJob) |
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
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BannerViewHolder { | |
val binding = ItemBannerDashboardBinding.inflate(LayoutInflater.from(parent.context), parent, false) | |
val layoutparams: ViewGroup.MarginLayoutParams = binding.root.layoutParams as ViewGroup.MarginLayoutParams | |
with(parent.context.resources) { | |
layoutparams.width = displayMetrics.widthPixels - getDimensionPixelSize(R.dimen.banner_space_offset) * 2 | |
layoutparams.height = (layoutparams.width * BANNER_RATIO).toInt() | |
} |
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 androidx.compose.ui.text.AnnotatedString | |
import androidx.compose.ui.text.input.OffsetMapping | |
import androidx.compose.ui.text.input.TransformedText | |
import androidx.compose.ui.text.input.VisualTransformation | |
private const val PHONE_NUMBER_LENGTH = 11 | |
class PhoneNumberVisualTransformation : VisualTransformation { | |
override fun filter(text: AnnotatedString): TransformedText { |