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
/*That's how we do it. In Application class override onConfigurationChanged() like this. If you want different behavior for different activities - override onConfigurationChanged() in Activity. | |
Don't forget to add manifest tag android:configChanges="fontScale" since you are hadnling this configuration change yourself.*/ | |
@Override | |
public void onConfigurationChanged(Configuration newConfig) { | |
super.onConfigurationChanged(newConfig); | |
// In some cases modifying newConfig leads to unexpected behavior, | |
// so it's better to edit new instance. |
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
package com.devdigital.eztp.utils.validator | |
import com.devdigital.eztp.extensions.getTrimString | |
import com.google.android.material.textfield.TextInputLayout | |
import kotlinx.android.synthetic.main.component_edittext.view.* | |
import java.util.regex.Pattern | |
/** | |
* @author Hitesh | |
* @version 1.0 |
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
package com.devdigital.eztp.utils.validator | |
import com.devdigital.eztp.extensions.getTrimString | |
import com.google.android.material.textfield.TextInputLayout | |
import kotlinx.android.synthetic.main.component_edittext.view.* | |
import java.util.regex.Pattern | |
/** | |
* @author Hitesh | |
* @version 1.0 |
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
/** | |
* @author Hitesh | |
* @version 1.0 | |
* @since 23-08-2019 | |
*/ | |
class IntentHelper() { | |
fun launchCall(mActivity: Activity, phoneNumber: String) { | |
val intent = Intent(Intent.ACTION_DIAL, Uri.parse("tel:$phoneNumber")) | |
mActivity.startActivity(intent) | |
} |
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
<com.google.android.material.floatingactionbutton.FloatingActionButton | |
android:id="@+id/fab" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_margin="16dp" | |
android:layout_gravity="bottom|end" | |
app:fabSize="normal" | |
app:tint="@color/colorAccent" | |
app:srcCompat="@drawable/ic_google"/> |
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
richLinkViewTel.setLink("https://www.youtube.com/channel/UC5DlHdPZqA1IzqqSqBXvo0g", object : ViewListener { | |
override fun onSuccess(status: Boolean) { | |
} | |
override fun onError(e: Exception) { | |
} | |
}) |
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
<activity | |
android:name=".ui.screen.main_screen.MainActivity" | |
android:screenOrientation="portrait" | |
android:theme="@style/AppTheme.Light.NoActionBar" > | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> |
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
object CalendarUtils { | |
val yyyyFormat: String = "yyyy" | |
val MMMMdFormat: String = "MMMM d" | |
val MMMdFormat: String = "MMM d" | |
val DMMMFormat: String = "d MMM" | |
val MMMdyyyyFormat: String = "MMM d, yyyy" | |
val MMMMdyyyyFormat: String = "MMMM d, yyyy" | |
val mddyyyyFormat: String = "M/dd/yyyy" | |
val yyyyMMddFormat: String = "yyyy-MM-dd" | |
val HHmmssFormat: String = "hh:mm:ss a" |
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
apply plugin: 'com.android.application' | |
apply plugin: 'com.google.firebase.firebase-perf' | |
apply plugin: 'io.fabric' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-kapt' | |
apply plugin: 'kotlin-android-extensions' |
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
<!DOCTYPE resources [<!ENTITY appName "Food App"> | |
<!ENTITY addFood "Add Food">]> | |
<resources> | |
<string name="app_name">&appName;</string> | |
<string name="action_add_food">&addFood;</string> | |
<string name="title_add_food">&addFood;</string> | |
</resources> |