Skip to content

Instantly share code, notes, and snippets.

View iamnaran's full-sized avatar
🐧
git gitlich

Narayan Panthi iamnaran

🐧
git gitlich
View GitHub Profile
@iamnaran
iamnaran / Android Application Class
Created September 25, 2018 14:44
Android Application Class
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
/**
* Created by NaRan on 23,Sep,2018.
* Copyright (c). All rights reserved.
@iamnaran
iamnaran / CustomProgressBarActivity.java
Last active May 21, 2018 10:17
Custom Circular Progress Bar Android
private ProgressBarAnimation progressBarAnimation;
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
progressBarAnimation = new ProgressBarAnimation(vhHeaderTwo.progressBar, 0, Integer.parseInt(studentAttendance.getTotal().getPresentDays()));
progressBar.setMax(Integer.parseInt(studentAttendance.getTotal().getOperatingDays()));
progressBarAnimation.setDuration(800);
progressBarAnimation.setInterpolator(new AnticipateInterpolator());
progressBar.startAnimation(progressBarAnimation);
progressBar.getProgressDrawable().setColorFilter(Color.parseColor(primaryColor), PorterDuff.Mode.SRC_IN);
@iamnaran
iamnaran / SpacingBetweenRecyclerView.java
Created May 2, 2018 13:25
Space Between RecyclerView. Sticky to edge for 0 and 1 position of recycler view
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Created by NaRan on 02,May,2018.
* Copyright (c) inGrails Pvt. Ltd. All rights reserved.
* [email protected]
**/
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;