<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.handhelds.android.devel">
    <title>gmane.comp.handhelds.android.devel</title>
    <link>http://blog.gmane.org/gmane.comp.handhelds.android.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211056"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211055"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211054"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211053"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211052"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211051"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211050"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211049"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211048"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211047"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211046"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211045"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211044"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211043"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211042"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211041"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211040"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211039"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211038"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211037"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211056">
    <title>Re: android configuration change asynctask</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211056</link>
    <description>&lt;pre&gt;Thank you!

On 5月24日, 上午12時59分, Kostya Vasilyev &amp;lt;kmans...&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Greenhand</dc:creator>
    <dc:date>2012-05-24T13:47:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211055">
    <title>Re: Re: ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211055</link>
    <description>&lt;pre&gt;Hi, 
why are you doing this 
                   View row=super.getView(position, convertView, parent);
 though you are in getView() Method.
so you will get convertView that is same. 

Ok, 
follow this,

if(convertview==null){
1. inflate view,  
2. check type of data and set visibility 
3.set tag of view.

}else{
// getTag value 
}
//set values in fields of view.

hope it will help you.

Regards
Imran Ali


On Thursday, May 24, 2012 4:22:42 PM UTC+5:30, shruthi santosh wrote:
On Thursday, May 24, 2012 4:22:42 PM UTC+5:30, shruthi santosh wrote:

&lt;/pre&gt;</description>
    <dc:creator>imran ali</dc:creator>
    <dc:date>2012-05-24T11:31:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211054">
    <title>Re: Re: ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211054</link>
    <description>&lt;pre&gt;i had tried if ...else condition.it did not wok.so i changed it to
if...else if

shruthi

On Thu, May 24, 2012 at 4:22 PM, kalandar &amp;lt;kasimkk87&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>shruthi santosh</dc:creator>
    <dc:date>2012-05-24T11:17:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211053">
    <title>(unknown)</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211053</link>
    <description>&lt;pre&gt;

&lt;/pre&gt;</description>
    <dc:creator>Hyukmin Kwon</dc:creator>
    <dc:date>2012-05-24T11:07:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211052">
    <title>Re:ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211052</link>
    <description>&lt;pre&gt;.h
