[android-developers] Force update

2012-03-13 Thread hazem omies
how to make force update for application when its start ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Xml parsing issue

2012-03-11 Thread hazem omies
i implement xml parsing from http Request ,,i have a problem with
parsing this structure xml as follow:




1
   2
 .
 .
 .
 .
 .
 .





   1
   2
   .
   .
   .
   5
   .
   .
.


how i can do this structure ,,Note that i using dom parser as
follow:

 XMLParser parser = new XMLParser();
InputStream is= parser.getStream(URL);
Document doc = parser.getDomElement(is);


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: intent Value

2012-02-27 Thread hazem omies
hi ,,,

Note,,the value has been passed successfully ,,,but without listview !!!



On Mon, Feb 27, 2012 at 10:39 AM, hazem omies  wrote:

> thanks ,,
>
> but i put this map like *intent.putExtras("mapidentifier",map); ,,, how i
> can put this mapping as listview in second activity  *
>
>
> On Mon, Feb 27, 2012 at 9:19 AM, kalandar  wrote:
>
>> hi,
>>
>> if you want to pass the same HashMap value for two activity means
>> you can create the HashMap object in common static object.
>> like
>>
>> class Common
>> {
>> public static HashMap map = new HashMap();
>> }
>>
>> now you can use this map in your entire activity.
>> like Common.map.put("", "");
>>
>> otherwise you can pass the map object to
>>
>> intent.putExtras("mapidentifier",map);
>>
>> i hope this will help you...
>>
>>
>> On Feb 26, 1:15 pm, hazem omies  wrote:
>> > hi,
>> > how to passing intent value from listview activity that using HashMap
>> > to another listview  as follow :
>> >
>> > the main activity contain listview getting value from xml using
>> > HashMap ,,i need to passing this value to another arraylist  to be
>> > view in listview how i can do this ,
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: intent Value

2012-02-27 Thread hazem omies
thanks ,,

but i put this map like *intent.putExtras("mapidentifier",map); ,,, how i
can put this mapping as listview in second activity  *

On Mon, Feb 27, 2012 at 9:19 AM, kalandar  wrote:

> hi,
>
> if you want to pass the same HashMap value for two activity means
> you can create the HashMap object in common static object.
> like
>
> class Common
> {
> public static HashMap map = new HashMap();
> }
>
> now you can use this map in your entire activity.
> like Common.map.put("", "");
>
> otherwise you can pass the map object to
>
> intent.putExtras("mapidentifier",map);
>
> i hope this will help you...
>
>
> On Feb 26, 1:15 pm, hazem omies  wrote:
> > hi,
> > how to passing intent value from listview activity that using HashMap
> > to another listview  as follow :
> >
> > the main activity contain listview getting value from xml using
> > HashMap ,,i need to passing this value to another arraylist  to be
> > view in listview how i can do this ,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Two listview

2012-02-26 Thread hazem omies
Many thanks kalandar ,

yes , as you mentioned at first the,,, second listview in another
activity  that related to first see my xml :



...
.
.. 
 . 
..

..







that when click in item in the first listview the go to aother listview
,,,how i can make this listview ?

thanks,,,







On Mon, Feb 27, 2012 at 8:45 AM, kalandar  wrote:

