I am displaying text in a textview that appears to be too long to fit
into one screen. I need to make my TextView scrollable. How can i do
that? Here is the code

 final TextView tv = new TextView(this);

        //ScrollView sv;
        //final TextView tv;
        //tv = (TextView)findViewById(R.id.tips);
        //sv.addView(tv);


        tv.setBackgroundResource(R.drawable.splash);
        tv.setTypeface(face);
        tv.setTextSize(18);
        tv.setTextColor(R.color.BROWN);

        tv.setGravity(Gravity.CENTER_VERTICAL|
Gravity.CENTER_HORIZONTAL);

        tv.setOnTouchListener(new OnTouchListener(){


                public boolean onTouch(View v, MotionEvent e)
                {


                        Random r = new Random();
                        int i = r.nextInt(101);

                        if (e.getAction() == e.ACTION_DOWN)
                        {
                                tv.setText(tips[i]);
                                tv.setBackgroundResource(R.drawable.inner);


                        }

                return true;
                }

        });

        setContentView(tv);
    }
}

Thanks.
Maxood

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

Reply via email to