On May 24, 2012 6:27 PM, "shruthi santosh" &amp;lt;shruthi.shru63&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Hyukmin Kwon</dc:creator>
    <dc:date>2012-05-24T11:06:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211051">
    <title>Re: Re: ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211051</link>
    <description>&lt;pre&gt;here is the code for getView(),

 public View getView(int position, View convertView, ViewGroup parent) {

                   View row=super.getView(position, convertView, parent);
                   ViewHolder holder=(ViewHolder)row.getTag();
                   if (holder==null) {
                       String type="T";
                       holder=new ViewHolder(row);
                       row.setTag(holder);
                       String blog_type =
((TextView)row.findViewById(R.id.type)).getText().toString();
                       if(blog_type.equals(type))
                       {
                           holder.button.setVisibility(Button.GONE);
                           holder.text.setVisibility(TextView.VISIBLE);
                           holder.text1.setVisibility(TextView.GONE);
                           holder.button1.setVisibility(Button.VISIBLE);
                       }
                       holder.button.setTag(row);
                       holder.button.setOnClickListener(new
View.OnClickListener() {

                        &amp;lt; at &amp;gt;Override
                        public void onClick(View v) {
                            // TODO Auto-generated method stub
                            View r=(View)v.getTag();
                            String type="A";
                            String blog_data =
((TextView)r.findViewById(R.id.blog_data)).getText().toString();
                            String blog_id =
((TextView)r.findViewById(R.id.blog_id)).getText().toString();
                            String blog_type =
((TextView)r.findViewById(R.id.type)).getText().toString();
                            if(blog_type.equals(type))
                            {
                                playMessage(Integer.parseInt(blog_id));
                            }

                        }
                    });

                       holder.button1.setTag(row);
                       holder.button1.setOnClickListener(new
View.OnClickListener() {

                        &amp;lt; at &amp;gt;Override
                        public void onClick(View v) {
                            // TODO Auto-generated method stub
                            View r=(View)v.getTag();
                            String type="T";
                            String blog_data =
((TextView)r.findViewById(R.id.blog_data)).getText().toString();
                            String blog_id =
((TextView)r.findViewById(R.id.blog_id)).getText().toString();
                            String blog_type =
((TextView)r.findViewById(R.id.type)).getText().toString();
                            String annotation =
((TextView)r.findViewById(R.id.annotation)).getText().toString();
                            String url =
((TextView)r.findViewById(R.id.url)).getText().toString();
                            if(blog_type.equals(type))
                            {
                                Intent message=new
Intent(FeedsActivity.this, BlogMessage.class);
                                message.putExtra("blog_data", blog_data);
                                message.putExtra("annotation", annotation);
                                message.putExtra("flag","false");
                                message.putExtra("url", url);
                                startActivity(message);
                            }

                        }
                    });

                       holder.text1.setTag(row);
                       holder.text1.setOnClickListener(new
View.OnClickListener() {

                        &amp;lt; at &amp;gt;Override
                        public void onClick(View v) {
                            // TODO Auto-generated method stub
                            View r=(View)v.getTag();
                            String type="A";
                            String blog_data =
((TextView)r.findViewById(R.id.blog_data)).getText().toString();
                            String blog_id =
((TextView)r.findViewById(R.id.blog_id)).getText().toString();
                            String blog_type =
((TextView)r.findViewById(R.id.type)).getText().toString();
                            String annotation =
((TextView)r.findViewById(R.id.annotation)).getText().toString();
                            String url =
((TextView)r.findViewById(R.id.url)).getText().toString();
                            if(blog_type.equals(type))
                            {
                                Intent message=new
Intent(FeedsActivity.this, BlogMessage.class);
                                message.putExtra("blog_data", blog_data);
                                message.putExtra("annotation", annotation);
                                message.putExtra("flag","true");
                                message.putExtra("url", url);
                                message.putExtra("type", type);
                                startActivity(message);
                            }

                        }
                    });
                   }
                   return row;
               }

                class ViewHolder
                {
                    Button button;
                    TextView text;
                    Button button1;
                    TextView text1;
                ViewHolder(View base) {
                    this.button=(Button)base.findViewById(R.id.player);
                    this.text=(TextView)base.findViewById(R.id.blog_data);
                    this.button1=(Button)base.findViewById(R.id.textimg);
                    this.text1=(TextView)base.findViewById(R.id.annotation);
                    }
                }
shruthi

On Thu, May 24, 2012 at 3:43 PM, imran ali &amp;lt;imran2k1&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>shruthi santosh</dc:creator>
    <dc:date>2012-05-24T10:52:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211050">
    <title>Re: ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211050</link>
    <description>&lt;pre&gt;
 hi shruthi,
      
        I think you are using if condition inside the getView method to 
visible or invisible some buttons.
try if... else condition instead of if , like this

if(condition true)
 {
  button visible;
 }
else
 {
  button false;
 }

it will cure your problem....
let me know this will help or not....

Regards
kalandar N

&lt;/pre&gt;</description>
    <dc:creator>kalandar</dc:creator>
    <dc:date>2012-05-24T10:52:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211049">
    <title>Re: Re: Send the user to Google Play application's page</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211049</link>
    <description>&lt;pre&gt;Nice to known that , thanks Treking. Although documentation is very vast
and sometimes it is hard to find what you are looking for if you do not
know where to search exactly. I agree that documentation is my friend,
but most of the time discussion groups are even friendly than docs.

Regards,


On 23/05/12 22:55, TreKing wrote:

&lt;/pre&gt;</description>
    <dc:creator>Francisco M. Marzoa Alonso</dc:creator>
    <dc:date>2012-05-24T10:22:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211048">
    <title>Re: Re: Send the user to Google Play application's page</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211048</link>
    <description>&lt;pre&gt;That's right. Note you can use market:// url instead http:// scheme so
the link is opened directly with Google Play.

On 23/05/12 20:34, Bas Verhoog wrote:

&lt;/pre&gt;</description>
    <dc:creator>Francisco M. Marzoa Alonso</dc:creator>
    <dc:date>2012-05-24T10:20:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211047">
    <title>Re: ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211047</link>
    <description>&lt;pre&gt;can you post part of code where your doing visible/invisible of buttons.
