Ok despite for the fear of being down voted for this really dirty way, I would like to share this one as answer, so that anyone could improve on it or come up with a lot more better implementation:
As I am just playing around with the glass, I did the belwo thing, now I am doing this whole stuff programtically so thats Its dynamic . For the record, my so called list layout would be:
<Button android:id="@+id/btn1" android:text="Btn 1" android:background="#CD3333" android:focusable="true" android:textSize="14sp" android:textStyle="bold" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1.0"/> <View android:layout_width="match_parent" android:layout_height="2dp" android:background="#000000"/> <Button android:id="@+id/btn2" android:text="Btn 2" android:textStyle="bold" android:textSize="14sp" android:background="#CD3333" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1.0"/> <View android:layout_width="match_parent" android:layout_height="2dp" android:background="#000000"/> <Button android:id="@+id/btn3" android:text="Btn 3" android:textStyle="bold" android:textSize="14sp" android:background="#CD3333" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1.0"/> <View android:layout_width="match_parent" android:layout_height="2dp" android:background="#000000"/> <Button android:id="@+id/btn4" android:text="Btn 4" android:background="#CD3333" android:textStyle="bold" android:textSize="14sp" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1.0"/> <View android:layout_width="match_parent" android:layout_height="2dp" android:background="#000000"/> <Button android:id="@+id/btn5" android:text="Btn 5" android:textSize="14sp" android:textStyle="bold" android:background="#CD3333" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1.0"/>
and in my Activity I would do this:
public class ButtonListActivity extends Activity implements View.OnFocusChangeListener {
public static final String TAG = "ButtonListActivity";
Button mButton1;
Button mButton2;
Button mButton3;
Button mButton4;
Button mButton5;
Bundle extras;
ArrayList<String> list;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list_template);
list = new ArrayList<String>();
mButton1 = (Button)findViewById(R.id.btn1);
mButton2 = (Button)findViewById(R.id.btn2);
mButton3 = (Button)findViewById(R.id.btn3);
mButton4 = (Button)findViewById(R.id.btn4);
mButton5 = (Button)findViewById(R.id.btn5);
extras = getIntent().getExtras();
if(extras!=null)
{
list = extras.getStringArrayList("list");
}
mButton1.setText(list.get(0));
mButton2.setText(list.get(1));
mButton3.setText(list.get(2));
mButton4.setText(list.get(3));
mButton5.setText(list.get(4));
mButton5.setFocusableInTouchMode(true);
mButton5.setOnFocusChangeListener(this);
mButton4.setFocusableInTouchMode(true);
mButton4.setOnFocusChangeListener(this);
mButton3.setFocusableInTouchMode(true);
mButton3.setOnFocusChangeListener(this);
mButton2.setFocusableInTouchMode(true);
mButton2.setOnFocusChangeListener(this);
mButton1.setFocusableInTouchMode(true);
mButton1.setOnFocusChangeListener(this);
}
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(v.hasFocus())
v.setBackgroundColor(Color.parseColor("#0EBFE9"));
else
v.setBackgroundColor(Color.parseColor("#CD3333"));
}
}
So the actual output would appear as a list with orange background and the listener would help you make your selection as you go up and down your list. The list elements are set with the intent extras I am getting. In this case a string array list. So the final produce is a listview looking like layout.
I resolved this by using the standard android layouts, more or less like an "immersion". Baseline: Not using cards
This is more of a comment than an answer, please correct me if wrong, live cards are supposed to be pushed to timeline manager and for the other half question, I did not see an example of a low frequency live cards using a the views mentioned here:
https://developers.google.com/glass/develop/gdk/ui/live-cards