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

Commit b13c531e authored by Joey's avatar Joey
Browse files

Make navbar transparent in the MainUI



Signed-off-by: default avatarJoey <joey@lineageos.org>
parent c5fa4796
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@

        <activity
            android:name=".ui.MainActivity"
            android:theme="@style/AppTheme.TranslucentNav"
            android:excludeFromRecents="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
+7 −1
Original line number Diff line number Diff line
@@ -60,8 +60,14 @@ public final class WallsAdapter extends RecyclerView.Adapter<WallpaperHolder> {

    @Override
    public void onBindViewHolder(final @NonNull WallpaperHolder holder, final int position) {
        /*
         * + 2 is for the last 2 items of the list as the one
         * before the last might happen to end "below" the real
         * last one
         */
        final boolean isLast = position + 2 == mData.size();
        final WallpaperBundle bundle = mData.get(position);
        holder.bind(bundle);
        holder.bind(bundle, isLast);
    }

    @Override
+3 −2
Original line number Diff line number Diff line
@@ -30,8 +30,9 @@ public final class UserHolder extends WallpaperHolder {
    }

    @Override
    public void bind(@NonNull final WallpaperBundle bundle) {
        super.bind(bundle);
    public void bind(@NonNull final WallpaperBundle bundle,
                     final boolean isLast) {
        super.bind(bundle, isLast);

        itemView.setOnClickListener(v -> callback.onWallpaperSelected(previewView, null));
    }
+7 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import androidx.recyclerview.widget.RecyclerView;
import org.lineageos.backgrounds.R;
import org.lineageos.backgrounds.bundle.WallpaperBundle;
import org.lineageos.backgrounds.ui.SelectionInterface;
import org.lineageos.backgrounds.util.UiUtils;

public class WallpaperHolder extends RecyclerView.ViewHolder {
    @NonNull
@@ -39,7 +40,8 @@ public class WallpaperHolder extends RecyclerView.ViewHolder {
        this.callback = callback;
    }

    public void bind(@NonNull WallpaperBundle bundle) {
    public void bind(@NonNull final WallpaperBundle bundle,
                     final boolean isLast) {
        previewView = itemView.findViewById(R.id.item_wallpaper_preview);
        TextView nameView = itemView.findViewById(R.id.item_wallpaper_name);

@@ -55,5 +57,9 @@ public class WallpaperHolder extends RecyclerView.ViewHolder {
        nameView.setText(name);

        itemView.setOnClickListener((v) -> callback.onWallpaperSelected(previewView, bundle));

        // Update margins
        UiUtils.setMarginForListItem(itemView.getResources(), itemView,
                R.dimen.item_margin_vertical, isLast);
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import org.lineageos.backgrounds.bundle.WallpaperBundle;
import org.lineageos.backgrounds.bundle.WallpaperType;
import org.lineageos.backgrounds.factory.UserWallpaperFactory;
import org.lineageos.backgrounds.task.FetchDataTask;
import org.lineageos.backgrounds.util.UiUtils;

import java.util.List;

@@ -104,6 +105,8 @@ public final class MainActivity extends AppCompatActivity implements SelectionIn
    }

    private void setupRecyclerView() {
        //UiUtils.addSystemUiPadding(getResources(), mContentRecyclerView);

        mAdapter = new WallsAdapter(this);

        int numOfColumns = getResources().getInteger(R.integer.main_list_columns);
Loading