mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Use fitcenter to scale images
This commit is contained in:
@@ -73,7 +73,7 @@ limitations under the License.
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:scaleType="fitStart" />
|
||||
android:scaleType="fitCenter" />
|
||||
</LinearLayout>
|
||||
<TableLayout
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -31,7 +31,7 @@ limitations under the License.
|
||||
android:id="@+id/marker_detail_waypoint_photo"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="fitStart" />
|
||||
android:scaleType="fitCenter" />
|
||||
<TextView
|
||||
android:id="@+id/marker_detail_waypoint_name"
|
||||
style="@style/TextLarge.WithTopMargin" />
|
||||
|
||||
@@ -94,9 +94,10 @@ public class ListItemUtils {
|
||||
} else {
|
||||
photo.setVisibility(View.VISIBLE);
|
||||
Display defaultDisplay = activity.getWindowManager().getDefaultDisplay();
|
||||
// Set the initial width to 35% of the display width
|
||||
int width = (int) (defaultDisplay.getWidth() * .35);
|
||||
PhotoUtils.setImageVew(photo, Uri.parse(photoUrl), width, 0);
|
||||
// Set the initial width to 33% of the display width.
|
||||
int width = (int) (defaultDisplay.getWidth() * .33);
|
||||
int height = 0;
|
||||
PhotoUtils.setImageVew(photo, Uri.parse(photoUrl), width, height);
|
||||
}
|
||||
|
||||
// Set date/time
|
||||
|
||||
Reference in New Issue
Block a user