// Path: Components/googleglass-1.6/lib/android/16/content/google-gdk/samples/ApiDemo/src/com/google/android/glass/sample/apidemo/card/CardsActivity.java
// public final class CardsActivity extends Activity {
// 
//     private CardScrollView mCardScroller;
// 
//     @Override
//     protected void onCreate(Bundle bundle) {
//         super.onCreate(bundle);
// 
//         mCardScroller = new CardScrollView(this);
//         mCardScroller.setAdapter(new CardAdapter(createCards(this)));
//         setContentView(mCardScroller);
//     }
// 
//     /**
//      * Create list of cards that showcase different type of {@link Card} API.
//      */
//     private List<Card> createCards(Context context) {
//         ArrayList<Card> cards = new ArrayList<Card>();
//         cards.add(getImagesCard(context)
//                 .setImageLayout(ImageLayout.LEFT)
//                 .setText(R.string.text_left_images_layout_card));
//         cards.add(getImagesCard(context)
//                 .setImageLayout(ImageLayout.FULL)
//                 .setText(R.string.text_full_images_layout_card));
//         return cards;
//     }
// 
//     private Card getImagesCard(Context context) {
//         Card card = new Card(context);
//         card.addImage(R.drawable.codemonkey1);
//         card.addImage(R.drawable.codemonkey2);
//         card.addImage(R.drawable.codemonkey3);
//         card.addImage(R.drawable.codemonkey4);
//         card.addImage(R.drawable.codemonkey5);
//         return card;
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         mCardScroller.activate();
//     }
// 
//     @Override
//     protected void onPause() {
//         mCardScroller.deactivate();
//         super.onPause();
//     }
// }
// 
// Path: Components/googleglass-1.6/lib/android/16/content/google-gdk/samples/ApiDemo/src/com/google/android/glass/sample/apidemo/theming/ThemingActivity.java
// public final class ThemingActivity extends Activity {
// 
//     private CardScrollView mCardScroller;
// 
//     @Override
//     protected void onCreate(Bundle bundle) {
//         super.onCreate(bundle);
//         mCardScroller = new CardScrollView(this);
//         mCardScroller.setAdapter(new LayoutAdapter(this));
//         setContentView(mCardScroller);
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         mCardScroller.activate();
//     }
// 
//     @Override
//     protected void onPause() {
//         mCardScroller.deactivate();
//         super.onPause();
//     }
// }