I think you are doing some mistake in getView(...) method of Adapter.
and it is going to mess on scroll of listview.


Regards
Imran Ali
On Thursday, May 24, 2012 2:56:38 PM UTC+5:30, shruthi santosh wrote:

&lt;/pre&gt;</description>
    <dc:creator>imran ali</dc:creator>
    <dc:date>2012-05-24T10:13:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211046">
    <title>Re: Create an object class but error</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211046</link>
    <description>&lt;pre&gt;Daniel,

Thank you for your kindly recommandation.

Anyway, I've find what's the problem there and solved. Thank you very much.

HK

On Thu, May 24, 2012 at 5:29 PM, Daniel Drozdzewski &amp;lt;
daniel.drozdzewski&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:




&lt;/pre&gt;</description>
    <dc:creator>HK Tsang</dc:creator>
    <dc:date>2012-05-24T09:46:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211045">
    <title>Re: Writing a file to /data/local?</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211045</link>
    <description>&lt;pre&gt;I declared it in the Manifest's Permissions tab in Eclipse. It's been 
declared right, but I couldn't look it up (at someone else's PC for a 
second).

On Thursday, May 24, 2012 6:31:59 AM UTC+2, TreKing wrote:

&lt;/pre&gt;</description>
    <dc:creator>Bas Verhoog</dc:creator>
    <dc:date>2012-05-24T09:39:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211044">
    <title>Re: CheckBoxPreference.setChecked() doesn't take effect in Activity Test</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211044</link>
    <description>&lt;pre&gt;Hi,
guess you are using PreferenceActivity.
so, check your xml, what have you given android:defaultValue="?", either 
true or false?

Hope it will help you.


Regards
Imran Ali

On Thursday, May 24, 2012 2:10:36 PM UTC+5:30, Ira.Han wrote:

&lt;/pre&gt;</description>
    <dc:creator>imran ali</dc:creator>
    <dc:date>2012-05-24T09:31:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211043">
    <title>Re: Create an object class but error</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211043</link>
    <description>&lt;pre&gt;HK,

I am sorry you feel this way - and don't worry, you have not disturbed me.

I think that you would be much better off, learning Java first,
outside of Android or any other platform.

Simply start some tutorial, going through nuances of Java. Problems
you are having are very easy to fix, once you know some basics.

The further you go down the Android + Java route as a complete newbie,
the more frustrated you will become trying to understand cryptic
errors (some resulting from misuse of Java, some from the platform).

Daniel







On 24 May 2012 07:59, HK Tsang &amp;lt;hktsang56&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Daniel Drozdzewski</dc:creator>
    <dc:date>2012-05-24T09:29:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211042">
    <title>ListView with Simple adapter</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211042</link>
    <description>&lt;pre&gt;My feeds list conatins both text feeds and audio feeds.
I have a button to view the complete text and a button to play the audio
feeds.
I am checking the the type of the feed to make the appropriate button
visible.
The first four feeds in the list gets the proper buttons but the rest are
not proper(i mean some text feeds r getting audio button and some audio
feeds are getting text button)
Pl. help me with this problem

shruthi

&lt;/pre&gt;</description>
    <dc:creator>shruthi santosh</dc:creator>
    <dc:date>2012-05-24T09:26:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211041">
    <title>Is it possible to open android camera and get a media path at activity response?</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211041</link>
    <description>&lt;pre&gt;Hello for readers,

I would like to open the android camera to look like this one

Intent cameraIntent = new
Intent(android.provider.MediaStore.INTENT_ACTION_VIDEO_CAMERA);
startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);

Where user may capture an image, record a video or open video/pictures
gallery and select one from there.
Then on return to my app, i would like to find out the path for the
just created/selected media.

Is it possible ?

Currently, to archive my users have to do a click for each operation
like this:

new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
or
new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);

startActivityForResult(intent, ACTION_PROCESS DATA);

and on activity result i take the media path from data, but if i use

new Intent(android.provider.MediaStore.INTENT_ACTION_VIDEO_CAMERA);

on return to my activity the data is null.
But i like the way camera opens with INTENT_ACTION_VIDEO_CAMERA . it
is exactly what i need.

I am googling for the solution, but in case you have any idea,i would
appreciate you post very much.

Thank you in advance.
Lidy

