[android-developers] Simple example for drag and drop a sprite

2012-10-09 Thread kalandar
take a look,

http://kalandars-cocos2d-android.blogspot.in/2012/10/drag-and-drop-sprite.html

-- 
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] Creating multiselect ListView in android

2012-08-10 Thread kalandar
Hi guys this my code for creating multiselect list view in android , check 
out this , this may helpful for some situation. 

*
http://kalandarandroid.blogspot.in/2012/08/creating-multiselect-listview-in-android.html
*http://kalandarandroid.blogspot.in/2012/08/creating-multiselect-listview-in-android.html

-- 
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] Solution for Find the android device is mobile or tablet

2012-07-30 Thread kalandar
Dear friends , I got a solution to find the android device is mobile or 
tablet in programetically, 
i just  want to share this with all of you 

Find device is mobile or 
tablethttp://kalandarandroid.blogspot.in/2012/07/find-device-is-mobile-or-tablet.html

-- 
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: ListView with Simple adapter

2012-05-24 Thread kalandar

 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

-- 
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: documentBuilder.parse fails under android 4.0.3

2012-03-18 Thread kalandar


 DocumentBuilderFactory factory = 
 DocumentBuilderFactory.newInstance();

 DocumentBuilder builder = factory.newDocumentBuilder();

 Document doc = builder.parse(new File(fileName));

 doc.getDocumentElement().normalize();


try this and use NodeList to extract data.
this will works fine in android... 

-- 
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: hello for all

2012-03-18 Thread kalandar
android 4.0 is supporting arabic...
try 4.0 devices

-- 
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: webview problem

2012-03-13 Thread kalandar
You can use android WebView widget to load html
like this,

*WebViewObject.loadData(html string content);*

i hope this will help you...

-- 
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] Creating multiselect ListView in android

2012-03-02 Thread kalandar
Dear friends,
This is the example code for creating multiselect listview. I have searched 
over all internet but i didn't get good one. Now i have made this code it 
is working pretty fine. I just want to share this code with all who is 
interested  to know something new.

*visit this link for code*

*Creating multiselect ListView in 
android*http://kalandarandroid.blogspot.in/2012/03/creating-multiselect-listview-in.html

-- 
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-27 Thread kalandar
hi..
Ok now i understood you have only one xml file. and this file contains
some sub category values. first you are collect the main category
values and
display that values in listview.
when the user clicks the list item this will open another activity
and has to show the sub category values of that particular clicked
list value.

i think this is your need..
i have the solution for this...

public class XMLSourseLoader {

Document doc;
public HashMapObject,Object main = new HashMapObject, Object();
public XMLSourseLoader(String filename)
{
     try {
         File fXmlFile = new File(filename);
         DocumentBuilderFactory dbFactory =
DocumentBuilderFactory.newInstance();
         DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
         doc = dBuilder.parse(fXmlFile);
         doc.getDocumentElement().normalize();
          NodeList nList = doc.getElementsByTagName(maincatagory);
          System.out.println(nList.getLength());

          for(int i=0;inList.getLength();i++)
          {
        Element e1 = (Element)nList.item(i);
        System.out.println(getTagValue(title, e1));

        NodeList node1 = 
e1.getElementsByTagName(subcatagory);

//this is the sub category map
        HashMapObject,Object catagory = new 
HashMapObject,
Object();

        for(int j=0;jnode1.getLength();j++)
        {
        Element e2 = (Element)node1.item(j);
        System.out.println(
+getTagValue(subtitle, e2));

        catagory.put(getTagValue(subtitle, 
e2), books);
        }
        main.put(getTagValue(title, e1), catagory);
          }
     }
     catch(Exception e)
     {
     System.out.println(e.toString());
     }

  }

public HashMapObject,Object getMainMap()
{
return(main);
}

public String getTagValue(String sTag, Element eElement){
    NodeList nlList=
eElement.getElementsByTagName(sTag).item(0).getChildNodes();
    Node nValue = nlList.item(0);
    return nValue.getNodeValue();
 }

}

the model xml file is

main
maincatagory
title/title
subcatagory
subtitle/subtitle

/subcatagory
subcatagory
subtitle/subtitle

/subcatagory

/maincatagory

/main

