Skip to content

Instantly share code, notes, and snippets.

View sheerazam's full-sized avatar

Sheeraz Ahmed Memon sheerazam

  • SSPA Sindh
  • Pakistan
View GitHub Profile
Moved to
https://github.com/romannurik/android-swipetodismiss
@sheerazam
sheerazam / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sheerazam
sheerazam / ReadMe.md
Created January 21, 2016 09:54
Important Libraries to Create
  1. Populator
  2. Null Checker
  3. Abstract Loader
  4. Abstrac DB + Network Loader
http://mdswanson.com/blog/2014/04/07/durable-android-rest-clients.html
- Loaders
http://codetheory.in/asynchronous-background-execution-and-data-loading-with-loaders-framework-in-android/
- Using Flow and Morar ( a new way to android apps )
https://www.bignerdranch.com/blog/an-investigation-into-flow-and-mortar/
public class Validation {
//Regular Expression
private static final String EMAIL_REGEX = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
private static final String PHONE_REGEX = "\\d{3}-\\d{7}";
private static final String MOBILE_REGX = "\\d{4}-\\d{7}";
// Error Messages
private static final String REQUIRED_MSG = "required";
private static final String EMAIL_MSG = "invalid email";
ldpi (low) ~120dpi
Multiply ( Mdpi * 0.75 )
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
Multiply ( Mdpi * 1.5 )
xhdpi (extra-high) ~320dpi
Multiply ( Mdpi * 2 )
xxhdpi (extra-extra-high) ~480dpi
Multiply ( Mdpi * 3 )
xxxhdpi (extra-extra-extra-high) ~640dpi
public class SplashActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
int SPLASH_DISPLAY_LENGHT = 1000;
public interface FindItemsInteractor {
public void findItems(OnFinishedListener listener);
}
public class LoginActivity extends Activity implements LoginView, View.OnClickListener {
private ProgressBar progressBar;
private EditText username;
private EditText password;
private LoginPresenter presenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@sheerazam
sheerazam / AndroidMenifest.xml
Created April 11, 2016 08:55
Connect Database and Server
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<provider
android:name=".forsale.db.SalesProvider"
android:authorities="durar.durtgulfbeachrealestatecompany"
android:enabled="true"
android:exported="true"