- Populator
- Null Checker
- Abstract Loader
- Abstrac DB + Network Loader
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- The important thing to note here is the added fitSystemWindows --> | |
| <android.support.v4.widget.DrawerLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:id="@+id/my_drawer_layout" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:fitsSystemWindows="true" | |
| > |
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
| class BitmapLruCache extends LruCache<String, Bitmap> implements ImageLoader.ImageCache { | |
| public BitmapLruCache(int maxSize) { | |
| super(maxSize); | |
| } | |
| @Override | |
| protected int sizeOf(String key, Bitmap value) { | |
| return value.getRowBytes() * value.getHeight(); | |
| } |
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
| <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" |
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 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); |
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 interface FindItemsInteractor { | |
| public void findItems(OnFinishedListener listener); | |
| } |
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 SplashActivity extends ActionBarActivity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.splash); | |
| int SPLASH_DISPLAY_LENGHT = 1000; |
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
| 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 |
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 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"; |
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
| 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/ |