Date format in agenda view of calendar app.

by Mike Dent » Tue, 28 Apr 2009 00:38:40 GMT


Sponsored Links
 Has anybody else noticed that the date format does not change
correctly in agenda view based on phone location?
It shows the dates as 04/27/2009 here in the UK. It should show 27/04/2009

Mike

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



Date format in agenda view of calendar app.

by EboMike » Tue, 28 Apr 2009 11:24:53 GMT


 I remember seeing a bug in the tracker for that somewhere.
I actually thought about fixing that myself (since I got flak when my
app didn't do that at first), but I didn't want to change it while
Cupcake is to be released... I'm not quite knowledgeable enough about
which branches there currently are, and whether or not the issue has
already been fixed in one of them.

-Mike




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


Sponsored Links


Other Threads

1. ListView onListItemClick

Hi,
I am creating an application which parses an XML from the web and
displays the items of a <title>tag in another ListView. Basically i
want to know an effecient way of using ListView all throughout the
application.

Ex:
Part
1
Part 2                                                Part 3
My Bookshelf -----Click----->Opens another ListView ---->Book 1-------
Options
Book 2
Help
Exit

I am able to go from part 1 to part 2. but not from part 2 to part3. I
might be doing some mistake in part 1 to part 2 itself.

Please advise. I am very confused and stuck.

My code:

package com.vijay.MogoMenu;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;


public class MogoMenu extends ListActivity      {


        ArrayList linksArray = new ArrayList();
        ArrayList itemsArray = new ArrayList();



        /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setListAdapter(new ArrayAdapter<String>
(this,android.R.layout.simple_list_item_1, MENU_NAMES));
    }

    private static final String[] MENU_NAMES = new String[] {
        "My Bookshelf",
        "On the Go",
        "Options",
        "Help",
    };

    public void onItemClick(AdapterView parent, View v, int position,
long id) {
        // Pre-load the image then start the animation
        System.out.println("On Item Click" +position);
        if(position == 0)
        {
                DownloadRSS("http://xmlgwdev.lotusbookworks.com/?
acctid=0bfHgPce7k:Hiw6hsB4fx&listID=1");
        }
        else if(position == 3)
        {
                setContentView(R.layout.help);
        }


    }

    public void onClick(View v) {
        System.out.println("On View Click");
    }

    public InputStream OpenHttpConnection(String urlString) throws
IOException
    {
        InputStream in = null;
        int response = -1;

        URL url = new URL(urlString);
        URLConnection conn = url.openConnection();
        System.out.println("Opening Connection");
        if (!(conn instanceof HttpURLConnection))
            throw new IOException("Not an HTTP connection");

        try
        {
                System.out.println("Obtaining CONNECTION");
            HttpURLConnection httpConn = (HttpURLConnection) conn;
            httpConn.setAllowUserInteraction(false);
            httpConn.setInstanceFollowRedirects(true);
            httpConn.setRequestMethod("GET");
            System.out.println("Connecting");
            httpConn.connect();

            response = httpConn.getResponseCode();
            if (response == HttpURLConnection.HTTP_OK)
            {
                System.out.println("SUPER CONNECTION");
                in = httpConn.getInputStream();
                System.out.println("Bitmap puttin into IMG1");
            }
        }
        catch (Exception ex)
        {
            throw new IOException("Error connecting");
        }
        return in;
    }


    /*Download XML RSS feed*/
        @SuppressWarnings("unchecked")
        private void DownloadRSS(String URL)
    {
        InputStream in = null;
        try {
            in = OpenHttpConnection(URL);
            Document doc = null;
            DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
            DocumentBuilder db;

            try {
                db = dbf.newDocumentBuilder();
                doc = db.parse(in);
            } catch (ParserConfigurationException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (SAXException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            doc.getDocumentElement().normalize();
            itemsArray.clear();
            linksArray.clear();


            String strTitle = null;
            String strLink = null;

            NodeList itemNodesList = doc.getElementsByTagName("a");

            for (int i = 0; i < itemNodesList.getLength(); i++) {
                Node itemNode = itemNodesList.item(i);
                if (itemNode.getNodeType() == Node.ELEMENT_NODE)
                {
                    //---convert the Node into an Element---
                    Element itemElement = (Element) itemNode;

                    //---get all the TITLES element under the
                    NodeList titleNodes =
                        (itemElement).getElementsByTagName("a");

                    Element titleElement = (Element) titleNodes.item
(0);

                    //---get all the child nodes under the <title>
element---
                    NodeList textitemNodes =
                        ((Node) titleElement).getChildNodes();

                    //---retrieve the text of the <title> element---
                    strTitle = ((Node) textitemNodes.item
(0)).getNodeValue();
                    itemsArray.add(strTitle);
                    System.out.println("ITEM : "+strTitle);
                }
            }

            for (int i = 0; i < itemNodesList.getLength(); i++) {
                        strLink = ((Element) itemNodesList.item(i)).getAttribute
("href");
                    linksArray.add(strTitle);
                    System.out.println("URL LINK: "+strLink);
           }


            in.close();
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        setListAdapter(new ArrayAdapter
(this,android.R.layout.simple_list_item_1,itemsArray));
    }


}


Thanks,
Vijay.C
--~--~---------~--~----~------------~-------~--~----~

2. Resistance touchscreen.

Hi all,

I have a resistance touchscreen panel and use arm11 chip.

Now we use hard-code to make raw date can transform to correct point
for Linux system.
But, I think this is not good idea for each devices.

Could any body know how to do calibration at Android? and can detailed
describe it. Thank you very much.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Is animated gif (agif) supported in Android Image View

4. google gadgets in Android application

5. Start up

6. Access Linux shell command from within the Android SDK

7. How to stop broadcasting an intent (automatic sms without notification)