This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
if (cell.respondsToSelector(Selector("tintColor"))){ | |
if (tableView == self.tvUserDetails) { | |
let cornerRadius : CGFloat = 12.0 | |
cell.backgroundColor = UIColor.clearColor() | |
let layer: CAShapeLayer = CAShapeLayer() | |
let pathRef:CGMutablePathRef = CGPathCreateMutable() | |
let bounds: CGRect = CGRectInset(cell.bounds, 5, 0) | |
var addLine: Bool = false | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClickToSelectEditText<T extends Listable> extends EditText { | |
List<T> mItems; | |
String[] mListableItems; | |
CharSequence mHint; | |
OnItemSelectedListener<T> onItemSelectedListener; | |
public ClickToSelectEditText(Context context) { | |
super(context); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void checkState(File file){ | |
String state = ""; | |
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ | |
state = Environment.getExternalStorageState(file); | |
} else if((Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) && (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)) { | |
Environment.getStorageState(file); | |
} else if(Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT){ | |
state = Environment.getExternalStorageState(); | |
} | |
Log.d(TAG,file.getAbsolutePath() + " STATE :" + state); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transformPage(View view, float position) { | |
int pageWidth = view.getWidth(); | |
if (position < -1) { // [-Infinity,-1) | |
// This page is way off-screen to the left. | |
view.setAlpha(0); | |
} else if (position <= 1) { // [-1,1] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ParallaxPageTransformer implements ViewPager.PageTransformer { | |
public void transformPage(View view, float position) { | |
int pageWidth = view.getWidth(); | |
if (position < -1) { // [-Infinity,-1) | |
// This page is way off-screen to the left. | |
view.setAlpha(1); |