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
//Get UIColor from Hex color code | |
+(UIColor *)colorFromHexString:(NSString *)hexString { | |
unsigned rgbValue = 0; | |
NSScanner *scanner = [NSScanner scannerWithString:hexString]; | |
[scanner setScanLocation:1]; // bypass '#' character | |
[scanner scanHexInt:&rgbValue]; | |
return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0]; | |
} | |
//Set Bottom Border to UITextField |
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
private float getDistanceBetweenCoordinates(double latitude1, | |
double longitude1, double latitude2, double longitude2) { | |
Location locationA = new Location("point A"); | |
locationA.setLatitude(latitude1); | |
locationA.setLongitude(longitude1); | |
Location locationB = new Location("point B"); | |
locationB.setLatitude(latitude2); | |
locationB.setLongitude(longitude2); | |
float meter = locationA.distanceTo(locationB); |
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
package com.vs2.sheduledsms.adpaters; | |
import java.util.ArrayList; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
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
package com.vs2.applockfree.adapters; | |
import java.util.ArrayList; | |
import android.content.Context; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.graphics.drawable.Drawable; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
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
edittext.setOnEditorActionListener(new OnEditorActionListener() { | |
@Override | |
public boolean onEditorAction(TextView v, int actionId, | |
KeyEvent event) { | |
// TODO Auto-generated method stub | |
if (actionId == EditorInfo.IME_ACTION_GO) { | |
//Do your task on go text click from keyboard | |
} |
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
package com.vs2.applockfree.objects; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.ApplicationInfo; | |
import android.content.pm.PackageInfo; |
NewerOlder