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
https://my.api.mockaroo.com/employees.json?key=ac23d4c0 |
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' | |
// this task extracts Android project’s dependencies as offline jar files. | |
// add these files to server's lib folder | |
android.applicationVariants.all { variant -> | |
task "copyDependencies${variant.name.capitalize()}"() { | |
outputs.upToDateWhen { false } | |
doLast { | |
println "Executing copyDependencies${variant.name.capitalize()}" | |
variant.getCompileClasspath().each { fileDependency -> | |
def sourcePath = fileDependency.absolutePath |
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
<code_scheme name="GoogleStyle copy" version="173"> | |
<option name="OTHER_INDENT_OPTIONS"> | |
<value> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
</value> | |
</option> | |
<option name="RIGHT_MARGIN" value="180" /> | |
<AndroidXmlCodeStyleSettings> |
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.mabnadp.rahavard365.utils | |
import android.graphics.Paint | |
import android.graphics.Typeface | |
import android.text.TextPaint | |
import android.text.style.TypefaceSpan | |
class CustomTypefaceSpan(private val newType: Typeface) : TypefaceSpan(null) { | |
override fun updateDrawState(ds: TextPaint) { |
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.example.widgets; | |
import android.content.Context; | |
import android.content.res.ColorStateList; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
import com.example.R; |
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.mycompany.myapp.app; | |
import android.app.Application; | |
import android.content.Intent; | |
import com.google.android.gms.common.GooglePlayServicesUtil; | |
import com.google.android.gms.security.ProviderInstaller; | |
import com.google.android.gms.security.ProviderInstaller.ProviderInstallListener; | |
public class MainApplication extends Application { |
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
public final class RxBus{ | |
private static SparseArray<PublishSubject<Object>> sSubjectMap = new SparseArray<>(); | |
private static Map<Object, CompositeDisposable> sSubscriptionsMap = new HashMap<>(); | |
private RxBus(){ | |
} | |
@Retention(SOURCE) |
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
getView().setFocusableInTouchMode(true); | |
getView().requestFocus(); | |
getView().setOnKeyListener((v, keyCode, event) -> { | |
if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) { | |
onBackPressed(); | |
return true; | |
} | |
return false; | |
}); |
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.R.attr | |
import android.content.res.ColorStateList | |
object Colors { | |
@JvmStatic | |
val primaryDarkColor by lazy { 0xFF00284f.toInt() } | |
@JvmStatic | |
val primaryColor by lazy { 0xFF20507c.toInt() } |
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.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Rect | |
import android.graphics.drawable.ColorDrawable | |
import android.view.View | |
import androidx.annotation.ColorInt | |
import androidx.core.view.ViewCompat | |
import androidx.recyclerview.widget.LinearLayoutManager | |
import androidx.recyclerview.widget.RecyclerView |