Android Open Source - test-gradle Multi List Activity






From Project

Back to project page test-gradle.

License

The source code is released under:

Copyright (c) <2013> <Paul Estrada> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the S...

If you think the Android project test-gradle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.listexample;
//from   w  ww  .j ava  2  s.c  o  m
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;

import com.example.listexample.utils.HttpUtils;

public class MultiListActivity extends Activity {
  
  private ListView myList = null;
  private MyAdapter myAdapter = null;
  
  public enum RowType {
    ROW1,
    ROW2,
    ROW3
  }

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_multi);
    
    Log.e("TAG", "a: " + HttpUtils.connect("http://www.google.com", null));
    
    myList = (ListView) findViewById(R.id.list_view_lista);
    myAdapter = new MyAdapter(this);
    myList.setAdapter(myAdapter);
    
    //adding elements
    int j = 1;
    for (int i = 0; i <= 15; i++) {
      j++;
      switch (j) {
        case 1:
          myAdapter.addElement("Juan: " + i, RowType.ROW1);
          break;
        case 2:
          myAdapter.addElement("Juan: " + i, RowType.ROW2);
          break;
        case 3:
          myAdapter.addElement("Juan: " + i, RowType.ROW3);
          break;
        default:
          break;
      }
      if (i == 3) {
        j = 1;
      }
    }
  }

}




Java Source Code List

com.example.listexample.GpsActivity.java
com.example.listexample.MainActivity.java
com.example.listexample.MultiListActivity.java
com.example.listexample.MyAdapter.java
com.example.listexample.NavigationAActivity.java
com.example.listexample.NavigationBActivity.java
com.example.listexample.ViewHolderRB.java
com.example.listexample.ViewHolderTV.java
com.example.listexample.ViewHolder.java
com.example.listexample.sql.DBConstants.java
com.example.listexample.sql.MyDatabaseHelper.java
com.example.listexample.sql.MySqliteHelper.java
com.example.listexample.sql.SqliteActivity.java
com.example.listexample.sql.User.java
com.example.listexample.utils.GetTweetsTask.java
com.example.listexample.utils.HttpUtils.java
com.example.listexample.utils.JsonParser.java
com.example.listexample.utils.Tweet.java
com.example.listexample.webapp.MyWebAppActivity.java
com.example.listexample.webapp.MyWebViewClient.java
com.example.listexample.webapp.WebViewBridge.java