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
import android.app.Activity; | |
import android.os.Bundle; | |
import android.support.wearable.view.WearableListView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; | |
public class WearableListViewActivity extends Activity { |
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
define styles: | |
<style name="WearableTextAppearanceLarge" parent="@android:style/TextAppearance.Large"> | |
<item name="android:textSize">20sp</item> | |
</style> | |
<style name="WearableTextAppearanceSmall" parent="@android:style/TextAppearance.Small"> | |
<item name="android:textSize">12sp</item> | |
</style> | |
and theme: |
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
import java.util.ArrayList; | |
import java.util.List; | |
import com.google.android.gms.wearable.DataMap; | |
public class MyObject { | |
public final long itemId; | |
public final long sortOrder; | |
public final String priceString; |
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
import android.os.Parcel; | |
import android.os.Parcelable; | |
import com.google.android.gms.wearable.DataMap; | |
/** | |
* <p>Allows to put and get {@link Parcelable} objects into {@link DataMap}</p> | |
* <b>USAGE:</b> | |
* <p> | |
* <b>Store object in DataMap:</b><br/> |