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
class LoginActivity : AppCompatActivity() { | |
@Inject lateinit var loginPresenter: LoginPresenter | |
lateinit var binding: ActivityLoginBinding | |
val loginViewModel: LoginViewmodel by lazy { | |
LoginViewmodel() | |
} |
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
<scheme name="io17" version="142" parent_scheme="Darcula"> | |
<option name="FONT_SCALE" value="1.0" /> | |
<metaInfo> | |
<property name="created">2017-11-13T20:44:16</property> | |
<property name="ide">AndroidStudio</property> | |
<property name="ideVersion">3.0.0.18</property> | |
<property name="modified">2017-11-29T13:01:35</property> | |
<property name="originalScheme">Darcula</property> | |
</metaInfo> | |
<option name="EDITOR_FONT_SIZE" value="16" /> |
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.spaniard | |
import android.text.Spannable | |
import android.text.SpannableStringBuilder | |
import android.text.style.CharacterStyle | |
class Spaniard(val originalString: String) { | |
var spannableStringBuilder = SpannableStringBuilder(originalString) |
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
/** | |
* Target file for ShowcaseView library, it will always points to first item of recyclerview child. | |
*/ | |
public class RecyclerViewTarget implements Target { | |
RecyclerView recyclerView; | |
public RecyclerViewTarget(RecyclerView recyclerView) { | |
this.recyclerView = recyclerView; | |
} |
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.zoomimob_faculty.utils; | |
import android.content.ContentResolver; | |
import android.content.ContentUris; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import android.os.Environment; | |
import android.provider.DocumentsContract; |
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
//Functions.kt | |
public fun Context.setNotification(id: Int = 0, builderMethod: NotificationCompat.Builder.() -> Any) { | |
val builder = NotificationCompat.Builder(this) | |
builder.apply { | |
builderMethod() | |
} | |
notificationManager().notify(id, builder.build()) | |
} | |
//FCM Service.kt | |
this@MyFCMService.setNotification(2488, { |
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
//Part of Functions.kt, this and below 3 functions helps to create dialog. | |
public fun Context.showDialog(cancelable: Boolean = false, cancelableTouchOutside: Boolean = false, builderFunction: AlertDialog.Builder.() -> Any) { | |
val builder = AlertDialog.Builder(this) | |
builder.builderFunction() | |
val dialog = builder.create(); | |
dialog.setCancelable(cancelable) | |
dialog.setCanceledOnTouchOutside(cancelableTouchOutside) | |
dialog.show() | |
} |
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
//DataRepository.kt, which handles all db handling, where I have passed 3 callbacks, finished, error or maximum tabs reached | |
public fun addTab(tabModelToInsert: TabModel, | |
onFinished: (tabModel: TabModel) -> Unit = {}, | |
onError: (tabModel: TabModel, message: String) -> Unit = { tabModel, message -> }, | |
onMaxTabReached: (tabModel: TabModel) -> Unit = {}) { | |
if (canAddMoreTabs()) { | |
val currentMaxId = getCurrentMaxId() ?: 0 | |
try { | |
realm.executeTransaction { | |
addTabModelToRealm() |
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
//DataRepository.kt, which handles all db handling, where I have passed 3 callbacks, finished, error or maximum tabs reached | |
public fun addTab(tabModelToInsert: TabModel, | |
onFinished: (tabModel: TabModel) -> Unit = {}, | |
onError: (tabModel: TabModel, message: String) -> Unit = { tabModel, message -> }, | |
onMaxTabReached: (tabModel: TabModel) -> Unit = {}) { | |
if (canAddMoreTabs()) { | |
val currentMaxId = getCurrentMaxId() ?: 0 | |
try { | |
realm.executeTransaction { | |
addTabModelToRealm() |