Skip to content

Instantly share code, notes, and snippets.

View Kolyall's full-sized avatar
📱

Nick Unuchek Kolyall

📱
View GitHub Profile
@Kolyall
Kolyall / README.md
Last active November 13, 2019 06:34
TextView patterns

TextView:

  1. Max Length with ellipsize at end
  2. Clear focus from EditText after open a screen
@Kolyall
Kolyall / EditText1.xml
Last active November 13, 2019 06:41
EditText patterns
<style name="TextLimitStyle" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@color/colorAccent< /item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">18sp</item>
</style>
<style name="TextLimitError" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@color/colorRed</item>
</style>
@Kolyall
Kolyall / README.md
Created November 13, 2019 06:46
RecyclerView patterns
@Kolyall
Kolyall / README.md
Created November 13, 2019 06:50
RxViews

RxViews:

  1. CacheSwitch Button
@Kolyall
Kolyall / Dialogs1.xml
Last active November 13, 2019 06:53
Dialogs patterns
new Dialog(getActivity(), R.style.DialogStyle);
<style name="DialogStyle" parent="Base.Theme.AppCompat.Dialog">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
val window = dialog?.window
window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
@Kolyall
Kolyall / Function.kt
Last active November 13, 2019 06:58
Kotlin Functions
class MyClass {
fun test() {
val str: String = "..."
val result = str.xxx {
print(this) // Receiver
print(it) // Argument
42 // Block return value
}
}
}
@Kolyall
Kolyall / fabric.gradle
Created November 14, 2019 09:22
Add to gradle tasks a exec commands before launch
project.afterEvaluate {
crashlyticsUploadDistributionDevelopDebug.doFirst {
ext.betaDistributionGroupAliases = "develop"
ext.betaDistributionNotifications = true
ext.betaDistributionReleaseNotesFilePath = "${project.rootDir}/app/build/outputs/apk/releaseNotes.txt"
}
}
@Kolyall
Kolyall / install.sh
Created November 26, 2019 14:46
Install WhatsUp to linux
[Desktop Entry]
Name=Franz
Comment=
Exec=/opt/franz/franz
Icon=/opt/franz/franz-icon.png
Terminal=false
Type=Application
Categories=Messaging,Internet