Skip to content

Instantly share code, notes, and snippets.

View Kolyall's full-sized avatar
📱

Nick Unuchek Kolyall

📱
View GitHub Profile
@Kolyall
Kolyall / README.sh
Last active August 25, 2022 12:46
Install Ubuntu
sudo apt-get -y update
sudo apt install gnome-clocks
#------------------------PuTTY--------------
#-----https://numato.com/help/blog/how-to-install-putty-on-linux/
#-----https://www.ssh.com/ssh/putty/linux/puttygen
#-------------------------------------------
sudo apt-get -y update
sudo apt-get -y install -y putty
putty
@Kolyall
Kolyall / TIPS.md
Last active December 22, 2021 12:02
Android Tips

Лайфхак 1:

для тех кому как и мне не нравиться видеть зависимость в списке основных зависимостей приложения например

testImplementation "junit:junit:+"

создаем файл testDependencies.gradle :

dependencies {
@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 / 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 / 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 / README.md
Created November 13, 2019 06:50
RxViews

RxViews:

  1. CacheSwitch Button
@Kolyall
Kolyall / README.md
Created November 13, 2019 06:46
RecyclerView patterns
@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 / ImageView.xml
Created November 13, 2019 06:32
ImageView patterns
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:clipChildren="false"
android:clipToPadding="false"
android:focusable="true"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_dislike_36dp"