I want to create scrollview with the code,
I have created scrollview and linearlayout, but doesn't scroll to bottom,
What should I do for able to scrolling
you can find the screenshot following link http://screencast.com/t/bbDcDWoScPyM
Here is Activity xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/rlt"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
tools:context="com.test.test.test">
</RelativeLayout>
and here is the java code
RelativeLayout lL = (RelativeLayout) findViewById(R.id.rlt);
ScrollView sv= new ScrollView(this);//(ScrollView) findViewById(R.id.svScroll);
LinearLayout sahne = new LinearLayout(this);
sahne.setOrientation(LinearLayout.VERTICAL);
txt1.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
txt2.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
txt3.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
txt4.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
txt5.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
txt6.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
txt7.setLayoutParams(new LinearLayout.LayoutParams(textRequireWidth,textRequireHeight));
sahne.addView(txt1);
sahne.addView(txt2);
sahne.addView(txt3);
sahne.addView(txt4);
sahne.addView(txt5);
sahne.addView(txt6);
sahne.addView(txt7);
sahne.addView(btn1);
sv.addView(sahne);
lL.addView(sv);
ScrollViewandLinearLayout?