Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chirag-jn's full-sized avatar
🎯
Focusing

Chirag Jain chirag-jn

🎯
Focusing
View GitHub Profile

Motivation to use simple stack :

  1. Instance State Restoration
  2. Navigation b/w fragment or views in so-called navigation components way.
  3. Basic viewmodels should be attached to fragment/view that has lifecycle of activity-retained scope.
  4. Service locator/DI for simple apps that works at Singleton Component and ActivityRetainedComponent.
  5. [Pro-point] You can control your navigator from viewModel, so no more dependence on channelFlow for such basic action.

How To Use that in current App:

  1. Make a new Activity[SimpleStackMainActivity.java].
@ritik-malik
ritik-malik / docker_cheatsheet.md
Created June 26, 2021 18:55
A simple cheatsheet for docker
@cessor
cessor / django_tree.py
Created March 8, 2018 00:40
Closure Table Tree (Django)
from django.db import models
class Page(models.Model):
path = models.CharField(max_length=100, blank=False, primary_key=True)
title = models.CharField(max_length=255, blank=False)
rank = models.IntegerField(default=0)
def __str__(self):
return str(self.title)
@codediodeio
codediodeio / database.rules.json
Last active January 28, 2024 19:07
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});