This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.
This file contains hidden or 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
//Service | |
@Override | |
public void onCreate() { | |
LocalBroadcastManager | |
.getInstance(this) | |
.registerReceiver(new ServiceEchoReceiver(), new IntentFilter("ping")); | |
//do not forget to deregister the receiver when the service is destroyed to avoid | |
//any potential memory leaks | |
} |
This file contains hidden or 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 app.skylab.profile.ui.fragments.followers | |
import androidx.lifecycle.SavedStateHandle | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.viewModelScope | |
import androidx.paging.Pager | |
import androidx.paging.PagingConfig | |
import androidx.paging.PagingData | |
import androidx.paging.cachedIn | |
import app.skylab.core.ActionDispatcher |
This file contains hidden or 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
object LocaleHelper { | |
fun setLocale(context: Context?): Context { | |
return setAppLocale(context!!, Pref(context).lang) | |
} | |
private fun setAppLocale( | |
context: Context, | |
locale: String | |
): Context { |
This file contains hidden or 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
Change the emulator locale from the adb shell | |
To change the locale in the emulator by using the adb shell, do the following: | |
Pick the locale you want to test and determine its BCP-47 language tag, such as fr-CA for Canadian French. | |
Launch an emulator. | |
From a command-line shell on the host computer, run the following command: | |
adb shell | |
or, if you have a device attached, specify that you want the emulator by adding the -e option: | |
adb -e shell | |
At the adb shell prompt (#), run this command: |
This file contains hidden or 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.content.Context | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
import android.view.View | |
import androidx.coordinatorlayout.widget.CoordinatorLayout | |
import androidx.core.view.ViewCompat | |
import androidx.customview.widget.ViewDragHelper | |
import timber.log.Timber | |
class VerticalSwipeDismissBehavior<V : View> @JvmOverloads constructor(context: Context? = null, attrs: AttributeSet? = null) : CoordinatorLayout.Behavior<V>(context, attrs) { |
This file contains hidden or 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
To slow down the device's animations by a factor of 10x, you can run the following commands from the command line: | |
adb shell settings put global window_animation_scale 10 | |
adb shell settings put global transition_animation_scale 10 | |
adb shell settings put global animator_duration_scale 10 |
This file contains hidden or 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
adb shell am start -a android.intent.action.VIEW -d "example://gizmos" com.myapp. Used to test deeplinks from adb |
This file contains hidden or 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 app.skylab.device.countrycode.model | |
object Constants { | |
const val codes = """[ | |
{ | |
"name": "Afghanistan", | |
"dialCode": "+93", | |
"isoCode": "AF", | |
"flag": "https://cdn.kcak11.com/CountryFlags/countries/af.svg" | |
}, |
NewerOlder