Skip to content

Instantly share code, notes, and snippets.

View rajsuvariya's full-sized avatar

Raj Suvariya rajsuvariya

View GitHub Profile
@aksonov
aksonov / rnrf.md
Last active August 26, 2024 12:27
Proposal for lightning talk at ReactiveConf 2017: What is RNRF (react-native-router-flux)?

What is RNRF (react-native-router-flux)?

React Native is great product but lacks for stable, intuitive and easy navigation API during many years. Every year we see new, better API: Native Navigator, ex-Navigator, NavigationExperimental, ex-Navigation, wix native navigation, airbnb native navigation, ReactNavigation...

Once I've started React Native development, in 2015, I created RNRF - simple API for easy navigation. It was clear that better navigation instruments will come later but I didn't want to change my code again and again to switch for better API. Every new major version of RNRF is based on different navigation framework and mostly preserves own API.

Another goal was to represent all navigation flow within one place in clear, human-readable way - similar to iOS Storyboards concept. This way other engineers could understand your app flow faster.

@tsuginodan
tsuginodan / Fragment.java
Created June 5, 2016 02:27
(WIP) RecyclerView GridLayout InfiniteScroll
int gridColumns = 4;
int visibleThreshold = 3;
int limit = 40
myObject apiResourceList = Constants.API_URL + "pokemon/?limit=" + limit;
.
.
.
RecyclerView.OnScrollListener paginationScrollListener = new RecyclerView.OnScrollListener() {
int gridSpan, pastVisibleItems, lastVisibleItem, visibleItemCount, totalItemCount;
@anry200
anry200 / ScalableVideoView.java
Created January 16, 2014 13:40
Android : How to stretch video to use whole area of VideoView (code snippets)
import android.content.Context;
import android.util.AttributeSet;
import android.widget.VideoView;
public class ScalableVideoView extends VideoView {
private int mVideoWidth;
private int mVideoHeight;
private DisplayMode displayMode = DisplayMode.ORIGINAL;