android - layout_gravity is not working for my CirclePagerIndicator -
i want set circlepagerindicator
in left side. used code in resource: android:layout_gravity = "left"
, knew layout_gravity working when orientation of parent linear_layout vertical, layout circlepagerindicator in center
and not left
. xml layout:
<?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="wrap_content" android:orientation="horizontal" android:paddingleft="10dip" > <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"" > <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <imageview android:id="@+id/priority_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:visibility="gone" /> <linearlayout android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="vertical" android:paddingleft="10dip" > <textview android:layout_width="fill_parent" android:layout_height="0dip" android:layout_marginbottom="4dip" android:layout_weight="2" android:gravity="center_vertical" android:lines="1" android:singleline="true" /> <textview android:layout_width="fill_parent" android:layout_height="0dip" android:layout_marginbottom="4dip" android:layout_weight="1" android:gravity="center_vertical" android:lines="1" android:singleline="true" /> </linearlayout> </linearlayout> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <relativelayout android:id="@+id/relative_container" android:layout_width="wrap_content" android:layout_height="wrap_content" > <android.support.v4.view.viewpager xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pager" android:layout_width="80sp" android:layout_height="100sp" /> <progressbar android:id="@+id/progress" style="?android:attr/progressbarstylesmallinverse" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerinparent="true" android:visibility="visible" /> </relativelayout> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginleft="10dip" android:lines="1" android:singleline="true" android:textcolor="@color/black" /> <com.viewpagerindicator.circlepageindicator android:id="@+id/indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingtop="10dip" android:layout_gravity = "left" /> </linearlayout> </linearlayout> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal" > <imagebutton android:id="@+id/time_reporting_btn" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:paddingtop="6dip" android:src="@drawable/clock" android:text="@string/time_reporting" /> <imagebutton android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:paddingtop="6dip" /> </linearlayout> <progressbar android:id="@+id/progressbar" style="?android:attr/progressbarstylehorizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="100" android:progress="0" /> </linearlayout> </linearlayout>
could me?
inside linearlayout circlepageindicator set, gravity property working on left have placed relativelayout, it's normal circlepageindicator can't @ left side because there alredy relativelayout there. don't know if asking this, if not, explain better please
Comments
Post a Comment