Android three circles different sizes -


hi have 3 circles in android show progress, custom element (viewprogressbar) inherit relative layout.

<linearlayout   android:layout_width="match_parent"   android:layout_height="wrap_content"   android:orientation="horizontal"   android:gravity="center">    <com.theproject.ui.view.viewprogressbar   android:id="@+id/vps_history_progress1"   android:layout_width="wrap_content"   android:layout_height="wrap_content"   app:value= "@string/zero"   app:subject = "@string/txt_progress1"   />    <com.theproject.ui.view.viewprogressbar     android:id="@+id/vps_history_progress2"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     app:value= "@string/zero"     app:subject = "@string/txt_progress2"    />    <com.theproject.ui.view.viewprogressbar       android:id="@+id/vps_history_progress3"       android:layout_width="wrap_content"       android:layout_height="wrap_content"       app:value= "@string/zero"       app:subject = "@string/txt_progress3"   />  </linearlayout> 

the problem facing in devices small screen thrid circle smaller others. think related using wrap_content. there way force 3 circles have same size?

thank you

yes, there is. use weight attribute:

 <com.theproject.ui.view.viewprogressbar    android:id="@+id/vps_history_progress1"    android:layout_width="wrap_content"    android:layout_height="wrap_content"       android:layout_weight=1    app:value= "@string/zero"    app:subject = "@string/txt_progress1"  /> 

repeat other views inside linearlayout.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -