Skip to content

Instantly share code, notes, and snippets.

View m4xp1's full-sized avatar
🚀
stronger, higher, faster

Dmitrii Makarov m4xp1

🚀
stronger, higher, faster
View GitHub Profile
@gelin
gelin / readme.md
Created September 19, 2021 07:11
Как установить свежий LineageOS на планшет Sony Xperia Z3 Tablet Compact

Устройство

Sony Xperia Z3 Tablet Compact SGP611

Инструменты и принадлежности

  • Приложение fastboot. Оно поставляется вместе с Android SDK.
  • USB кабель
  • Компьютер под управлением Linux, с установленным Android SDK, USB и доступом в Интернет
@be1ski
be1ski / Activity.kt
Last active December 13, 2021 19:51
/** Пример использования */
class MainActivity : AppCompatActivity(R.layout.activity_main) {
@Inject lateinit var fragmentFactory: FragmentFactory
private val component by nonConfigurationInstance {
DaggerActivityComponent.factory().create()
}
override fun onCreate(savedInstanceState: Bundle?) {
component.inject(this)
@yanngx
yanngx / FragmentArgumentDelegate.kt
Last active January 19, 2023 09:26
Fragment arguments without hassle !
package be.brol
import android.os.Binder
import android.os.Bundle
import android.support.v4.app.BundleCompat
import android.support.v4.app.Fragment
/**
* Eases the Fragment.newInstance ceremony by marking the fragment's args with this delegate
* Just write the property in newInstance and read it like any other property after the fragment has been created
@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active December 30, 2023 18:05
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)
@hidaron
hidaron / DynamicGridLayoutManager.java
Created March 18, 2016 01:48 — forked from SehoNoh/DynamicGridLayoutManager.java
Android Dynamic RecyclerView LayoutManager (when you are using RecyclerView in ScrollView, these layout manager will resize RecyclerView's height with their items.) / ListView Version - https://gist.github.com/NohSeho/5638005fa27763fd21f8
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
public class DynamicGridLayoutManager extends GridLayoutManager {
private int spanCount = 1;
@cxyxlxdm
cxyxlxdm / GridSpacingItemDecoration.md
Last active April 19, 2024 08:43
Add column spacing in RecyclerView with GridLayoutManager

Android Recyclerview GridLayoutManager column spacing Here is the question, the first answer does not work well in my project,and it makes the spacing bigger between item and item. the second answer is quite perfect.But if RecyclerView has headers,it does not work well. Then I fixed it.

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
@rxaviers
rxaviers / gist:7360908
Last active May 10, 2024 23:34
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: