Compatible only with version 2.4. Enough for simple data storage functionality.
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 static final String ARGUMENT_ARG = "ARGUMENT_ARG"; | |
private String argumentValue; | |
/** | |
* Factory method for passing arguments. | |
*/ | |
public static Fragment getFragment(String argumentValue) { | |
Fragment fragment = new Fragment(); | |
Bundle bundle = new Bundle(); |
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 TabActivity extends Activity { | |
TabPageAdapter tabPageAdapter; | |
ViewPager viewPager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
tabPageAdapter = new TabPageAdapter(getSupportFragmentManager(), fragments); |
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 static final String ARGUMENT_ARG = "ARGUMENT_ARG"; | |
private String argumentValue; | |
public class ArgumentActivity extends Activity { | |
/** | |
* Factory method for passing arguments. | |
*/ | |
public static Intent getIntent(String argumentValue) { | |
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 CustomAdapter extends ArrayAdapter<Model> { | |
/** | |
* Sort should be enabled so the items are always consistently displayed. | |
* First disable notifying of the list because sort method does it internally therefore we can end up in loop. | |
* After sorting is done, enable notifying. | |
*/ | |
@Override | |
public void notifyDataSetChanged() { |
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
package com.rivancic.adapters; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
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
<resources> | |
<!-- Taken from https://www.google.com/design --> | |
<!--Default metrics--> | |
<dimen name="dimen_8">8dp</dimen> | |
<dimen name="dimen_16">16dp</dimen> | |
<dimen name="dimen_24">24dp</dimen> | |
<dimen name="dimen_32">32dp</dimen> | |
<dimen name="dimen_48">48dp</dimen> |
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
# show the attached device | |
adb devices | |
# install application | |
adb install thisIsTheAPKName.apk | |
# unistall app | |
adb uninstall <package name> |
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
package com.zensound.parcelable; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* The Parcelable wrapper for Model that enables Model to be passed as an parameter to Activities |
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
<activity | |
android:name=".activities.MainActivity" | |
android:label="@string/title_activity_main" | |
android:theme="@style/AppTheme.NoActionBar"> | |
</activity> |
OlderNewer