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> |
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 androidx.recyclerview.widget.GridLayoutManager; | |
import androidx.recyclerview.widget.LinearLayoutManager; | |
import androidx.recyclerview.widget.RecyclerView; | |
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
private int previousTotal = 0; // The total number of items in the dataset after the last load | |
private boolean loading = true; // True if we are still waiting for the last set of data to load. |
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.view.GestureDetector; | |
import android.view.MotionEvent; | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.RecyclerView; | |
public class RecyclerViewTouchListener(val mRecyclerView:RecyclerView) : RecyclerView.OnItemTouchListener { | |
private var mClickListener:ClickListener?=null; | |
private var mLongClickListener:LongClickListener? =null; |