Displaying data using TableLayout

by ramesh kumar bh » Tue, 14 Apr 2009 01:00:04 GMT


Sponsored Links
 Hi
i have retrieved some information from database using Android
application.
I want to display this data via a table format in my application.
I have used TextView in tableRow to display the data. But how this
dynamic data has to be presented.
Please help me as i am new to this Android.
Regards
Ramesh Kumar Bhamidipati

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. to load image from drawable folder

i have thirty images in my drawable folder.a layout having back and
next buttons and having an imageview.now on clicking next and back
buttons different-2 images displayed.my xml code is:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
        android:gravity="center"
    >
    <ImageButton
   android:id="@+id/back"
   android:src="@drawable/btn_back"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="left"
   />
   <ImageButton
   android:id="@+id/next"
   android:src="@drawable/btn_next"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="right"
   />
   <ImageView
   android:id="@+id/imageWoL0"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="left"

   />

   </LinearLayout>

java code as:
private int imageCounter = 0;
        private ImageView imageView;

        private int[] imageArray = {R.drawable.image_w_lbl_0,
R.drawable.image_w_lbl_1,};
        @Override
        public void onCreate(Bundle savedInstanceState)
        {
                setContentView(R.layout.parent_frame);//this one is the common
parent layout for all imageviews
                super.onCreate(savedInstanceState);

                requestWindowFeature(Window.FEATURE_NO_TITLE);
                getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);

                imageView = new ImageView(this);

                ImageButton next = (ImageButton) findViewById(R.id.next);
                ImageButton back = (ImageButton) findViewById(R.id.back);
                next.setOnClickListener(this);
                back.setOnClickListener(this);
                //show the default image
                this.loadImage(imageArray[imageCounter]);

        }
        @Override
        public void onClick(View v)
        {
                int imagePath = 0;
                // TODO Auto-generated method stub
                switch (v.getId())
                {
                case R.id.next:
                        Log.i("Tag","tag");
                        if(imageCounter < 25)
                        {

                                imagePath = imageArray[imageCounter];
                        }
                        imageCounter++;
                        break;
                case R.id.back:
                        if(imageCounter > 0)
                        {
                                //imagePath =
                        }
                        break;
                }
                this.loadImage(imagePath);

        }

        private void loadImage(int imagePath)
        {
                imageView.setImageResource(imagePath);
                //imageView.findViewById(R.id.imageWoL0);
                //imageView.
        }
the problem is that i am not getting imageview means my first image
R.drawable.image_w_lbl_0(see above array) is not being loaded.
any help will be appreciated

-- 

2. (Closed) WTA : batre 9780

Maap salah sambung
Hahahaha
Kudunya keseblah nih
Maap ya mods+all

:D



essex os6

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

3. voice recognition -- IVR on Android

4. where cluase help in android

5. ViewFlipper seamless transition (like the activity fly in/out)

6. How to read the current frame buffer

7. Need help for OV3640 quality issue