C CidTek Active Member Licensed User Longtime User Feb 22, 2011 #1 Listview1.TwoLinesAndBitmap.ImageView.Gravity=Gravity.RIGHT I thought the above would place the bitmap at the right side of the listview but it's not working. Am I missing something?
Listview1.TwoLinesAndBitmap.ImageView.Gravity=Gravity.RIGHT I thought the above would place the bitmap at the right side of the listview but it's not working. Am I missing something?
S splatt Active Member Licensed User Longtime User Feb 22, 2011 #2 I thought that the bitmap.gravity controls position within an imageview, not the list. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2011 #3 I thought that the bitmap.gravity controls position within an imageview, not the list. Click to expand... That is correct. You should change the Left and Top properties to change its position. Upvote 0
I thought that the bitmap.gravity controls position within an imageview, not the list. Click to expand... That is correct. You should change the Left and Top properties to change its position.
C CidTek Active Member Licensed User Longtime User Feb 22, 2011 #4 Erel said: That is correct. You should change the Left and Top properties to change its position. Click to expand... Are you saying that if I take the Listview.width minus the Imageview.width, then that would give me the Imageview Left position that I then assign to the Imageview Left and Right property to ensure right margin alignment? The Listview is set to 100%x and I want the icon aligned along the right margin in each row. Do I have to reassign this for every row or just once? Upvote 0
Erel said: That is correct. You should change the Left and Top properties to change its position. Click to expand... Are you saying that if I take the Listview.width minus the Imageview.width, then that would give me the Imageview Left position that I then assign to the Imageview Left and Right property to ensure right margin alignment? The Listview is set to 100%x and I want the icon aligned along the right margin in each row. Do I have to reassign this for every row or just once?
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2011 #5 Are you saying that if I take the Listview.width minus the Imageview.width, then that would give me the Imageview Left position that I then assign to the Imageview Left and Right property to ensure right margin alignment? Click to expand... You should do that for the Left property (there is no Right property). Do I have to reassign this for every row or just once? Click to expand... Only once. All rows inherit the "model" layout. Upvote 0
Are you saying that if I take the Listview.width minus the Imageview.width, then that would give me the Imageview Left position that I then assign to the Imageview Left and Right property to ensure right margin alignment? Click to expand... You should do that for the Left property (there is no Right property). Do I have to reassign this for every row or just once? Click to expand... Only once. All rows inherit the "model" layout.
C CidTek Active Member Licensed User Longtime User Feb 22, 2011 #6 Erel said: You should do that for the Left property (there is no Right property).. Click to expand... Sorry I meant left. Upvote 0
Erel said: You should do that for the Left property (there is no Right property).. Click to expand... Sorry I meant left.
L LittleEddie Member Licensed User Longtime User Feb 24, 2011 #7 Here's how I moved it lvSongs.FastScrollEnabled = False lvSongs.TwoLinesAndBitmap.ImageView.Left = lvSongs.Width - 100 lvSongs.TwoLinesAndBitmap.Label.Left = 0 lvSongs.TwoLinesAndBitmap.SecondLabel.Left = 0 lvSongs.TwoLinesAndBitmap.Label.Width = lvSongs.Width - 100 lvSongs.TwoLinesAndBitmap.SecondLabel.Width = lvSongs.Width - 100 Upvote 0
Here's how I moved it lvSongs.FastScrollEnabled = False lvSongs.TwoLinesAndBitmap.ImageView.Left = lvSongs.Width - 100 lvSongs.TwoLinesAndBitmap.Label.Left = 0 lvSongs.TwoLinesAndBitmap.SecondLabel.Left = 0 lvSongs.TwoLinesAndBitmap.Label.Width = lvSongs.Width - 100 lvSongs.TwoLinesAndBitmap.SecondLabel.Width = lvSongs.Width - 100
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2011 #8 Small tip. Write 100dip instead of 100. This way your design will scale automatically based on the device scale (dots per inch). Upvote 0
Small tip. Write 100dip instead of 100. This way your design will scale automatically based on the device scale (dots per inch).
L LittleEddie Member Licensed User Longtime User Feb 26, 2011 #9 I did better, I moved it to after I make the Bitmap so I know it's size and then used part of the Bitmap.width. But yes, I will remember that in the future Upvote 0
I did better, I moved it to after I make the Bitmap so I know it's size and then used part of the Bitmap.width. But yes, I will remember that in the future