Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
ProgressBar progressBar=new ProgressBar(this,null,android.R.attr.progressBarStyleHorizontal);
progressBar.setProgressDrawable(getResources().getDrawable(R.drawable.progress_bar));
progressBar.setMinimumWidth(100);
Try to change it from Resources, from XML.
<ProgressBar
android:id="#+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
EDIT :
If you want to change it on runtime, take a look on this link.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
i don't know how to make this bar in the layout in android studio?
i want the XML code for this part of the activity.
You can use Seekbar to achieve a similar one. Please refer this for more information: https://developer.android.com/reference/android/widget/SeekBar.html
This is a sample xml:
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="26dp"
android:max="100" >
</SeekBar>
Feel free to customize the indicators. Also, this is a good tutorial: http://abhiandroid.com/ui/seekbar
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a application which needs a vertical range seekbar which has two thumbs for adjusting the position.I have no idea how to make a one. Please help me out..
Similar to this seekbar.
ok I found this library:
https://github.com/edmodo/range-bar
<com.edmodo.rangebar.RangeBar
android:id="#+id/rb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:rotation="90"
app:tickCount="16"
/>
int left_index = rb.getLeftIndex();
int right_index = rb.getRightIndex();
hope it will be usefull
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
There are empty spaces right and left side of banner. How can I filled these? How can I expand the banner?
Take a look >>>
currently I'm using >>>>
try this use ads:adSize="SMART_BANNER" insted of ads:adSize="BANNER"
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adUnitId="#string/string_banner_home_id"
ads:adSize="SMART_BANNER">
</com.google.android.gms.ads.AdView>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I saw a special ripple effect in an app, i want to do it, too now. I attached a video to this ripple effect.
Any ideas or suggestions how I can do this?
You can use library for that
And wrap your view inside it
<com.andexert.library.RippleView
android:id="#+id/more"
android:layout_width="?android:actionBarSize"
android:layout_height="?android:actionBarSize"
android:layout_toLeftOf="#+id/more2"
android:layout_margin="5dp"
rv_centered="true">
<ImageView
android:layout_width="?android:actionBarSize"
android:layout_height="?android:actionBarSize"
android:src="#android:drawable/ic_menu_edit"
android:layout_centerInParent="true"
android:padding="10dp"
android:background="#android:color/holo_blue_dark"/>
</com.andexert.library.RippleView>
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am creating an android application and would like to set up my activity to have a question with multiple answers that they could chose from. I was thinking radio buttons but I'm sure there is something more appropriate for this task. Example
Question
Answer1[x] Answer2[x] Answer3[x]
Use TextView for the question and ListView with multiple choices for the answers below
ListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
Use CheckBox if the user can select multiple options.
RadioButtonis for when the user can only select one option.
As for layout:
It really depends, there are a lot of possible solutions, one possibility is:
<!--not all attributes are included,such as width and height, you have to add them-->
<LinearLayout android:orientation="vertical">
<TextView />
<LinearLayout android:orientation="horizontal"> <!--contains options-->
<CheckBox /> <CheckBox/> <CheckBox />
</LinearLayout>
</LinearLayout>