I use Delphi XE5 and the newest TMS FireMonkey Components and I have an issue with cropped caption in Items in the ListView in Android application. The caption is cropped by desription. Disabling of ItemOptions.ioDescriptionElement doesn't help. In win32 is everything ok.
Here is cropped caption in Android: https://www.dropbox.com/s/t7q95i7a2z1ret5/app_android.png
Here is application in win32: https://www.dropbox.com/s/njtmy3wnvvwuwv8/app_win32.png
Here is my source code for creating items in listview:
var
it:TTMSFMXTableViewItem;
begin
TableView.BeginUpdate;
TableView.HeaderText := 'List of my items';
TableView.ItemOptions := [ioCenterRectangle, ioCaptionElement, ioDescriptionElement];
TableView.Items.Clear;
TableView.CategoryType := ctNone;
TableView.LookupBar := False;
// item1
it:=TableView.Items.Add;
it.Caption := 'Item 1';
it.Description := 'My item 1';
it.Selected := false;
// item2
it:=TableView.Items.Add;
it.Caption := 'Item 2';
it.Description := 'My item 2';
it.Selected := false;
// item3
it:=TableView.Items.Add;
it.Caption := 'Item 3';
it.Description := 'My item 3';
it.Selected := false;
TableView.EndUpdate;
end;
Thank you for your solution.
Tomas
Hi,
We are aware of this issue, but it seems like an issue on Android rather than an issue in our component as it works on all other platforms. The following code should allow you to fix this issue:
procedure TForm1.TMSFMXTableView1ItemCustomize(Sender: TObject;
AItem: TTMSFMXTableViewItem; AItemShape: TTMSFMXTableViewItemShape;
AItemControlShape: TControl);
begin
AItemShape.Height := 55;
AItem.ShapeCaption.AutoSize := True;
AItem.ShapeCaption.Align := TAlignLayout.alTop;
AItem.ShapeDescription.Align := TAlignLayout.alClient;
end;
Kind Regards,
Pieter
Thank you Pieter, it works!
Tomas