This file contains 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 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 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
// Add the Google Play services version to your app's manifest | |
// Edit your application's AndroidManifest.xml file, and add the following declaration within the <application> element. This embeds the version of Google Play services that the app was compiled with. | |
<meta-data | |
android:name="com.google.android.gms.version" | |
android:value="@integer/google_play_services_version" /> |
This file contains 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 ForSaleListLoader extends AsyncTaskLoader<List<ForSale>> { | |
private static final String TAG = "AppointmentListLoader"; | |
private static final boolean DEBUG = false; | |
// We hold a reference to the Loaders data here. | |
private List<ForSale> mSales; | |
String select; | |
Uri uri; | |
String[] projection; | |
String SortOrder; |
This file contains 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 ForSaleArrayAdapter extends ArrayAdapter<ForSale> { | |
Context context; | |
int layout; | |
public ForSaleArrayAdapter(Context context, List<ForSale> sales , int layout) { | |
super(context, 0, sales); | |
this.layout = layout; | |
this.context = context; | |
} |
This file contains 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 ForSaleCursorAdapter extends CursorAdapter { | |
int layout; | |
public ForSaleCursorAdapter(Context context, Cursor cursor, int layout) { | |
super(context, cursor, 0); | |
this.layout = layout; | |
} | |
// The newView method is used to inflate a new view and return it, | |
// you don't bind any data to the view at this point. |
This file contains 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://stackoverflow.com/questions/16737006/using-build-flavors-structuring-source-folders-and-build-gradle-correctly |
This file contains 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
https://android.googlesource.com/platform/prebuilts/maven_repo/android/+/refs/heads/master/com/android/support/appcompat-v7/maven-metadata.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<metadata> | |
<groupId>com.android.support</groupId> | |
<artifactId>appcompat-v7</artifactId> | |
<version>18.0.0</version> | |
<versioning> | |
<versions> | |
<version>18.0.0</version> |
This file contains 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://forum.xda-developers.com/showthread.php?t=2528952 |
This file contains 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"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_checked="true" | |
android:drawable="@drawable/cbchk_blue" | |
android:state_focused="false"> | |
</item> | |
<item android:state_checked="true" | |
android:drawable="@drawable/cbchk_blue" | |
android:state_focused="true"> | |
</item> |