Sorry, I've forget to attach my source in my earlier post.

Main.xml
======

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/widget34"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android";
>
<TextView
android:id="@+id/chooselanguage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select any one of the Language :"
android:layout_x="58px"
android:layout_y="45px"
>
</TextView>
<RadioGroup
android:id="@+id/radiogroup"
android:layout_width="309px"
android:layout_height="200px"
android:orientation="vertical"
>
<RadioButton
android:id="@+id/tamil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tamil"
>
</RadioButton>
<RadioButton
android:id="@+id/english"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="English"
>
</RadioButton>
<RadioButton
android:id="@+id/hindi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hindi"
>
</RadioButton>
<RadioButton
android:id="@+id/arabic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Arabic"
>
</RadioButton>
</RadioGroup>
<Button
android:id="@+id/videolist"
android:layout_width="136px"
android:layout_height="37px"
android:text="View List of Videos"
>
</Button>
</LinearLayout>





Manifest.xml
==========

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="com.aspire.android.UserChoice"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".UserChoiceActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".LanguageOneActivity"
                        android:label="@string/app_name">
                        <intent-filter>
                        <action android:name=
                        "com.aspire.android.UserChoice.LanguageOneActivity"/>
                        <category android:name=
                        "android.intent.category.DEFAULT"/>
                        </intent-filter>
                </activity>
                <activity android:name=".LanguageTwoActivity"
                        android:label="@string/app_name">
                        <intent-filter>
                        <action android:name=
                        "com.aspire.android.UserChoice.LanguageTwoActivity"/>
                        <category android:name=
                        "android.intent.category.DEFAULT"/>
                        </intent-filter>
                </activity>

    </application>
</manifest>



UserChoiceAcvitiy.Java
=================

package com.aspire.android.UserChoice;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

public class UserChoiceActivity extends Activity implements
OnClickListener {
         RadioButton tamil;
         RadioButton english;
         RadioButton hindi;
         RadioButton arabic;
         Button videolist;
        /** Called when the activity is first created. */

        @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        tamil = (RadioButton)this.findViewById(R.id.tamil);
        tamil.setChecked(true);
        english=(RadioButton)this.findViewById(R.id.english);
        hindi=(RadioButton)this.findViewById(R.id.hindi);
        arabic=(RadioButton)this.findViewById(R.id.arabic);
        videolist = (Button)this.findViewById(R.id.videolist);
        videolist.setOnClickListener(this);
        }

        @Override
        public void onClick(View arg0) {
                // TODO Auto-generated method stub
                Log.i("Language Selection", "Choose Lanuguage");
                if(tamil.isChecked()){
                        startActivity(new Intent(
                    "com.aspire.android.UserChoice.LanguageOneActivity"));
                    Log.i("Language 1","Video 4 Tamil");
                }
                if(english.isChecked()){
                        startActivity(new Intent(
                    "com.aspire.android.UserChoice.LanguageTwoActivity"));
                        Log.i("Language 2", "Video 4 English");
                }
                if(hindi.isChecked()){

                }
                if(arabic.isChecked()){

                }
        }
}


LanguageOneActivity.java
====================

package com.aspire.android.UserChoice;
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

/*public class LanguageOneActivity extends Activity  {
        TextView language;
        Button videolist;
        *//** Called when the activity is first created. *//*

        @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.language1video);

        }
}*/



/*import android.app.ListActivity;
import android.widget.ArrayAdapter;

public class LanguageOneActivity extends ListActivity {
    *//** Called when the activity is first created. *//*
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        // Create an array of Strings, that will be put to our
ListActivity
        String[] mStrings = new String[]{"Android", "Google",
"Eclipse"};

        // Create an ArrayAdapter, that will actually make the Strings
above appear in the ListView
        this.setListAdapter(new ArrayAdapter<String>(this,
                         android.R.layout.simple_list_item_1,
mStrings));
    }
} */


import java.net.URI;
import java.net.URISyntaxException;

import android.app.ListActivity;
import android.content.ContentUris;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class LanguageOneActivity extends ListActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        // Create an array of Strings, that will be put to our
ListActivity
        String[] mStrings = new String[]{"Baby", "Google",
"Eclipse"};
        // Create an ArrayAdapter, that will actually make the Strings
above appear in the ListView
        this.setListAdapter(new ArrayAdapter<String>(this,
                         android.R.layout.simple_list_item_1,
mStrings));
    }

    @Override
    protected void onListItemClick(ListView listview, View view, int
position, long id){
        super.onListItemClick(listview, view, position, id);

        // Get the item that was clicked
        Object obj = this.getListAdapter().getItem(position);
        String keyword = obj.toString();

        // Create an VIEW intent
        Intent myIntent = null;
             try {
                  // The intent will open our anddev.org-board and
search for the keyword clicked.
                /*  myIntent = new
Intent("android.intent.action.VIEW",
                          Uri.parse("http://anddev.org/search.php?
mode=results&search_keywords='"
                                 + keyword + "'")); */

                 myIntent = new Intent("android.intent.action.VIEW",
                         Uri.parse("http://www.clippz.com/search.asp?
searchtext="
                                + keyword ));
             } catch (Exception e) {
                  e.printStackTrace();
             }
             // Start the activity
        startActivity(myIntent);
       }

}

Please go through it... and do the needful for my expected output.

Thanks,
Yasmin



On Nov 3, 11:19 am, AndroidKid <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've done oneapplicationusing Listview Concepts.
>
> Inmyapplication, I've radio buttons for Languages. The user selects
> any one of the language then I've displayed one list whose items are
> "Baby, Google, Eclipse". If the user clicks any one of item then the
> web browser will opened with corresponding videos.
>
> If the user clicks any one of video then Download page will come. Once
> the user clicks "Download Now" link then it will navigate to next page
> with the link " Download Ready".
>
> ERROR: If the user clicks the link "Download Ready" then I got someerrorpage. 
> Then It goes back to Listview page.
>
> I don't know what I've missed here. I've attachedmyentire source
> code here. Can any one run this & fix the issue.
>
> Expected Output : "Automatically the Video file must be downloaded
> within PC under the folder "/res/raw" when the user clicks the link
> "Download Ready in web page" and the video will display in the
> emulator. "
>
> Can't wait for your answer!!!
>
> Thanks in advance for any reply from you!!!
>
> Thanks Again!!!
> Yasmin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to