Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22b375c6 authored by Cagdas Caglak's avatar Cagdas Caglak Committed by LuK1337
Browse files

Gallery2: Fix views overlap

"No photos found" and camera button were overlapped.
Camera button layout params changed and it was moved no data text below
and aligned center horizontal.

Change-Id: Idd76efaa54dd178eb3ff2cb5fae3ca17ef5acea3
parent 3664c3aa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,4 +23,6 @@

    <item type="id" name="ingest_notification_scanning" />
    <item type="id" name="ingest_notification_importing" />

    <item type="id" name="empty_album" />
</resources>
+8 −1
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ public class AlbumSetPage extends ActivityState implements
            tvEmptyAlbum.setTextColor(Color.parseColor("#8A000000"));
            tvEmptyAlbum.setGravity(Gravity.CENTER);
            tvEmptyAlbum.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);
            tvEmptyAlbum.setId(R.id.empty_album);
            RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
                    RelativeLayout.LayoutParams.WRAP_CONTENT,
                    RelativeLayout.LayoutParams.WRAP_CONTENT);
@@ -412,8 +413,14 @@ public class AlbumSetPage extends ActivityState implements
        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
                RelativeLayout.LayoutParams.WRAP_CONTENT,
                RelativeLayout.LayoutParams.WRAP_CONTENT);
        if (tvEmptyAlbum != null && tvEmptyAlbum.getVisibility() == View.VISIBLE) {
            lp.addRule(RelativeLayout.BELOW, tvEmptyAlbum.getId());
            lp.addRule(RelativeLayout.CENTER_HORIZONTAL);
        } else {
            lp.addRule(RelativeLayout.CENTER_IN_PARENT);
        }
        galleryRoot.addView(mCameraButton, lp);

        return true;
    }