&lt;/pre&gt;</description>
    <dc:creator>Lidia</dc:creator>
    <dc:date>2012-05-24T09:12:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211040">
    <title>CheckBoxPreference.setChecked() doesn't take effect in Activity Test</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211040</link>
    <description>&lt;pre&gt;Hi,
I'm writing a test app which have a operation of click on the
CheckBoxPreference, here is my code:

public class MyActivityTest extends
ActivityInstrumentationTestCase2&amp;lt;MyActivity&amp;gt;{
.....
&amp;lt; at &amp;gt;UiThreadTest
public void testEnable() {
CheckBoxPreference mMyEnable =
(CheckBoxPreference)mActivity.getPreferenceScreen().findPreference("my_enabled");
mMyEnable.setChecked(false);
Log.v(TAG,
"=======================1=============isChecked:"+mMyEnable.isChecked());
mMyEnable.setChecked(false);
Log.v(TAG,
"=======================2=============isChecked:"+mMyEnable.isChecked());
wait(4);
}
....
}

in logcat, the isChecked value actually changed:
V/MyAppTest(12589):
=======================2=============isChecked:true
V/MyAppTest(12589):
=======================2=============isChecked:false

However on GUI, this checkbox not be clicked/unclicked... is there
anyone have some ideas?
Many thanks

Regards
Ira

&lt;/pre&gt;</description>
    <dc:creator>Ira.Han</dc:creator>
    <dc:date>2012-05-24T08:40:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211039">
    <title>Re: Create an object class but error</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211039</link>
    <description>&lt;pre&gt;Yes you are right. Acturally I'm learning both together right now. I just
can learn it by my-self and find some exsample to study on web. No one can
teach me arround me. Therefore I just can ask something that I don't
understand in here. I know that my knowledge is too a little. But I hope
someone can solve me the problems that I can't understand.

If you feel my question is too stupid. I'm sorry for disturbing you.

On Thu, May 24, 2012 at 2:07 PM, Daniel Drozdzewski &amp;lt;
daniel.drozdzewski&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:




&lt;/pre&gt;</description>
    <dc:creator>HK Tsang</dc:creator>
    <dc:date>2012-05-24T06:59:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211038">
    <title>Re: SQLiteException: no such table</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211038</link>
    <description>&lt;pre&gt;How can it happen that the table does not exist? In one installation of 
thousands? 
&lt;/pre&gt;</description>
    <dc:creator>imran ali</dc:creator>
    <dc:date>2012-05-24T06:55:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211037">
    <title>Re: java.lang.ClassNotFoundException</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211037</link>
    <description>&lt;pre&gt;On Thu, May 24, 2012 at 1:22 AM, Ralph Bergmann | the4thFloor.eu &amp;lt;
ralph&amp;lt; at &amp;gt;the4thfloor.eu&amp;gt; wrote:



It's a fluke, likely caused by a bad install. Ignore it. Haven them
re-install the app if you can.

-------------------------------------------------------------------------------------------------
TreKing &amp;lt;http://sites.google.com/site/rezmobileapps/treking&amp;gt; - Chicago
transit tracking app for Android-powered devices

&lt;/pre&gt;</description>
    <dc:creator>TreKing</dc:creator>
    <dc:date>2012-05-24T06:43:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211036">
    <title>Re: Spinner Help</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.android.devel/211036</link>
    <description>&lt;pre&gt;CategoryService.java
package savy.exam.dataProvider;

