Database locking

https://github.com/SQLDroid/SQLDroid/wiki/Tips-and-tricks-(including-database-lockin...

IntroScrollView

public class IntroScrollView extends ScrollView{ // private Context mContext; private ScrollViewListener scrollViewListener = null; public interface ScrollViewListener {    void onScrollChanged(IntroScrollView scrollView, int x, int y, int oldx, int oldy); } public IntroScrollView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // TODO Auto-generated constructor stub // mContext = context; } public IntroScrollView(Context context, AttributeSet attrs) { super(context, attrs); ...

RelativeLayoutDetectKeyBoard

public class RelativeLayoutDetectKeyBoard extends RelativeLayout { Rect rect = new Rect(); public RelativeLayoutDetectKeyBoard(Context context, AttributeSet attrs) { super(context, attrs); } public interface Listener { public void onSoftKeyboardShown(boolean isShowing); } private Listener listener; public void setListener(Listener listener) { this.listener = listener; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int height = MeasureSpec.getSize(heightMeasureSpec); Activity activity...

Validation in android

import java.util.regex.Pattern; import android.app.AlertDialog; import android.content.DialogInterface; import android.widget.EditText; public class ValidationManager { // a result of the validation of the fields from the form public static final int ALERT_OK = 0; // parameters is entered correctly public static final int ALERT_LOGIN = 1; // incorrect login public static final int ALERT_PASSWORD = 2; // incorrect password public static final int ALERT_PASSWORD_REPEAT = 3; // incorrect password public static final int ALERT_FULLNAME =...

samples2

public class CalendarDayMarker { private int _year; private int _month; private int _day; private int _color; public CalendarDayMarker(int year, int month, int day, int color) { init(year, month, day, color); } public CalendarDayMarker(Date d, int color) { Calendar c = Calendar.getInstance(); c.setTime(d); init(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), color); } public CalendarDayMarker(Calendar c, int color) { init(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH),...
 

Popular Posts

About Me

Only For Sharing Android Related Things...

Facebook Fan Page