When I run the program works just scroll (4), while others do not work at all of them have shared a long text!!!
If you see all the text of a common format but with different Id.
Please note that all text is a long text that is fed from Java code.
here is my current layout..
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/tabbackground" >
<ScrollView
android:id="#+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="#+id/ScrollView02"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="#+id/ScrollView03"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="#+id/ScrollView04"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
tools:context=".Fri"
android:background="#fff"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:textSize="16sp"
android:textColor="#000"
android:fadeScrollbars="true"
android:scrollbars="vertical"
android:layout_margin="10dp"
android:textAlignment="viewStart"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/mon">
</TextView>
</LinearLayout>
</ScrollView>
</FrameLayout>
Related
I am unable to remove the space at the end of my dialog, I have looked if I was adding some padding at the end, but I am before did not have that problem, but then I added an element that began to occur.
Print
This is the xml I'm using for my view
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="23dp"
android:background="#5454C3">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="15dp"
android:paddingBottom="5dp"
android:background="#FF33CC">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp" >
<br.lgfelicio.elementos.TextViewChanged
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#9B9B9B"
android:textSize="12sp"
android:text="DESTINO" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:id="#+id/editTextFiltroRegiao">
<Spinner
android:id="#+id/spnEstadoFretes"
android:layout_width="fill_parent"
android:layout_marginTop="-14dp"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#C0C1C0"
android:layout_marginTop="-15dp"
android:layout_marginLeft="7dp"
android:visibility="visible"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="15dp"
android:paddingBottom="5dp"
android:background="#00FF00">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp" >
<br.lgfelicio.elementos.TextViewChanged
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#9B9B9B"
android:textSize="12sp"
android:text="COMPLEMENTO" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:id="#+id/editTextFiltroComplemento">
<Spinner
android:id="#+id/spnComplemento"
android:layout_width="fill_parent"
android:layout_marginTop="-14dp"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#C0C1C0"
android:layout_marginTop="-15dp"
android:layout_marginLeft="7dp"
android:visibility="visible"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="15dp"
android:paddingBottom="5dp"
android:background="#FF0000">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp" >
<br.lgfelicio.elementos.TextViewChanged
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#9B9B9B"
android:textSize="12sp"
android:text="PREÇO" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:id="#+id/editTextFiltroPreco">
<Spinner
android:id="#+id/spnPreco"
android:layout_marginTop="-14dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#C0C1C0"
android:layout_marginTop="-15dp"
android:layout_marginLeft="7dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:paddingTop="10dp"
android:layout_marginLeft="7dp"
android:background="#000000">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<br.lgfelicio.elementos.TextViewChanged
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/progresTexto"
android:textColor="#9B9B9B"
android:textSize="12sp"
android:text="RAIO" />
</LinearLayout>
<SeekBar
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:id="#+id/raioSeekBar"/>
</LinearLayout>
</LinearLayout>
Thank you
I am using an Activity having theme dialog. In that Activity's layout I have a WebView and I am loading an Image into it. But image is exceeding the height not fit properly. But I want to fit the image's height as WebView's height. I am sharing my code snippet and please tell me how can I overcome this problem.
Code snippet of Activity
myWebView.setBackgroundColor(0 * 00000000);
myWebView.getSettings().setLoadWithOverviewMode(true);
myWebView.getSettings().setUseWideViewPort(true);
myWebView.getSettings().setDisplayZoomControls(false);
myWebView.getSettings().setLoadsImagesAutomatically(true);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.getSettings().setBuiltInZoomControls(true);
myWebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
myWebView.loadUrl(image1);
myWebView.refreshDrawableState();
I am giving full Xml layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#CC000000"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.56" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#000"
android:textSize="16sp"
android:textStyle="normal" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight=".27"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1.8"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="50sp"
android:layout_height="50sp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginBottom="2sp"
android:layout_marginLeft="3sp"
android:background="#drawable/load" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="#+id/imageView1"
android:text="UserName"
android:textColor="#fff"
android:textSize="15sp" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView2"
android:layout_alignParentRight="true"
android:layout_marginRight="10sp"
android:text="Time"
android:textColor="#fff"
android:textSize="10sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rel_lay"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight=".55"
android:background="#drawable/load"
android:orientation="vertical" >
<WebView
android:id="#+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/load"
android:fadingEdge="none"
android:overScrollMode="never"
android:scrollbars="none" />
<SurfaceView
android:id="#+id/surfaceview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<RelativeLayout
android:id="#+id/scroll"
android:layout_width="fill_parent"
android:layout_height="50sp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:alpha=".9"
android:visibility="gone" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50sp"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#dedcdc" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.7" >
<Button
android:id="#+id/btn_start"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginRight="5sp"
android:background="#drawable/play_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.8"
android:gravity="right" >
<TextView
android:id="#+id/txt_start_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="00.00"
android:textColor="#000"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.2" >
<SeekBar
android:id="#+id/songProgressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="10dip"
android:progressDrawable="#drawable/red_scrubber_progress"
android:thumb="#drawable/red_scrubber_control" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.8" >
<TextView
android:id="#+id/txt_end_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="00.00"
android:textColor="#000"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1.6"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:fadingEdge="none"
android:fillViewport="true"
android:overScrollMode="never" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.creepster.LinkEnabledTextView
android:id="#+id/text_caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:paddingLeft="10sp"
android:paddingRight="10sp"
android:paddingTop="8sp"
android:text=""
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="normal" />
</RelativeLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1.51"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal" >
<Button
android:id="#+id/btn_home"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/home_black_bg"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal" >
<Button
android:id="#+id/btn_search"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/search"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal" >
<Button
android:id="#+id/btn_scroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/srcollimage"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal" >
<Button
android:id="#+id/btn_love"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/activity"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal" >
<Button
android:id="#+id/btn_me"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/me"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
I am doing android app. The main activity is a listview. The xml file of the main activity is as following.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="fill_horizontal"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TabHost
android:id="#android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</TabWidget>
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="#+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="#+id/TableRow01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:gravity="fill"
android:visibility="gone">
<Button
android:id="#+id/Button01"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="#drawable/ic_action_search"
android:onClick="search" />
<EditText
android:id="#+id/EditText01"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="fill_horizontal"
android:ems="10"
android:hint="Employer?date?program?"
/>
</TableRow>
</TableLayout>
<ListView
android:id="#+id/taboneviewlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</ListView>
</LinearLayout>
</TabHost>
When we click each item in the list view, data_activity appears. The xml file of the each item (data_activity) in the list view is as following.
<TableLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/TableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/employer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:textSize="24sp"
android:textStyle="normal|bold" />
<View
android:id="#+id/employer_line"
android:layout_height="4sp"
android:layout_width="fill_parent"
android:background="#FF909090"
android:visibility="gone"/>
<!-- Table: Date -->
<TableRow
android:id="#+id/tableRow2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp">
<TextView
android:id="#+id/date_title"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:gravity="left"
android:text="Time"
android:textSize="20sp"
android:textStyle="normal|bold" />
<TextView
android:id="#+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="right"
android:textColor="#999999"
android:textSize="20sp" />
</TableRow> </TableLayout>
Now the data_activity can not display all the information. The question is how to make the data_activity scroll? Are there any example codes?
Put your top-level view into a ScrollView:
<ScrollView xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TableLayout
android:id="#+id/TableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
...
</TableLayout>
</ScrollView>
I have a ScrollView in that I have a ViewPager with a PagerSlidingTabStrip. In the ViewPager I have a xml file which contains some TextViews with long texts in it. The problem is that the scrollview don't scroll to the end where the last TextViews are of the second xml file are.
First xml with viewPager:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/recipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="5.80" >
<LinearLayout
android:id="#+id/recipe_linearLayout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:background="#android:color/background_light"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_marginTop="5dp"
android:layout_weight="18"
android:orientation="vertical" >
<com.astuetz.PagerSlidingTabStrip
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dip"
android:background="#drawable/background_tabs" >
</com.astuetz.PagerSlidingTabStrip>
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
</android.support.v4.view.ViewPager>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Second xml file with the TextViews:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/tools"
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="5.80" >
<LinearLayout
android:id="#+id/recipe_linearLayout_desc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:background="#android:color/background_light"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#color/red"
android:gravity="center"
android:text="INGREDIENTS"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/white" />
<LinearLayout
android:id="#+id/ingLinearLayout"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView1"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="#color/white"
android:orientation="vertical" >
<TextView
android:id="#+id/ingTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="0.11"
android:maxLines="20"
android:singleLine="false"
android:text="#string/verylongtext"
android:textColor="#color/black" />
</LinearLayout>
<TextView
android:id="#+id/TextView01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/ingLinearLayout"
android:background="#color/red"
android:gravity="center"
android:text="DESCRIPTION"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/white" />
<LinearLayout
android:id="#+id/descLinearLayout"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_below="#+id/TextView01"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="#color/white"
android:orientation="vertical" >
<TextView
android:id="#+id/descTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="0.11"
android:maxLines="20"
android:singleLine="false"
android:text="#string/verylongtext"
android:textColor="#color/black" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
This is how it looks when I scroll to the bottom:
And this is how it should look:
I can not find out why it cuts the view and why is it not possible to scroll down until the whole second xml file is displayed?
I am using this ViewPager lib: github.com/astuetz/ViewPagerExtensions
I would like to resize my dialogbox so for every dialog box i will have to size the full screnn size and the second use fill_parent for the size. my dilag is defined by the layout given by the code below.
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/dialog_back"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="horizontal" >
<TextView
android:id="#+id/parcourstextV0"
style="#style/presentation_title"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical|left"
android:text="Parcours antérieur"
android:textColor="#color/black02"
android:textStyle="bold"
android:typeface="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="9"
android:orientation="horizontal" >
<Button
android:id="#+id/parcoursClose"
android:layout_width="40dip"
android:layout_height="40dip"
android:background="#drawable/roundedbutton"
android:text="x"
android:textColor="#color/white"
android:textSize="25dip"
android:textStyle="bold"
android:gravity="center_vertical|center"
android:typeface="normal"
android:layout_alignParentRight="true"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal" >
<ListView
android:id="#+id/listparcours"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:listSelector="#android:color/transparent" />
</LinearLayout>
</LinearLayout>
can you help me please.
// try this
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/dialog_back"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal" >
<TextView
android:id="#+id/parcourstextV0"
style="#style/presentation_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|left"
android:text="Parcours antérieur"
android:textColor="#color/black02"
android:textStyle="bold"
android:typeface="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="#+id/parcoursClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/roundedbutton"
android:text="x"
android:textSize="25dip"
android:textStyle="bold"
android:gravity="center"
android:typeface="normal"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ListView
android:id="#+id/listparcours"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:listSelector="#android:color/transparent" />
</LinearLayout>
</LinearLayout>