Linked Questions

3 votes
3 answers
14k views

I have two types of content for TableRow. One has two lines and the other one. I wish everyone had the same height. I'm trying something like this: tr.setLayoutParams(new TableRow.LayoutParams(...
coffee's user avatar
  • 3,098
1 vote
1 answer
477 views

I am creating dynamic progressbar width but it's now showing properly. When i set width (272 dp ) in xml it's showing properly but i am setting same width programmetically it's not showing correct ...
Shanmugapriyan M's user avatar
134 votes
9 answers
71k views

How can I find out my screen size programmatically, in the units used by touch events and View measurement/layout? In other words, I want the coordinates of the bottom-right corner of the screen, in ...
Don Hatch's user avatar
  • 5,604
31 votes
7 answers
58k views

I would like to set height and width in dp for ImageView in android pragmatically. How can I achieve this?
Karthik's user avatar
  • 5,033
13 votes
5 answers
7k views

When I use the autocompletetextview everything works fine except it keeps switching between two positions: the correct one right below the textview and quite a ways lower. It starts wrong, but almost ...
ghostbust555's user avatar
  • 2,059
3 votes
3 answers
6k views

I have an android application. There are a lot of buttons in it but these buttons are created during runtime. If i set the width button.setwidth(300) it will set the width to 300px. I want the width ...
user1438128's user avatar
2 votes
4 answers
5k views

I have used android.support.design.widget.TextInputLayout to make a password input that allows the user to toggle readability on the password. The xml is as follows: <android.support.design.widget....
felix's user avatar
  • 111
0 votes
2 answers
1k views

i want to change border color for imageview manually in kotlin. val backgroundGradient = imgIcon.getBackground() as GradientDrawable backgroundGradient.setColor(getResources().getColor(R.color.yellow)...
Jignesh Hadiya's user avatar
1 vote
0 answers
197 views

I have layout which includes some button, textviews and a recyclerview. The layout already has a scrollView, so i disabled scroll of recyclerView. Now i want to set the height of recyclerView ...
dev90's user avatar
  • 7,641
0 votes
1 answer
87 views

I am trying to inflate a view multiple times. my view consists of one imageview and a textview below it and placing it at particular position. Below is my item.xml which I am inflating multiple times:...
Dav's user avatar
  • 13
0 votes
1 answer
53 views

I'm pretty new to programming for Android so if this is the wrong way to go about it anyway, feel free to comment about my bad practice. In my App, I have different Activities that use the same values....
Benjamin Basmaci's user avatar
2 votes
0 answers
58 views

I tried to change RelativeLayout's height programmatically, that is using Java. I have the following code: RelativeLayout rl = (RelativeLayout) findViewById(R.id.center); rl.getLayoutParams().height =...
princepiero's user avatar
  • 1,333
0 votes
0 answers
45 views

I've created a custom view that should draw a star using these points: float [] mPoints = {0, 100, 75, 75, 75, 75, 100, 0, 100, 0, 125, 75, 125, 75, 200, 100, 200, 100, 125, 125, 125, 125, ...
john sadeghi's user avatar