i just store the HashMap object inside the HashMap.
it is pretty easy. i hope this will help you...
if you have any clarification let me know
let me know this helps you or not.

have a happy coding

On Feb 27, 12:20 pm, hazem omies hazem.om...@gmail.com wrote:
 Many thanks kalandar ,

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

 music
     item
         id.../id
         title./title
         Description.. /Description
  a1. /a1
 duration../duration
 duration2/duration2
 thumb_url../thumb_url
         shortcodeZ/shortcodeZ
 commandZ/commandZ

 /music

 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 kasimk...@gmail.com 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 hazem.om...@gmail.com 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

[android-developers] Re: Two listview

2012-02-26 Thread kalandar
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 hazem.om...@gmail.com 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);

                 ArrayListHashMapString, String songsList = new
 ArrayListHashMapString, String();

                 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 song
                 for (int i = 0; i  nl.getLength(); i++) {
                         // creating new HashMap
                         HashMapString, String map = new HashMapString, 
 String();
                         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

[android-developers] Re: Run application in background

2012-02-26 Thread kalandar
hi...
It is very simple. you can go with android service.
i hope the below link will help you.

http://developer.android.com/reference/android/app/Service.html

have a happy coding

regards
kalandar.

On Feb 27, 10:11 am, Juned Khan jkhan6...@gmail.com wrote:
 hii all developers,
                            how do i keep my application running on
 background until it manually closed or exited by the user.

-- 
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: intent Value

2012-02-26 Thread kalandar
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 hazem.om...@gmail.com 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


[android-developers] Re: Two listview

2012-02-23 Thread kalandar
hi
It is very easy. you can use java collection classes.
I think HashMap will help you to do this work.
If you explain your process clearly then i can say the solution



On Feb 23, 7:20 pm, hazem omies hazem.om...@gmail.com wrote:
 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] Webview inner link problem

2012-02-23 Thread kalandar
hi friends,

android webview can trigger the event
shouldOverrideUrlLoading when we click the external url (like
http://www.google.com).
but the problem was with inner link. this event does not trigger when
we click the inner link. but i want to fire some process when click
the inner link. if anybody have the solution please let me know...

thank you.

-- 
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: Application in memory card

2011-11-04 Thread kalandar
Thank you mark

On Nov 2, 5:21 pm, Mark Murphy mmur...@commonsware.com wrote:
 http://developer.android.com/guide/appendix/install-location.html









 On Wed, Nov 2, 2011 at 8:11 AM, kalandar kasimk...@gmail.com wrote:
  hi friends,
       Is there a way to install app in android external memory?
       or all application will only install in internal memory?
       please give me some idea about it...

  regards,
  kalandar

  --
  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

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 4.0 Available!

-- 
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] Application in memory card

2011-11-02 Thread kalandar
hi friends,
  Is there a way to install app in android external memory?
  or all application will only install in internal memory?
  please give me some idea about it...

regards,
kalandar

-- 
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: how to view a pdf file?

2011-10-26 Thread kalandar
No,my need is i have to display pdf in my own application..
what should i do.. it is possible?..
let me know the way please

On Oct 24, 12:19 pm, Sunil Mishra suniljmis...@gmail.com wrote:
 Hi,

 If u have any application installed for viewing pdf file then you can
 use its intent to view the pdf in your application.

 For more reference 
 :http://stackoverflow.com/questions/3831019/how-to-read-a-pdf-in-android

 On Oct 24, 12:02 pm, kalandar kasimk...@gmail.com wrote:







  dear friends,
              I need to view a pdf file in my application. Is any widget
  there for showing pdf in android.
  Or if any other way to do this... please let me know that...

  Regards
  Kalandar . N

-- 
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] how to view a pdf file?

2011-10-24 Thread kalandar
dear friends,
I need to view a pdf file in my application. Is any widget
there for showing pdf in android.
Or if any other way to do this... please let me know that...


Regards
Kalandar . N

-- 
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] Android cocos2d game development

2011-10-14 Thread kalandar
Hi friends ,
I want to develop game with cocos2d...
But i don't know how to start with it..  I am fresher for android.
please help me to make it easy
I need to know how to install cocos2d.
any easy guide to start program..

Thanks in Advance.

Regards
Kalandar . N.

-- 
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