Skip to content

Instantly share code, notes, and snippets.

View shohiebsense's full-sized avatar
Thunder Breath; 99th Style

Shohieb shohiebsense

Thunder Breath; 99th Style
View GitHub Profile
  1. Add It
 implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
 implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
  1. Add a Navigation Graph
@shohiebsense
shohiebsense / ViewModel In Native.md
Last active June 28, 2021 05:19
ViewModel, make persistent data even if configuration changes (orientation, layout, state). More Reliable than the saveInstanceState()
  1. Add It
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$version"
  1. Add the YourViewModel extends ViewModel()
class YourViewModel : ViewModel() {
@shohiebsense
shohiebsense / Beautiful Transitions Anddroid Native.md
Last active June 28, 2021 05:19
Beautiful Transitions Android Native

Minimum API level 21

  1. Add Transition Name In The Desired-Specific View

android:transitionName="@{@string/email_card_transition_name(email.id)}"

  1. Add Transition Name In The Target View (View in the Target Navigation)

android:transitionName="@string/email_card_detail_transition_name"

@shohiebsense
shohiebsense / landing_page.dart
Last active June 20, 2021 07:27
Inherited Widget Implementation Demo
class LandingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final nana = NanaProvider.of(context);
...
return Widget();
}
}
@shohiebsense
shohiebsense / AndroidManifest.xml
Created June 9, 2021 13:06
Creating Foreground Service, persistently,even if the app is terminated. Using Dagger.
<manifest>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<application
android:allowBackup="true"
android:name=".WhateverApplication">
<service android:name=".services.TrackerService"
android:foregroundServiceType="location"
@shohiebsense
shohiebsense / hosts
Last active October 28, 2021 02:22
Hosts Backup File For Escaping The Trench
This file has been truncated, but you can view the full file.
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
@shohiebsense
shohiebsense / CheckBoxLikeRadioButton.kt
Created November 10, 2020 07:46
Treat the checkboxes like radiobutton
fun init() {
layout.check_bt.setOnCheckedChangeListener(this)
//the rest
}
override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
var selectedJanjangState = 0
https://www.youtube.com/watch?v=cjVQ36NhbMk
https://www.youtube.com/watch?v=h4vYRfVTqtA
https://www.youtube.com/watch?v=oGWeHPK3NC4
https://www.youtube.com/watch?v=ukXWpBPHiQ8
https://www.youtube.com/watch?v=u3IAybZOt-E
https://www.youtube.com/watch?v=iDy2wCQYSrU
https://www.youtube.com/watch?v=V6d_dC9M0Tc
https://www.youtube.com/watch?v=xKCek6_dB0M
https://www.youtube.com/watch?v=zlWMJbbLyA0
https://www.youtube.com/watch?v=tcckFDk9RQo
@shohiebsense
shohiebsense / Tiduranium.txt
Last active May 2, 2020 17:23
Tiduranium PT 2
https://www.youtube.com/watch?v=dstuitW8PWM
https://www.youtube.com/watch?v=beAGU2ypE84
https://www.youtube.com/watch?v=L9HYJbe9Y18
https://www.youtube.com/watch?v=2HEYHWPYoZ0
https://www.youtube.com/watch?v=hXKspwkEA0w
https://www.youtube.com/watch?v=NzcV8HXE_EI
https://www.youtube.com/watch?v=FuvWc3ToDHg
https://www.youtube.com/watch?v=HC9OiBvKlIw
https://www.youtube.com/watch?v=Qu9FMfASReY
https://www.youtube.com/watch?v=L4sbDxR22z4
https://www.youtube.com/watch?v=Ts7wBpYsG_k
https://www.youtube.com/watch?v=Hyhb5L8Kry0
https://www.youtube.com/watch?v=MiBeCUn5aVA
https://www.youtube.com/watch?v=jw3kmfiJ7UQ
https://www.youtube.com/watch?v=NBPfEuj51_g
https://www.youtube.com/watch?v=wOU6L4be_pk
https://www.youtube.com/watch?v=F-Ja7KMO31o
https://www.youtube.com/watch?v=MARkuLTBEVY
https://www.youtube.com/watch?v=l3qlayAOino
https://www.youtube.com/watch?v=_Vl9ojzeJmo