import com.google.android.glass.app.Card;
import com.google.android.glass.media.Sounds;
import com.google.android.glass.sample.apidemo.card.CardsActivity;
import com.google.android.glass.sample.apidemo.card.CardAdapter;
import com.google.android.glass.sample.apidemo.opengl.OpenGlService;
import com.google.android.glass.sample.apidemo.theming.ThemingActivity;
import com.google.android.glass.sample.apidemo.touchpad.SelectGestureDemoActivity;
import com.google.android.glass.widget.CardScrollAdapter;
import com.google.android.glass.widget.CardScrollView;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import java.util.ArrayList;
import java.util.List;
        cards.add(GESTURE_DETECTOR, new Card(context).setText(R.string.text_gesture_detector));
        cards.add(THEMING, new Card(context).setText(R.string.text_theming));
        cards.add(OPENGL, new Card(context).setText(R.string.text_opengl));
        return cards;
    }

    @Override
    protected void onResume() {
        super.onResume();
        mCardScroller.activate();
    }

    @Override
    protected void onPause() {
        mCardScroller.deactivate();
        super.onPause();
    }

    /**
     * Different type of activities can be shown, when tapped on a card.
     */
    private void setCardScrollerListener() {
        mCardScroller.setOnItemClickListener(new AdapterView.OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Log.d(TAG, "Clicked view at position " + position + ", row-id " + id);
                int soundEffect = Sounds.TAP;
                switch (position) {
                    case CARDS:
// Path: Components/googleglass-1.6/lib/android/16/content/google-gdk/samples/ApiDemo/src/com/google/android/glass/sample/apidemo/card/CardsActivity.java
// public final class CardsActivity extends Activity {
// 
//     private CardScrollView mCardScroller;
// 
//     @Override
//     protected void onCreate(Bundle bundle) {
//         super.onCreate(bundle);
// 
//         mCardScroller = new CardScrollView(this);
//         mCardScroller.setAdapter(new CardAdapter(createCards(this)));
//         setContentView(mCardScroller);
//     }
// 
//     /**
//      * Create list of cards that showcase different type of {@link Card} API.
//      */
//     private List<Card> createCards(Context context) {
//         ArrayList<Card> cards = new ArrayList<Card>();
//         cards.add(getImagesCard(context)
//                 .setImageLayout(ImageLayout.LEFT)
//                 .setText(R.string.text_left_images_layout_card));
//         cards.add(getImagesCard(context)
//                 .setImageLayout(ImageLayout.FULL)
//                 .setText(R.string.text_full_images_layout_card));
//         return cards;
//     }
// 
//     private Card getImagesCard(Context context) {
//         Card card = new Card(context);
//         card.addImage(R.drawable.codemonkey1);
//         card.addImage(R.drawable.codemonkey2);
//         card.addImage(R.drawable.codemonkey3);
//         card.addImage(R.drawable.codemonkey4);
//         card.addImage(R.drawable.codemonkey5);
//         return card;
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         mCardScroller.activate();
//     }
// 
//     @Override
//     protected void onPause() {
//         mCardScroller.deactivate();
//         super.onPause();
//     }
// }
// 
// Path: Components/googleglass-1.6/lib/android/16/content/google-gdk/samples/ApiDemo/src/com/google/android/glass/sample/apidemo/theming/ThemingActivity.java
// public final class ThemingActivity extends Activity {
// 
//     private CardScrollView mCardScroller;
// 
//     @Override
//     protected void onCreate(Bundle bundle) {
//         super.onCreate(bundle);
//         mCardScroller = new CardScrollView(this);
//         mCardScroller.setAdapter(new LayoutAdapter(this));
//         setContentView(mCardScroller);
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         mCardScroller.activate();
//     }
// 
//     @Override
//     protected void onPause() {
//         mCardScroller.deactivate();
//         super.onPause();
//     }
// }


// Path: Components/googleglass-1.6/lib/android/16/content/google-gdk/samples/ApiDemo/src/com/google/android/glass/sample/apidemo/ApiDemoActivity.java
import com.google.android.glass.app.Card;
import com.google.android.glass.media.Sounds;
import com.google.android.glass.sample.apidemo.card.CardsActivity;
import com.google.android.glass.sample.apidemo.card.CardAdapter;
import com.google.android.glass.sample.apidemo.opengl.OpenGlService;
import com.google.android.glass.sample.apidemo.theming.ThemingActivity;
import com.google.android.glass.sample.apidemo.touchpad.SelectGestureDemoActivity;
import com.google.android.glass.widget.CardScrollAdapter;
import com.google.android.glass.widget.CardScrollView;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import java.util.ArrayList;
import java.util.List;

        cards.add(GESTURE_DETECTOR, new Card(context).setText(R.string.text_gesture_detector));
        cards.add(THEMING, new Card(context).setText(R.string.text_theming));
        cards.add(OPENGL, new Card(context).setText(R.string.text_opengl));
        return cards;
    }

    @Override
    protected void onResume() {
        super.onResume();
        mCardScroller.activate();
    }

    @Override
    protected void onPause() {
        mCardScroller.deactivate();
        super.onPause();
    }

    /**
     * Different type of activities can be shown, when tapped on a card.
     */
    private void setCardScrollerListener() {
        mCardScroller.setOnItemClickListener(new AdapterView.OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Log.d(TAG, "Clicked view at position " + position + ", row-id " + id);
                int soundEffect = Sounds.TAP;
                switch (position) {
                    case CARDS:
                        startActivity(new Intent(ApiDemoActivity.this, CardsActivity.class));