import savy.exam.entity.Category;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
public class CategoryService {
 private SQLiteDatabase db;
 public static final String[] CATEGORY_PROJECTION = {"StateUid
_id","Name","ListOrder","Inactive","CreatedDate","CreatedByUid","ModifiedDate","ModifiedByUid","CountryUid"};
 public static final String CATEGORY_TABLE = "MasterState";
 private Context context;
 public CategoryService(Context context, String  dbName)
 {
  db=context.openOrCreateDatabase(dbName, Context.MODE_PRIVATE, null);
  this.context=context;
 }
public Category[] getAllCategories(SelectionParams params)
{
 Category[] categories=null;
 Cursor data=null;
 try
 {
  if(params == null)
   data=db.query(CATEGORY_TABLE, CATEGORY_PROJECTION, null,null, null,
null,null);
  else
   data=db.query(params.getTableName(), params.getProjection(),
params.getSelection(), params.getSelectionArgs(),params.getGroupBy(),
params.getHaving(), params.orderBy);
   if(data.moveToFirst())
   {
    int i=0;
    categories = new Category[data.getCount()];
    do
    {
     categories[i]=new Category();
     categories[i].setCategoryId(data.getString(0));
     categories[i].setCategoryName(data.getString(1));
     i++;
    }while(data.moveToNext());

   }
 }
 finally
 {
  db.close();

 }
 return categories;

}
}
*********************************************************************************************************************************************
SelectionParams.java
*

package savy.exam.dataProvider;



*



**
*

public
*

*class* SelectionParams {

*private* String tableName,selection,groupBy,having;

*private* String[] projection,selectionArgs;

*public* String orderBy;

*public* String getTableName() {

*return* tableName;

}

*public* *void* setTableName(String tableName) {

*this*.tableName = tableName;

}

*public* String getSelection() {

*return* selection;

}

*public* *void* setSelection(String selection) {

*this*.selection = selection;

}

*public* String getGroupBy() {

*return* groupBy;

}

*public* *void* setGroupBy(String groupBy) {

*this*.groupBy = groupBy;

}

*public* String getHaving() {

*return* having;

}

*public* *void* setHaving(String having) {

*this*.having = having;

}

 *public* String[] getProjection() {

*return* projection;

}

*public* *void* setProjection(String[] projection) {

*this*.projection = projection;

}

*public* String[] getSelectionArgs() {

*return* selectionArgs;

}

*public* *void* setSelectionArgs(String[] selectionArgs) {

*this*.selectionArgs = selectionArgs;

}

 }



*********************************************************************************************************************************
*SubCategoryService.java*
*

package
*

savy.exam.dataProvider;

  **
*

import
*

savy.exam.entity.SubCategory;

**
*

import
*

android.content.Context;

**
*

import
*

android.database.Cursor;

**
*

import
*

android.database.sqlite.SQLiteDatabase;

**
*

import
*

*android.util.Log*;

**
*

import
*

*android.widget.Toast*;

