Good site for standard cookbook style examples - date pickers, etc.?

by Preston » Fri, 23 Apr 2010 08:02:08 GMT


Sponsored Links
 Right now I'm trying to find out what the most commonly used Android
date picker is. It seems to me that it's probably cumbersome to always
use the DatePicker proper. Just because of the size of it and the fact
that many people for a given date field would want to enter data
manually. So I'm thinking someone out there must have come up with a
pattern where you click on a TextEdit field and it brings up a modal
Activity with a DatePicker, after which it returns that value to the
previous Window. Anyone know of such a thing? Or better yet a site
where noobs such as myself can see examples in cookbook fashion and
work the rest out ourselves.

Thanks,

Preston

--



Other Threads

1. Gessing Android sources built

Hi folks.
I've been looking since a while for a way to add java packages and
classes to android's sdk sources, and get them built in. I always come
up with the following error:

make: execvp: /bin/bash: Argument list too long
build/core/java.mk:103: *** Too many words (13489).  Stop.

Has someone encoutered this before?

It seems also that in the build directory there should be a file,
listing all the libcore directories that should be present. I've tried
to remove some of the directories in dalvik/libcore, and the build
(make sdk) failed after notifying that it cannot find the folder i
deleted. I guess then if i can know that file's path, it may be
possible to add entries referencing java packages i want to add.


I've also posted this on android platform, but no answer yet.

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

2. How to specify frames at runtime for AnimationDarawable?

Hi all 

I have a an activity which has an image view to display animation. and I'm 
reading resources from res/anim which is working absolutely fine.  But what I'm 
trying is to specify the frames at run time instead of hard coding at the 
res/anim/file.xml  any idea. ?

Following works fine. 

   public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.main);
        mImageView = (ImageView)this.findViewById(R.id.AdImageView);
        mImageView.setImageResource(R.anim.adlist);
        adDisplay = (AnimationDrawable)mImageView.getDrawable();
              }

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        if(hasFocus== true){
            adDisplay.start();
         }
    

and the  adlist.xml is :

<?xml version="1.0" encoding="UTF-8"?>

    <item android:drawable="@drawable/ad_01" android:duration="500" />
    <item android:drawable="@drawable/ad_02" android:duration="500" />
</animation-list>


But what I wan't is I wan't to create the AnimationDrawable object at runtime 
not from the xml source,as my requirement is no of frames and *.png files may 
change at the runtime. 


I tried the following it I'm unable to get the expected result.

@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mImageView = (ImageView)this.findViewById(R.id.AdImageView);
        adDisplay = new AnimationDrawable();
        
adDisplay.addFrame(Drawable.createFromPath("/data/data/com.example.ad/files/ad_01.png"),500
 );
        
adDisplay.addFrame(Drawable.createFromPath("/data/data/com.example.ad/files/ad_02.png"),500
 );
        mImageView.setImageDrawable(adDisplay);
     
              }



Any thing I'm missing in the implementation ?


      Own a website.Get an unlimited package.Pay next to nothing.*Go to 
http://in.business.yahoo.com/
--~--~---------~--~----~------------~-------~--~----~

3. Run Android on..

4. Porting C project in android

5. Is there a fast way to check intersections of Path?

6. Marquee

7. npapi plugin failed to load in android webview