I have implemented Chronometer to show call duration during Video and Audio call. Chronometer increase by one during the video call, but during the video call, it sometimes increases by one or two.
Start Chronometer after call connected
timeChronometer.setBase(SystemClock.elapsedRealtime());
timeChronometer.start();
Layout
<LinearLayout
android:id="#+id/call_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="16.0dip"
android:paddingTop="23.0dip"
android:paddingRight="16.0dip">
<TextView
android:id="#+id/voip_call_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawableStart="#drawable/calllogo"
android:drawableLeft="#drawable/calllogo"
android:drawablePadding="6dp"
android:text="#string/video_call_label"
android:textColor="#99ffffff"
android:textSize="14.0sp" />
</LinearLayout>
<FrameLayout
android:id="#+id/caller_contact_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:animateLayoutChanges="true"
android:paddingTop="28dip">
<ImageView
android:id="#+id/contact_photo"
android:layout_width="90.0dip"
android:layout_height="90.0dip"
android:layout_gravity="center"
android:src="#drawable/ic_circle_img"
android:scaleType="fitCenter" />
<android.support.v7.widget.AppCompatImageView
android:id="#+id/whatsapp_icon"
android:layout_width="20.0dip"
android:layout_height="20.0dip"
android:layout_gravity="bottom|center|right"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
android:rotation="-10.0"
android:src="#drawable/icon"
android:visibility="gone" />
</FrameLayout>
<LinearLayout
android:id="#+id/name_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="16.0dip"
android:paddingTop="20.0dip"
android:paddingRight="16.0dip">
<TextView
android:id="#+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingBottom="20.0dip"
android:singleLine="true"
android:text="Mukesh Singh"
android:textColor="#android:color/white"
android:textSize="26.0sp" />
</LinearLayout>
<TextView
android:id="#+id/call_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:lineSpacingMultiplier="1.5"
android:paddingLeft="12.0dp"
android:paddingRight="12.0dp"
android:paddingBottom="20.0dp"
android:text="INCOMING"
android:textColor="#99ffffff"
android:textSize="14.0sp" />
</LinearLayout>
<RelativeLayout
android:id="#+id/top_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:visibility="visible">
<ImageButton
android:id="#+id/top_minimize_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_gravity="center"
android:background="#drawable/voip_btn_background"
android:contentDescription="#string/voip_call_goto_chat_description"
android:padding="18.0dip"
android:src="#drawable/call_minimize"
android:visibility="gone" />
<Chronometer
android:id="#+id/timeChronometer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="18.0dp"
android:paddingTop="24.0dp"
android:paddingEnd="18.0dp"
android:textColor="#99ffffff"
android:textSize="14.0sp"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout >
Related
I used 20 spinners and 40 textviews for displaying the name poster. When I edit this xml resource file Android Studio showing popup is Out of memory error
Here is the popup
I incresed the xmx size to 2048.
Eventhogh it showing same error when I open that xml file. here I put the xml code.
<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/adViewContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.85">
<RelativeLayout
android:id="#+id/relNameLayout"
android:layout_width="match_parent"
android:layout_height="fill_parent">
<TextView
android:id="#+id/spinner"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp"
android:layout_marginTop="15dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/spinner"
android:layout_marginLeft="25dp"
android:layout_marginStart="25dp"
android:layout_toRightOf="#+id/spinner"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner3"
android:layout_alignTop="#+id/spinner"
android:layout_marginLeft="25dp"
android:layout_marginStart="25dp"
android:layout_toRightOf="#+id/spinner"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner"
android:layout_alignLeft="#+id/spinner"
android:layout_alignRight="#+id/spinner"
android:layout_alignStart="#+id/spinner"
android:layout_below="#+id/spinner"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner2"
android:layout_alignStart="#+id/spinner2"
android:layout_alignTop="#+id/spinner3"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner5"
android:layout_alignLeft="#+id/spinner4"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignStart="#+id/spinner4"
android:layout_alignTop="#+id/spinner4"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner3"
android:layout_alignLeft="#+id/spinner3"
android:layout_alignRight="#+id/spinner3"
android:layout_alignStart="#+id/spinner3"
android:layout_below="#+id/spinner3"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner4"
android:layout_alignStart="#+id/spinner4"
android:layout_alignTop="#+id/spinner5"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner7"
android:layout_alignLeft="#+id/spinner6"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignStart="#+id/spinner6"
android:layout_alignTop="#+id/spinner6"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner5"
android:layout_alignLeft="#+id/spinner5"
android:layout_alignRight="#+id/spinner5"
android:layout_alignStart="#+id/spinner5"
android:layout_below="#+id/spinner5"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner6"
android:layout_alignStart="#+id/spinner6"
android:layout_alignTop="#+id/spinner7"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner9"
android:layout_alignLeft="#+id/spinner6"
android:layout_alignStart="#+id/spinner6"
android:layout_alignTop="#+id/spinner7"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner7"
android:layout_alignLeft="#+id/spinner7"
android:layout_alignRight="#+id/spinner7"
android:layout_alignStart="#+id/spinner7"
android:layout_below="#+id/spinner7"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner8"
android:layout_alignStart="#+id/spinner8"
android:layout_alignTop="#+id/spinner9"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner11"
android:layout_alignLeft="#+id/spinner8"
android:layout_alignStart="#+id/spinner8"
android:layout_alignTop="#+id/spinner9"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner9"
android:layout_alignLeft="#+id/spinner9"
android:layout_alignRight="#+id/spinner9"
android:layout_alignStart="#+id/spinner9"
android:layout_below="#+id/spinner9"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner10"
android:layout_alignStart="#+id/spinner10"
android:layout_alignTop="#+id/spinner11"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner13"
android:layout_alignLeft="#+id/spinner12"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignStart="#+id/spinner12"
android:layout_alignTop="#+id/spinner12"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner11"
android:layout_alignLeft="#+id/spinner11"
android:layout_alignRight="#+id/spinner11"
android:layout_alignStart="#+id/spinner11"
android:layout_below="#+id/spinner11"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner12"
android:layout_alignStart="#+id/spinner12"
android:layout_alignTop="#+id/spinner13"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/spinner15"
android:layout_alignLeft="#+id/spinner12"
android:layout_alignStart="#+id/spinner12"
android:layout_alignTop="#+id/spinner13"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner13"
android:layout_alignLeft="#+id/spinner13"
android:layout_alignRight="#+id/spinner13"
android:layout_alignStart="#+id/spinner13"
android:layout_below="#+id/spinner13"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner14"
android:layout_alignStart="#+id/spinner14"
android:layout_alignTop="#+id/spinner15"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner14"
android:layout_alignStart="#+id/spinner14"
android:layout_alignTop="#+id/spinner15"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner17"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner15"
android:layout_alignLeft="#+id/spinner15"
android:layout_alignRight="#+id/spinner15"
android:layout_alignStart="#+id/spinner15"
android:layout_below="#+id/spinner15"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner16"
android:layout_alignStart="#+id/spinner16"
android:layout_alignTop="#+id/spinner17"
android:layout_below="#+id/spinner16"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner16"
android:layout_alignStart="#+id/spinner16"
android:layout_alignTop="#+id/spinner17"
android:layout_below="#+id/txtSpinner16"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner17"
android:layout_alignLeft="#+id/spinner17"
android:layout_alignRight="#+id/spinner17"
android:layout_alignStart="#+id/spinner17"
android:layout_below="#+id/spinner17"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner18"
android:layout_alignStart="#+id/spinner18"
android:layout_alignTop="#+id/spinner19"
android:layout_below="#+id/spinner18"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner18"
android:layout_alignStart="#+id/spinner18"
android:layout_alignTop="#+id/spinner19"
android:layout_below="#+id/txtSpinner18"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner21"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner19"
android:layout_alignLeft="#+id/spinner19"
android:layout_alignRight="#+id/spinner19"
android:layout_alignStart="#+id/spinner19"
android:layout_below="#+id/spinner19"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner22"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner20"
android:layout_alignStart="#+id/spinner20"
android:layout_alignTop="#+id/spinner21"
android:layout_below="#+id/spinner20"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner22"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner20"
android:layout_alignStart="#+id/spinner20"
android:layout_alignTop="#+id/spinner21"
android:layout_below="#+id/txtSpinner20"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner23"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner21"
android:layout_alignLeft="#+id/spinner21"
android:layout_alignRight="#+id/spinner21"
android:layout_alignStart="#+id/spinner21"
android:layout_below="#+id/spinner21"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner24"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner22"
android:layout_alignStart="#+id/spinner22"
android:layout_alignTop="#+id/spinner23"
android:layout_below="#+id/spinner22"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner24"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner22"
android:layout_alignStart="#+id/spinner22"
android:layout_alignTop="#+id/spinner23"
android:layout_below="#+id/txtSpinner22"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner25"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner23"
android:layout_alignLeft="#+id/spinner23"
android:layout_alignRight="#+id/spinner23"
android:layout_alignStart="#+id/spinner23"
android:layout_below="#+id/spinner23"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner26"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner24"
android:layout_alignStart="#+id/spinner24"
android:layout_alignTop="#+id/spinner25"
android:layout_below="#+id/spinner24"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner26"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner24"
android:layout_alignStart="#+id/spinner24"
android:layout_alignTop="#+id/spinner25"
android:layout_below="#+id/txtSpinner24"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner27"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner25"
android:layout_alignLeft="#+id/spinner25"
android:layout_alignRight="#+id/spinner25"
android:layout_alignStart="#+id/spinner25"
android:layout_below="#+id/spinner25"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner28"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner26"
android:layout_alignStart="#+id/spinner26"
android:layout_alignTop="#+id/spinner27"
android:layout_below="#+id/spinner26"
android:visibility="invisible" />
<TextView
android:id="#+id/txtSpinner28"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner26"
android:layout_alignStart="#+id/spinner26"
android:layout_alignTop="#+id/spinner27"
android:layout_below="#+id/txtSpinner26"
android:gravity="left"
android:textColor="#0287FC"
android:visibility="invisible" />
<TextView
android:id="#+id/spinner29"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner27"
android:layout_alignLeft="#+id/spinner27"
android:layout_alignRight="#+id/spinner27"
android:layout_alignStart="#+id/spinner27"
android:layout_below="#+id/spinner27"
android:layout_marginTop="6dp"
android:gravity="right"
android:textColor="#ff0000"
android:visibility="invisible" />
<Spinner
android:id="#+id/spinner30"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/spinner28"
android:layout_alignStart="#+id/spinner28"
android:layout_alignTop="#+id/spinner29"
android:layout_below="#+id/spinner28"
android:visibility="invisible" />
.........
..........
.........
</RelativeLayout>
</ScrollView>
I used 20 spinners and 40 textviews layout to display a poster as following shown. Is there any other way to get that please do let me know.
My poster
I was fighting with this problem today for a few hours and ended up trying File -> Invalidate Caches / Restart... and chose the Invalidate/Restart option. Seems to have fixed the Out of Memory error.
Don't know if that will work for you at a later time, but hopefully it helps.
Sample UI:
In the sample UI, basic and premium are products wherein it is requested in an API. In my current code, I've designed it in my xml file only and it is not interactive. What I want to know is when the request has only one product, it will show 1 box only and if 2, 2 boxes and so on. I want to know if there's a possible way to do it not in the xml file and it should be in a scrollview. Please help me. Thanks. :)
Output should be like this:
current xml file:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mojo="http://schemas.android.com/apk/res/com.mavshack"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#color/black"
android:orientation="vertical"
android:padding="1dp" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/RelativeMain"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:gravity="center"
android:src="#drawable/mavshack_login" />
</RelativeLayout>
<com.mavshack.views.MavshackTextView
android:id="#+id/chooseplan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
android:layout_marginTop="#dimen/login_top_margin"
android:gravity="center"
android:text="#string/select_plan"
android:textColor="#color/mavshack_white"
android:textSize="20dp"
mojo:font_type="#integer/fnt_alrt_ttl" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/chooseplan"
android:layout_marginLeft="#dimen/got_activation_code_margin"
android:layout_marginRight="#dimen/got_activation_code_margin" >
<com.mavshack.views.MavshackTextView
android:id="#+id/basic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginBottom="10dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="10dp"
android:text="#string/plan_basic"
android:textColor="#color/mavshack_white"
android:textSize="20dp"
mojo:font_type="#integer/fnt_alrt_ttl" />
<com.mavshack.views.MavshackTextView
android:id="#+id/premium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="10dp"
android:layout_marginRight="30dp"
android:layout_marginTop="10dp"
android:text="#string/plan_premium"
android:textColor="#color/mavshack_white"
android:textSize="20dp"
mojo:font_type="#integer/fnt_alrt_ttl" />
<LinearLayout
android:id="#+id/asd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/basic"
android:orientation="horizontal"
android:weightSum="2" >
<LinearLayout
android:id="#+id/basicRectangle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/basic"
android:layout_marginRight="20dp"
android:layout_weight="1"
android:background="#drawable/edit_text_style"
android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingTop="30dp" >
<com.mavshack.views.MavshackTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="#string/plan_HD"
android:textColor="#color/mavshack_white"
android:textSize="#dimen/fs_alrt_title"
mojo:font_type="#integer/fnt_alrt_ttl" />
<com.mavshack.views.MavshackTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="#string/plan_3Device"
android:textColor="#color/mavshack_white"
android:textSize="#dimen/fs_db_txt"
mojo:font_type="#integer/fnt_db_menu" />
<com.mavshack.views.MavshackTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:layout_marginTop="50dp"
android:gravity="center"
android:text="#string/plan_basicPrice"
android:textColor="#color/mavshack_white"
android:textSize="#dimen/fs_db_txt"
android:textStyle="bold"
mojo:font_type="#integer/fnt_db_menu" />
<com.mavshack.views.MavshackButton
android:id="#+id/basicbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:background="#drawable/round_button"
android:text="#string/plan_choose"
android:textColor="#color/white"
android:textSize="#dimen/fs_db_settings_paneltxt"
mojo:font_type="#integer/fnt_button_txt" />
</LinearLayout>
<LinearLayout
android:id="#+id/premiumRectangle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/premium"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:background="#drawable/edit_text_style"
android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingTop="30dp" >
<com.mavshack.views.MavshackTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="#string/plan_UHD"
android:textColor="#color/mavshack_white"
android:textSize="#dimen/fs_alrt_title"
mojo:font_type="#integer/fnt_alrt_ttl" />
<com.mavshack.views.MavshackTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="#string/plan_UDevice"
android:textColor="#color/mavshack_white"
android:textSize="#dimen/fs_db_txt"
mojo:font_type="#integer/fnt_db_menu" />
<com.mavshack.views.MavshackTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:layout_marginTop="50dp"
android:gravity="center"
android:text="#string/plan_premiumPrice"
android:textColor="#color/mavshack_white"
android:textSize="#dimen/fs_db_txt"
android:textStyle="bold"
mojo:font_type="#integer/fnt_db_menu" />
<com.mavshack.views.MavshackButton
android:id="#+id/premiumbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:background="#drawable/round_button"
android:text="#string/plan_choose"
android:textColor="#color/white"
android:textSize="#dimen/fs_db_settings_paneltxt"
mojo:font_type="#integer/fnt_button_txt" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
yes ,make a layout inside the scroll-view and inflate child make separate
xml file which you want to inflate.and inflate from your java code
http://rajeshvijayakumar.blogspot.in/2013/03/inflating-ui-dynammically-example-in.html
XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="#layout/toolbar"/>
<ScrollView
android:id="#+id/scroll"
android:layout_width="wrap_content"
android:layout_below="#+id/toolbar"
android:layout_height="wrap_content"
android:layout_above="#+id/makeOffer"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="#+id/firstcard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
android:layout_marginTop="#dimen/padding_8dp"
app:cardCornerRadius="#dimen/padding_4dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<RelativeLayout
android:id="#+id/insidecardone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="#dimen/padding_4dp">
<TextView
android:id="#+id/constant_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/padding_4dp"
android:text="Charge per day"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/tvRentPerday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:hint="Rs. "
android:gravity="center"
android:inputType="number"
android:maxLength="4"
android:textColor="#android:color/black"
android:textSize="#dimen/text_size_big_16" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/insidecardtwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardone"
android:layout_margin="#dimen/padding_4dp">
<TextView
android:id="#+id/con_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Duration (Days)"
android:textSize="#dimen/text_size_big_16" />
<TextView
android:id="#+id/num_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center_horizontal"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_24dp"
android:text="10"
android:textSize="#dimen/text_size_big_16"
/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/insidecardtwo"
android:layout_margin="#dimen/padding_8dp"
android:background="#color/grey_lighter" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardtwo"
android:layout_margin="#dimen/padding_4dp"
android:paddingBottom="#dimen/padding_8dp"
android:paddingTop="#dimen/padding_24dp">
<TextView
android:id="#+id/total_constant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="#dimen/padding_4dp"
android:gravity="center_vertical"
android:text="Total Amount"
android:textSize="#dimen/text_size_big_16" />
<TextView
android:id="#+id/tvAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:textColor="#ff4f00"
android:textSize="#dimen/text_size_big_16"
android:textStyle="bold" />
<TextView
android:id="#+id/total_constant_mutterfly"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/total_constant"
android:paddingTop="#dimen/padding_4dp"
android:text="#string/process_fee_text"
android:textColor="#android:color/darker_gray"
android:textSize="8sp" />
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/middlecard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/firstcard"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
app:cardCornerRadius="#dimen/padding_4dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<RelativeLayout
android:id="#+id/middlecard_relative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="#dimen/padding_4dp">
<TextView
android:id="#+id/deposite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="#dimen/padding_4dp"
android:gravity="center_vertical"
android:text="Deposit"
android:textSize="#dimen/text_size_big_16" />
<TextView
android:id="#+id/knowmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/deposite"
android:text="#string/txt_know_more"
android:layout_marginTop="#dimen/padding_8dp"
android:textSize="#dimen/text_size_extra_extra_small_10"
/>
<CheckBox
android:id="#+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:inputType="number"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_16dp"
android:textColor="#android:color/black"
android:textSize="#dimen/text_size_big_16" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/middletwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/middlecard_relative"
android:layout_margin="#dimen/padding_4dp"
android:visibility="gone"
>
<TextView
android:id="#+id/middle_con_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Charge (Rs.)"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/etDeposit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_16dp"
android:hint="1000"
android:maxLength="4"
android:inputType="number"
android:textSize="#dimen/text_size_big_16"
/>
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/seccard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/middlecard"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
app:cardCornerRadius="#dimen/padding_4dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="#+id/describe_constant_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="#dimen/padding_8dp"
android:text="Describe Your item"
android:textColor="#ff4f00"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/rlTohide"
android:layout_marginTop="#dimen/padding_4dp"
android:layout_width="160dp"
android:layout_height="120dp"
android:background="#drawable/greyborder_transparentbg"
>
<ImageView
android:id="#+id/img1"
android:layout_centerInParent="true"
android:layout_width="40dp"
android:src="#drawable/addimg"
android:layout_height="40dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/img1"
android:text="(Optional)"
android:textSize="#dimen/text_size_extra_extra_small_10"
android:textColor="#color/text_grey_opc"
android:layout_centerInParent="true"
/>
</RelativeLayout>
<ImageView
android:visibility="gone"
android:id="#+id/imgResource"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:layout_marginTop="#dimen/padding_8dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
android:layout_marginTop="180dp"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardone"
android:layout_margin="#dimen/padding_4dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<TextView
android:id="#+id/con_product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="8dp"
android:text="Name Of Product"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_toEndOf="#+id/con_product_name"
android:layout_toRightOf="#+id/con_product_name"
android:layout_alignParentRight="true"
android:hint="E.g. Nikon DSLR"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_16dp"
android:maxLength="30"
android:inputType="textPersonName"
android:layout_marginLeft="#dimen/padding_16dp"
android:layout_marginStart="#dimen/padding_16dp"
android:textColor="#android:color/black"
android:textSize="#dimen/text_size_big_16"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardtwo"
android:layout_margin="#dimen/padding_4dp"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<TextView
android:id="#+id/Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Description :"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/desc_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/Description"
android:hint="E.g. Comes with 18-55 mm lens, charger and carry case"
android:layout_marginTop="#dimen/padding_8dp"
android:background="#drawable/white_border_request_screen"
android:textColor="#android:color/darker_gray"
android:textSize="#dimen/text_size_big_16" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</ScrollView>
<Button
android:id="#+id/makeOffer"
android:layout_width="match_parent"
android:layout_height="#dimen/padding_48dp"
android:layout_alignParentBottom="true"
android:background="#color/new_primary_text"
android:padding="#dimen/padding_8dp"
android:text="#string/txt_make_offr"
android:textColor="#android:color/white"
android:textSize="#dimen/text_size_18"
/>
</RelativeLayout>
Android Manifest
<activity
android:name=".MyActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"/>
I am working on the layout since last night and I tried almost solution which I known. I am new in Android so please suggest me what is wrong with this layout.
this "fillViewport" work for another screen but with this screen it's not working.
Add android:windowSoftInputMode="stateHidden|adjustResize" to your <activity> tag in AndroidManifest.xml file. This will cause the screen to be resized to the left over space after the soft keyboard is shown. So, you will be able to scroll easily.
One more thing set property of ScrollView to the android:layout_above to the Button on the bottom of the page.
UpDate :
add this line to your ScrollView.
android:layout_above="#+id/makeOffer"
like this way
<ScrollView
android:id="#+id/scroll"
android:layout_width="wrap_content"
android:layout_below="#+id/toolbar"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_above="#+id/makeOffer">
ScreenShot :
So in my program i have a layout implemented in which i want the image to alignTop of the parent. I used to exact same layout code for another activity (with minor changes) and it works perfectly but when using it in this activity it does not. My image still aligns to the center fo the view. Here is the layout xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/darkGray"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="com.intellidev.fuzionvapor.HomeDetails"
tools:showIn="#layout/activity_home_details">
<ImageView
android:id="#+id/homeDetailsActivityImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:scaleType="fitCenter" />
<TextView
android:id="#+id/homeDetailsActivityTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/homeDetailsActivityImage"
android:textColor="#color/white"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/homeDetailsActivityPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/homeDetailsActivityImage"
android:textColor="#color/fuzionRed"
android:textSize="20sp"
android:textStyle="bold" />
<View
android:id="#+id/homeDetailsActivityRuler"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_below="#+id/homeDetailsActivityTitle"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="#color/white" />
<TextView
android:id="#+id/homeDetailsActivityDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/homeDetailsActivityRuler"
android:textColor="#color/white"
android:textSize="15sp" />
<LinearLayout
android:id="#+id/homeDetailsFooter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/homeDetailsActivityButton"
android:layout_centerHorizontal="true"
android:orientation="horizontal">
<fr.ganfra.materialspinner.MaterialSpinner
android:id="#+id/homeDetailsActivitySizeSpinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_margin="1dp"
android:layout_weight="1"
app:ms_arrowColor="#color/fuzionRed"
app:ms_arrowSize="16dp"
app:ms_baseColor="#color/fuzionRed"
app:ms_enableFloatingLabel="true"
app:ms_floatingLabelColor="#color/fuzionRed"
app:ms_floatingLabelText="#string/sizeFloatingLabel"
app:ms_highlightColor="#color/fuzionRed"
app:ms_hintColor="#color/fuzionRed"
app:ms_hint="Size"
app:ms_multiline="false"
app:ms_thickness="1dp" />
<fr.ganfra.materialspinner.MaterialSpinner
android:id="#+id/homeDetailsActivityNicotineSpinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
app:ms_arrowColor="#color/fuzionRed"
app:ms_arrowSize="16dp"
app:ms_baseColor="#color/fuzionRed"
app:ms_enableFloatingLabel="true"
app:ms_floatingLabelColor="#color/fuzionRed"
app:ms_floatingLabelText="#string/nicotineFloatingLabel"
app:ms_highlightColor="#color/fuzionRed"
app:ms_hintColor="#color/fuzionRed"
app:ms_multiline="false"
app:ms_hint="Nicotine"
app:ms_thickness="1dp" />
</LinearLayout>
<Button
android:id="#+id/homeDetailsActivityButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:background="#color/fuzionRed"
android:text="Add To Cart"
android:textAlignment="center"
android:textColor="#color/white"
android:textSize="25sp"
android:textStyle="bold" />
</RelativeLayout>
change
<ImageView
android:id="#+id/homeDetailsActivityImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:scaleType="fitCenter" />
to
<ImageView
android:id="#+id/homeDetailsActivityImage"
android:layout_width="match_parent"
android:layout_alignParentTop="true"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:adjustViewBounds="true"
android:scaleType="fitStart" />
I have an activity which has some text views and other data to be updated every second.
The performance is sluggish and when i capture the logs and view in TraceView.
I see at lot of calls been made to ViewRoot.draw() function.
25 calls in a short span of 4 seconds, almost 6 calls every sec.
Ideally speaking it should be once call every sec.
As per my initial speculation i beleive it is due to the bad layout of my xml, is this true?
How do i identify what is the reason for so many calls?
which is the best way to reduce these calls?
If these TextViews have their layout_width set to WRAP_CONTENT, then changing the text will trigger a measurement pass as their size will have changed. That could certainly get expensive. Try making them fixed-width.
Please find the layout below,
74 calls is ok but 25 calls are been made to ViewRoot.draw() in about 3.5 seconds
which means 6 calls for draw every second that is bad.
I want to know why so many calls are made ?
<RelativeLayout
android:id="#+id/qd3"
android:layout_height="80px"
android:layout_width="156px"
android:layout_marginTop="4px"
android:layout_marginRight="2px"
android:layout_marginLeft="4px"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/qd2"
android:background="#drawable/btn_hl_vd_land"
android:clickable="true">
<FrameLayout
android:id="#+id/FrameCell3"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<ImageView
android:id="#+id/qd3_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:id="#+id/qd_vd_gloss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/gloss_wt_tr_land"
/>
</FrameLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/qd4"
android:layout_height="80px"
android:layout_width="156px"
android:layout_marginTop="4px"
android:layout_marginRight="2px"
android:layout_marginLeft="4px"
android:layout_below = "#+id/qd3"
android:layout_toRightOf="#+id/qd1"
android:background="#drawable/btn_hl_lp_land"
android:clickable="true"
>
<FrameLayout
android:id="#+id/FrameCell4"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<ImageView android:id="#+id/ImageView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_wt_lp_bg_land"></ImageView>
<ImageView android:id="#+id/ImageView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
></ImageView>
<ImageView android:id="#+id/ImageView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_wt_lp_num"></ImageView>
<ImageView
android:id="#+id/qd4_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="#+id/lpCountBig"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="50sp"
android:paddingTop="17px"
android:paddingLeft="65px"
/>
<TextView
android:id="#+id/lpCountSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="38sp"
android:paddingTop="22px"
android:paddingLeft="57px"
/>
</FrameLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/qd2"
android:layout_height="80px"
android:layout_width="156px"
android:layout_marginTop="4px"
android:layout_marginLeft="2px"
android:layout_toRightOf = "#+id/qd1"
android:layout_alignParentLeft="true"
android:background="#drawable/btn_hl_qd2_land"
android:clickable="true">
<FrameLayout
android:id="#+id/FrameCell4"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<ImageView
android:id="#+id/qd_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/divider_wt_qd_land"
/>
<ImageView
android:id="#+id/qd_time_gloss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/gloss_wt_tl_land"
/>
</FrameLayout>
<RelativeLayout
android:id="#+id/qd_time"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/mDataOne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="#000000"
android:textSize="44sp"
android:layout_alignParentRight="true"
android:paddingRight="8px"
android:paddingTop="2px"
/>
<TextView
android:id="#+id/mDataFive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="#000000"
android:textSize="44sp"
android:layout_alignParentRight="true"
android:paddingRight="8px"
android:paddingTop="2px"
/>
<TextView
android:id="#+id/mDataSeven"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="#000000"
android:textSize="44sp"
android:layout_alignParentRight="true"
android:paddingRight="8px"
android:paddingTop="2px"
/>
</RelativeLayout>
<RelativeLayout
android:id="#+id/qd_pc_sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="#+id/mDataTwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="#000000"
android:textSize="44sp"
android:layout_alignParentRight="true"
android:paddingTop="43px"
android:paddingRight="8px"
/>
<TextView
android:id="#+id/mutOne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:layout_gravity="right"
android:textColor="#000000"
android:layout_alignParentLeft="true"
android:layout_alignBaseline="#+id/mDataTwo"
android:paddingLeft="10px"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/qd1"
android:layout_height="80px"
android:layout_width="156px"
android:layout_marginTop="4px"
android:layout_marginLeft="2px"
android:layout_alignParentLeft="true"
android:layout_below="#+id/qd2"
android:background="#drawable/btn_hl_qd1_port"
android:clickable="true">
<FrameLayout
android:id="#+id/FrameCell1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="#drawable/btn_wt_bl_land" >
<ImageView
android:id="#+id/qd1_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:id="#+id/map_signal_sought"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/map_wt_overlay_default_land"
android:clickable="true"/>
<ImageView
android:id="#+id/map_seeking_signal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ImageView
android:id="#+id/map_gloss"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/gloss_wt_bl_land"
/>
</FrameLayout>
<FrameLayout
android:id="#+id/FrameCellMap"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
>
<ImageView
android:id="#+id/map_gloss"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/gloss_wt_bl_land"
/>
</FrameLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/qd4_hr"
android:layout_height="80px"
android:layout_width="156px"
android:layout_marginTop="4px"
android:layout_marginRight="2px"
android:layout_marginLeft="4px"
android:layout_below = "#+id/qd3"
android:layout_toRightOf="#+id/qd1"
android:background="#drawable/btn_hl_lp_land"
android:clickable="true"
>
<ImageView
android:id="#+id/qd4_image_z"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:id="#+id/qd4_image_divider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/divider_wt_qd_land"
/>
<FrameLayout
android:id="#+id/FrameCell1"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
>
<TextView
android:id="#+id/curzValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="46sp"
android:layout_gravity="right|bottom"
android:paddingRight="8px"
android:layout_marginBottom="32px"
/>
<TextView
android:id="#+id/curzName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="38sp"
android:textStyle="bold"
android:layout_gravity="right|bottom"
android:paddingRight="8px"
/>
</FrameLayout>
<TextView
android:id="#+id/curz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="18sp"
android:text="#string/hr_z_cardio"
android:layout_alignParentBottom="true"
android:paddingLeft="10px"
android:paddingBottom="5px"
/>
<ImageView
android:id="#+id/qd_lp_gloss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/gloss_wt_br_land"
/>
<ImageView android:id="#+id/gUpDown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:visibility="invisible"
android:layout_marginBottom="5px"
android:background="#drawable/ic_wt_z_ad_lg"
/>
</RelativeLayout>
<RelativeLayout android:orientation="horizontal"
android:gravity="bottom" android:layout_height="wrap_content"
android:id="#+id/mControls"
android:layout_width="wrap_content">
<include layout="#layout/m" />
</RelativeLayout>
<RelativeLayout android:orientation="horizontal"
android:gravity="bottom" android:layout_height="wrap_content"
android:id="#+id/tWtCons"
android:visibility="invisible"
android:layout_width="wrap_content">
<include layout="#layout/st_wt" />
</RelativeLayout>