> hi hazim omies.
>  I understood your code. But still i didn't understand what is
> your need.
> If you want to pass the clicked HashMap  value to another activity
> means you can use this code
>
>  Intent in = new Intent(getApplicationContext(),
> SingleMenuItemActivity.class);
>   in.putExtra("mapvalue", map );
>
> map is the object name of your HashMap.
>
> or else you want to create another listview in the same activity means
> let me know the xml values.
> better explain your need clearly...
>
> regards
> kalandar
>
> On Feb 25, 6:09 am, hazem omies  wrote:
> > hi kalandar ,
> >
> > i make the first listview using HashMap but i cant make the seconed
> > list because i need to pass value from one list to another related to
> > one ,,,plz see my code below
> > package test.packag;
> >
> > import java.io.InputStream;
> > import java.util.ArrayList;
> > import java.util.HashMap;
> >
> > import org.w3c.dom.Document;
> > import org.w3c.dom.Element;
> > import org.w3c.dom.NodeList;
> >
> > import aljamal.packag.R;
> > import aljamal.packag.XMLParser;
> > import android.app.Activity;
> > import android.content.Intent;
> > import android.os.Bundle;
> > import android.view.View;
> > import android.widget.AdapterView;
> > import android.widget.TextView;
> > import android.widget.AdapterView.OnItemClickListener;
> > import android.widget.ListView;
> >
> > public class test extends Activity {
> > // All static variables
> > static final String URL = "http://192.168.0.197/test.xml";;
> > // XML node keys
> > static final String KEY_SONG = "song"; // parent node
> > static final String KEY_ID = "id";
> > static final String KEY_TITLE = "title";
> > static final String KEY_ARTIST = "artist";
> > static final String KEY_DURATION = "duration";
> > static final String KEY_DURATION2 = "duration2";
> > static final String KEY_A1 = "a1";
> > static final String KEY_THUMB_URL = "thumb_url";
> > static final String KEY_SCZ = "shortcodeZ";
> > static final String KEY_CMZ = "commandZ";
> >
> > ListView list;
> > LazyAdapter adapter;
> >
> > @Override
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> > setContentView(R.layout.main2);
> >
> > ArrayList> songsList = new
> > ArrayList>();
> >
> > XMLParser parser = new XMLParser();
> > InputStream is= parser.getStream(URL); // getting XML
> > Document doc = parser.getDomElement(is); // getting DOM
> element
> >
> > NodeList nl = doc.getElementsByTagName(KEY_SONG);
> > // looping through all song nodes 
> > for (int i = 0; i < nl.getLength(); i++) {
> > // creating new HashMap
> > HashMap map = new
> HashMap();
> > Element e = (Element) nl.item(i);
> > // adding each child node to HashMap key => value
> > map.put(KEY_ID, parser.getValue(e, KEY_ID));
> > map.put(KEY_TITLE, parser.getValue(e,
> KEY_TITLE));
> > map.put(KEY_ARTIST, parser.getValue(e,
> KEY_ARTIST));
> > map.put(KEY_DURATION, parser.getValue(e,
> KEY_DURATION));
> > map.put(KEY_DURATION2, parser.getValue(e,
> KEY_DURATION2));
> > map.put(KEY_THUMB_URL, parser.getValue(e,
> KEY_THUMB_URL));
> > map.put(KEY_SCZ, parser.getValue(e, KEY_SCZ));
> > map.put(KEY_CMZ, parser.getValue(e, KEY_CMZ));
> > map.put(KEY_A1, parser.getValue(e, KEY_A1));
> >
> > // adding HashList to ArrayList
> >

Re: [android-developers] nested listview

2012-02-26 Thread hazem omies
hi Ted ,

many thanks Ted , but i need when open item passing value to other intent
listview ,,this is doable ??

On Sun, Feb 26, 2012 at 5:10 PM, Ted Scott  wrote:

> Sounds like you want an ExpandableListView http://developer.android.com/**
> reference/android/widget/**ExpandableListView.html<http://developer.android.com/reference/android/widget/ExpandableListView.html>
>
>
> On 2/26/2012 9:25 AM, hazem omies wrote:
>
>> hi,,,
>>
>> how i can make nested listview as follow :
>>
>> main activity contain a listview binding from web servers XML
>> parser  ,,my issue is when click on item ,,the seconed listview open
>> related to this item as nested ,,??
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+**unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] nested listview

2012-02-26 Thread hazem omies
hi,,,

how i can make nested listview as follow :

main activity contain a listview binding from web servers XML
parser  ,,my issue is when click on item ,,the seconed listview open
related to this item as nested ,,??

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] intent Value

2012-02-26 Thread hazem omies
hi,
how to passing intent value from listview activity that using HashMap
to another listview  as follow :

the main activity contain listview getting value from xml using
HashMap ,,i need to passing this value to another arraylist  to be
view in listview how i can do this ,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Sql Server 2008 with android

2012-02-24 Thread hazem omies
hi ,

how to implement android application that read database from Sql
server 2008

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Two listview

2012-02-24 Thread hazem omies
hi kalandar ,

i make the first listview using HashMap but i cant make the seconed
list because i need to pass value from one list to another related to
one ,,,plz see my code below
package test.packag;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

import aljamal.packag.R;
import aljamal.packag.XMLParser;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

public class test extends Activity {
// All static variables
static final String URL = "http://192.168.0.197/test.xml";;
// XML node keys
static final String KEY_SONG = "song"; // parent node
static final String KEY_ID = "id";
static final String KEY_TITLE = "title";
static final String KEY_ARTIST = "artist";
static final String KEY_DURATION = "duration";
static final String KEY_DURATION2 = "duration2";
static final String KEY_A1 = "a1";
static final String KEY_THUMB_URL = "thumb_url";
static final String KEY_SCZ = "shortcodeZ";
static final String KEY_CMZ = "commandZ";


ListView list;
LazyAdapter adapter;

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


ArrayList> songsList = new
ArrayList>();

XMLParser parser = new XMLParser();
InputStream is= parser.getStream(URL); // getting XML
Document doc = parser.getDomElement(is); // getting DOM element

NodeList nl = doc.getElementsByTagName(KEY_SONG);
// looping through all song nodes 
for (int i = 0; i < nl.getLength(); i++) {
// creating new HashMap
HashMap map = new HashMap();
Element e = (Element) nl.item(i);
// adding each child node to HashMap key => value
map.put(KEY_ID, parser.getValue(e, KEY_ID));
map.put(KEY_TITLE, parser.getValue(e, KEY_TITLE));
map.put(KEY_ARTIST, parser.getValue(e, KEY_ARTIST));
map.put(KEY_DURATION, parser.getValue(e, KEY_DURATION));
map.put(KEY_DURATION2, parser.getValue(e, 
KEY_DURATION2));
map.put(KEY_THUMB_URL, parser.getValue(e, 
KEY_THUMB_URL));
map.put(KEY_SCZ, parser.getValue(e, KEY_SCZ));
map.put(KEY_CMZ, parser.getValue(e, KEY_CMZ));
map.put(KEY_A1, parser.getValue(e, KEY_A1));

// adding HashList to ArrayList
songsList.add(map);
}


list=(ListView)findViewById(R.id.list);

// Getting adapter by passing xml data ArrayList
adapter=new LazyAdapter(this, songsList);
list.setAdapter(adapter);


// Click event for single list row

list.setOnItemClickListener(new OnItemClickListener() {

public void onItemClick(AdapterView parent, View 
view,
int position, long id) {

String title = ((TextView)
view.findViewById(R.id.title)).getText().toString();
String artist =((TextView)
view.findViewById(R.id.artist)).getText().toString();
String duration =((TextView)
view.findViewById(R.id.duration)).getText().toString();
String du2 =((TextView)
view.findViewById(R.id.du2)).getText().toString();
String A1 =((TextView)
view.findViewById(R.id.A1)).getText().toString();
String SCZ =((TextView)
view.findViewById(R.id.SCZ)).getText().toString();
String CMZ =((TextView)
view.findViewById(R.id.CMZ)).getText().toString();

Intent in = new Intent(getApplicationContext(),
SingleMenuItemActivity.class);

in.putExtra("firstVariableToPass", "Passing a 
string");
in.putExtra(KEY_TITLE, title);
in.putExtra(KEY_ARTIST, artist);
in.putExtra(KEY_A1, A1);
in.putExtra(KEY_DURATION, duration);
in.putExtra(KEY_DURATION2, du2);
in.putExtra(KEY_SCZ, SCZ);
in.putExtra(KEY_CMZ, CMZ);

in.putExtra("secondVari

[android-developers] Two listview

2012-02-23 Thread hazem omies
hi.

i have xml file that read remotely from server and put the data in
listview  i need a way that this lisview on click item pass this value
to another related listview  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] image Parsing

2012-02-15 Thread hazem omies
how i can parsing image from xml file into android listview


hazem
 test.png  


Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en