w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Center alignment inside LinearLayout

Try switching your Message TextView to have a width of 0dp and a weight of 1, so that its width will be set to the remaining space left after measuring the time TextView. If that doesn't work, try switching the containing layout to a RelativeLayout and positioning the inner TextViews appropriately (using alignParentRight="true" for the Time TextView and layout_toLeftOf="@+id/tvTime" on the Message TextView).

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.