 **
*

public
*

*class* SubCategoryService {

 *private* SQLiteDatabase db;

 *public* *static* *final* String[] *SUBCATEGORY_PROJECTION* = {"DistrictUid
_id", "Name", "ListOrder","Inactive","CreatedDate","CreatedByUid",
"ModifiedDate","ModifiedByUid" ,"StateUid"};

 *public* *static* *final* String *SUBCATEGORY_TABLE* = "MasterDistrict";

 *private* Context *context*;

 *public* SubCategoryService(Context context, String dbName){

 db = context.openOrCreateDatabase(dbName, Context.*MODE_PRIVATE*, *null*);

 *this*.context = context;

 }

 *public* SubCategory[] getSubCategoriesByCategory(SelectionParams params){

 SubCategory[] subCategories =

*null*;

 Cursor data =

*null*;

 *try*{

 *if*(params == *null*)

 data =

db.query("MasterDistrict", *SUBCATEGORY_PROJECTION*, *null*, *null*, *null*,
*null*, *null*);

 *else*

* *

data =

db.query(params.getTableName(), params.getProjection(),
params.getSelection(), params.getSelectionArgs(), params.getGroupBy(),
params.getHaving(), params.orderBy);

 *if*(data.moveToFirst()){

 *int* i = 0;

 subCategories =

*new* SubCategory[data.getCount()];

 *do*{

 subCategories[i] =

*new* SubCategory();

 subCategories[i].setDistrictId(data.getString(0));

 subCategories[i].setDistrictName(data.getString(1));

 subCategories[i].setStateId(data.getString(8));

  i++;

 }

*while*(data.moveToNext());

  }

 }

*catch*(Exception ex){

 ex.printStackTrace();

 }

*finally*{

 db.close();

 }

 *return* subCategories;

 }

}
****************************************************************************
CityService.java
package savy.exam.dataProvider;
import savy.exam.entity.CityCategory;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class CityService {
 private SQLiteDatabase db;
 public static final String[] CITYCATEGORY_PROJECTION = {"CityUid", "Name",
"DistrictUid","ListOrder","Inactive","CreatedDate","CreatedByUid","ModifiedDate","ModifiedByUid"};
 public static final String CITYCATEGORY_TABLE = "MasterCity";
 private Context context;
 public CityService(Context context, String dbName){
  db = context.openOrCreateDatabase(dbName, Context.MODE_PRIVATE, null);
  this.context = context;
 }
 public CityCategory[] getCityByCategory(SelectionParams params){
  CityCategory[] subCategories = null;
  Cursor data = null;
  try{
   if(params == null)
    return null;
   data = db.query(params.getTableName(), params.getProjection(),
params.getSelection(), params.getSelectionArgs(), params.getGroupBy(),
params.getHaving(), params.orderBy);
   if(data.moveToFirst()){
    int i = 0;
    subCategories = new CityCategory[data.getCount()];
    do{
     subCategories[i] = new CityCategory();
     subCategories[i].setCityId1(data.getString(0));
     subCategories[i].setDistrictId1(data.getString(2));
     subCategories[i].setCityName1(data.getString(1));

     i++;
    }while(data.moveToNext());

   }
  }catch(Exception ex){
   ex.printStackTrace();
  }finally{
   db.close();
  }
  return subCategories;
 }
}
******************************************************************************************************
Category.java
*

package
*

savy.exam.entity;
**
*

public
*

*class* Category

{

String

categoryId;

String

categoryName;

 *public* *static* *final* String[] *CATEGORY_PROJECTION* = {"StateUid _id",
"Name","ListOrder","Inactive","CreatedDate","CreatedByUid","ModifiedDate",
"ModifiedByUid","CountryUid"};

 *public* String getCategoryId() {

*return* categoryId;

}

 *public* *void* setCategoryId(String categoryId) {

*this*.categoryId = categoryId;

}

 *public* String getCategoryName() {

*return* categoryName;

}

 *public* *void* setCategoryName(String categoryName) {

*this*.categoryName = categoryName;

}

 &amp;lt; at &amp;gt;Override

*public* String toString() {

*return* categoryName;

}

}
***********************************************************************************************************
SubCategory.java
*

package
*

savy.exam.entity;

**
*

public
*

*class* SubCategory {

String

districtId,stateId,districtName;

 *public* *static* *final* String[] *SUBCATEGORY_PROJECTION* = {"DistrictUid
_id", "Name","ListOrder","Inactive","CreatedDate","CreatedByUid",
"ModifiedDate","ModifiedByUid","StateUid"};

 *public* String getDistrictId() {

*return* districtId;

}

*public* *void* setDistrictId(String districtId) {

*this*.districtId = districtId;

}

*public* String getStateId() {

*return* stateId;

}

*public* *void* setStateId(String stateId) {

*this*.stateId = stateId;

}

*public* String getDistrictName() {

*return* districtName;

}

*public* *void* setDistrictName(String districtName) {

*this*.districtName = districtName;

}

 &amp;lt; at &amp;gt;Override

*public* String toString() {

*return* districtName;

}

}
*********************************************************************************************************************
Entity.java
*

package
*

savy.exam.entity;

**
*

public
*

*interface* Entity {

*public* String getProjection();

}
*******************************************************************************
CityCategory.java
*

package
*

savy.exam.entity;

**
*

public
*

*class* CityCategory {

String

districtId,cityId,cityName;

  *public* String getDistrictId1() {

*return* districtId;

}

*public* *void* setDistrictId1(String districtId) {

*this*.districtId = districtId;

}

*public* String getCityId1() {

*return* cityId;

}

*public* *void* setCityId1(String cityId) {

*this*.cityId = cityId;

}

*public* String getCityName1() {

*return* cityName;

}

*public* *void* setCityName1(String cityName) {

*this*.cityName = cityName;

}

 &amp;lt; at &amp;gt;Override

*public* String toString() {

*return* cityName;

}

}
*************************************************************************
In main class in oncreate() call this method

*

public
*

*void* populateCategories()

{

 CategoryService categoryservice =

*new* CategoryService(*context*,dbH1.*DB_NAME***);

Log.*i*(

"populatecategories work", "come");

categories = categoryservice.getAllCategories(*null*);

Log.*i*(

"categories value", categories.toString());

Log.*i*(

"store value in categories", "come");

*if* (categories != *null* &amp;amp;&amp;amp; categories.length &amp;gt; 0) {

spState1.setAdapter(*new* ArrayAdapter&amp;lt;Category&amp;gt;(*context*,

android.R.layout.

*simple_dropdown_item_1line*, categories));

 }
write listener event
*

private
*

OnItemSelectedListener stateListener=*new* OnItemSelectedListener()

{

  *public* *void* onItemSelected(AdapterView&amp;lt;?&amp;gt; arg0, View arg1, *int* pos,*
long* arg3) {

 *if*(edName.getText().toString().length()==0)

{

messageDialog();//this is error dialog not nessary just copy else part

}

*else*
* *

{

 *sState* = spState1.getSelectedItem().toString();

 System.

*out*.println("State="

+

spState1.getSelectedItem().toString());

 *if* (categories != *null*) {

*int* position = spState1.getSelectedItemPosition();

pos = position;

*if* (position &amp;lt; categories.length) {

SelectionParams params =

*new* SelectionParams();

params.setTableName(SubCategoryService.

*SUBCATEGORY_TABLE*);

params.setGroupBy(

*null*);

params.setHaving(

*null*);

params.setProjection(SubCategoryService.

*SUBCATEGORY_PROJECTION*);

params.setSelection(

"StateUid=?");

 *sStateUid* = String.*valueOf*(categories[position]

.getCategoryId());

Log.*i*(

"params State Uid", *sStateUid*);

params.setSelectionArgs(

*new* String[] { String

.*valueOf*(

categories[position]

.getCategoryId()) });

SubCategoryService subCategoryService =

*new* SubCategoryService(

spState1.getContext(), dbH1.*DB_NAME***);

subcategories = subCategoryService

.getSubCategoriesByCategory(params);

*if* (subcategories != *null*) {

 spDistrict1.setAdapter(*new* ArrayAdapter&amp;lt;SubCategory&amp;gt;(

spDistrict1.getContext(),

android.R.layout.

*simple_dropdown_item_1line*,

subcategories));

 }

}

}

}

}

 *public* *void* onNothingSelected(AdapterView&amp;lt;?&amp;gt; arg0) {

// *TODO* Auto-generated method stub

 }

};


************************************
for District listener
*

private
*

OnItemSelectedListener districtListener=*new* OnItemSelectedListener()

{

  *public* *void* onItemSelected(AdapterView&amp;lt;?&amp;gt; arg0, View arg1, *int* arg2,

*long* arg3) {

*if*(edName.getText().toString().length()==0)

{

messageDialog();

}

*else*
* *

{

*sDistrict* = spDistrict1.getSelectedItem().toString();

System.

*out*.println("District="+ spDistrict1.getSelectedItem());

*if* (subcategories != *null*)

{

*int* position = spDistrict1.getSelectedItemPosition();

arg2 = position;

*if* (position &amp;lt; subcategories.length)

{

SelectionParams params =

*new* SelectionParams();

 params.setTableName(CityService.

*CITYCATEGORY_TABLE*);

 params.setGroupBy(

*null*);

params.setHaving(

*null*);

params.setProjection(CityService.

*CITYCATEGORY_PROJECTION*);

params.setSelection(

"DistrictUid=?");

params.setSelectionArgs(

*new* String[] { String

.*valueOf*(

subcategories[arg2]

.getDistrictId()) });

 CityService cityService =

*new* CityService(

spDistrict1.getContext(), dbH1.*DB_NAME***);

citycategories = cityService

.getCityByCategory(params);

*if* (citycategories != *null*) {

 spCity1.setAdapter(*new* ArrayAdapter&amp;lt;CityCategory&amp;gt;(

spCity1.getContext(),

android.R.layout.

*simple_dropdown_item_1line*,

citycategories));

 }

}

 }

}

}

 *public* *void* onNothingSelected(AdapterView&amp;lt;?&amp;gt; arg0) {

// *TODO* Auto-generated method stub

 }

};

On Thu, May 24, 2012 at 10:24 AM, TreKing &amp;lt;trekingapp&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>priya abc</dc:creator>
    <dc:date>2012-05-24T06:32:21</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.handhelds.android.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.handhelds.android.devel</link>
  </textinput>
</rdf:RDF>

