Skip to main content

Posts

Showing posts from April, 2016

Useful Link

ANDROID GEMS: http://www.android-gems.com/category https://github.com/matrixxun/ProductTour https://github.com/jcmore2/AppCrash https://github.com/sahildave/Search-View-Layout http://www.android-gems.com/lib/462 https://github.com/Yalantis/FlipViewPager.Draco https://github.com/sacot41/SCViewPager https://github.com/jianghejie/LinkedViewPager https://github.com/manupsunny/PinLock https://github.com/Trinea/android-open-project/tree/master/English%20Version http://javaant.com/viewpager-with-circle-indicator-in-android/#.Vq8nb9V97IV http://androidopentutorials.com/android-image-slideshow-using-viewpager/ Transition Effect https://github.com/kaichunlin/android-transition https://github.com/toddway/MaterialTransitions https://github.com/lgvalle/Material-Animations https://github.com/DesarrolloAntonio/FragmentTransactionExtended https://github.com/takahirom/PreLollipopTransition http://swarmnyc.com/whiteboard/android-frag...

Getting Latitude & Longitude while launching SplashScreen

public class Splash extends Activity {     private static final int SPLASH_DURATION = 7000;     private static final int PERMISSION_REQUEST_CODE = 1;     private static final int CPERMISSION_REQUEST_CODE = 2;     public static double lng;     public static double lat;     Context context;     SharedPreferences pref;     private boolean mIsBackButtonPressed;     private Handler myhandler;     private LocationManager mLocationManager = null;     private String provider = null;     private Marker mCurrentPosition = null;     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_splash);         context = this;         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, ...

Code Snippet

From any Java class  cal DataBase by using the following code : context = this; dbutil = new DbUtil(context); dbutil.open(); To set Database value into the Spinner through ArrayList: Spinner spnCatname; ArrayList<String> array = dbutil.getcategoryname(); ArrayAdapter<String> spinnerArray = new ArrayAdapter<String>(context,R.layout.spinner_text,                                                                                                                                         array); spnCatname.setAdapter(spinnerArray); How to call database value using Cursor?   // Nested Cursor Cursor cur = dbutil.getPro...

To make a ListView to be scrolled inside of ScrollView

To make a ListView to be scrolled inside of ScrollView: lv . setOnTouchListener ( new ListView . OnTouchListener () { @Override public boolean onTouch ( View v , MotionEvent event ) { int action = event . getAction (); switch ( action ) { case MotionEvent . ACTION_DOWN : // Disallow ScrollView to intercept touch events. v . getParent (). requestDisallowInterceptTouchEvent ( true ); break ; case MotionEvent . ACTION_UP : // Allow ScrollView to intercept touch events. v . getParent (). requestDisallowInterceptTouchEvent ( false ); break ; } // Handle ListView touch events. v . onTouchEvent ( event ); return true ; } }); Refer: http://stackoverflow.com/questions/6210895/listview-inside-scrollview-is-not-scrolling-on-android