Skip to content

Instantly share code, notes, and snippets.

Raju Shingadiya rajumark

View GitHub Profile
@rajumark
rajumark / AndroidManifest.xml
Created Nov 26, 2019
disable split screen support in android app
View AndroidManifest.xml
<application
android:resizeableActivity="false"
@rajumark
rajumark / code.kt
Created Nov 26, 2019
get recyclerview center item position based on layoutmanager
View code.kt
private fun giveMeCenterPosition(): Int {
val firstPos = layoutManager!!.findFirstVisibleItemPosition()
val lastPos = layoutManager!!.findLastVisibleItemPosition()
val middle = abs(lastPos - firstPos) / 2 + firstPos
return middle
}
@rajumark
rajumark / OnSwipeTouchListener.java
Last active Nov 26, 2019
working swipe listner android just visit starting part of file how to use
View OnSwipeTouchListener.java
package moozy.com.moozy.gestures;
import android.content.Context;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
public class OnSwipeTouchListener implements OnTouchListener {
@rajumark
rajumark / SightFragment.java
Created Nov 5, 2019 — forked from joinAero/SightFragment.java
Android - Fragment for handling view after it has been created and visible to user for the first time.
View SightFragment.java
package cc.cubone.turbo.core.app;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
/**
* Fragment for handling view after it has been created and visible to user for the first time.
*
* <p>Specially in {@link android.support.v4.view.ViewPager}, the page will be created beforehand
You can’t perform that action at this time.