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

Commit 75eac09a authored by Arc Wang's avatar Arc Wang Committed by Automerger Merge Worker
Browse files

Center apps Preference title when there is no summary am: 3cb8171f

parents 01431d5f 3cb8171f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -95,10 +95,17 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder {

    void setSummary(CharSequence summary) {
        mSummary.setText(summary);
        updateSummaryVisibility();
    }

    void setSummary(@StringRes int summary) {
        mSummary.setText(summary);
        updateSummaryVisibility();
    }

    private void updateSummaryVisibility() {
        // Hide an empty summary and then title will be vertically centered.
        mSummary.setVisibility(TextUtils.isEmpty(mSummary.getText()) ? View.GONE : View.VISIBLE);
    }

    void setEnabled(boolean isEnabled) {