Met Lunch

by Jus » Fri, 19 Feb 2010 13:31:06 GMT


Sponsored Links
 Mari brader makan siang dulu

*iga bakar

-- 
"



Other Threads

1. JUnit and Basic Java.

Hi Everyone,

I am working in Android testing for the past one year(Feature and
Stability testing).I want to extend my skills to using J Unit for
testing.

What would be the best reference to look for(books, tutorials etc..),
any suggestions?

Thanks,
Satish.

2. Java based UI & Scrolling of text

Hi All,

I am trying to create an application with UI totally in Java.

I have a view whose's onDraw function displays a large volume of text.
To add scrolling ability , i have created a new ScrollView and added
the previous view as a child.

The contents are being displayed on the screen , but the scrolling
functionality is not working.

Could anyone please guide me so as to how can i enable vertical n
horizontal scrolling of the text.

Here is the code snippet :-

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.ScrollView;

public class TempScrollView extends Activity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ParentView parentView = new ParentView(this);
        setContentView(parentView);
    }

    private class ChildView extends View{

        public ChildView(Context c)
        {
                super(c);
                this.setLayoutParams(new LayoutParams
(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
        }

        public void onDraw(Canvas c){
                Paint p = new Paint();
                p.setColor(Color.BLUE);
                for(int i=0;i<200;i++){
                        c.drawText("This is a 
string",(float)0.0,(float)(i*10.0),p);
                }
        }
    }

    private class ParentView extends ScrollView{
        public ParentView(Context c)
        {
                super(c);
                childView = new ChildView(c);
                this.setLayoutParams(new LayoutParams
(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
                this.addView(childView);
                this.setFocusable(true);
                this.setFocusableInTouchMode(true);
        }
        public void onDraw(Canvas c)
        {
                childView.onDraw(c);
        }
        private ChildView childView;
    }
}

Any help would be greatly appreciated...

Thanks And Regards

3. How to add a toggle list to a view

4. looking for programer to develop the SMS application in Android cell phone

5. Converting byte array from camera to argb_8888 int array.

6. How to upload HelloAndroid.apk directly to HTC Hero

7. Nested source directories