Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CompactLabelChip.java « view « ui « deck « nextcloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8659cef3673029e5f021e824666f15f7a9fdfe99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package it.niedermann.nextcloud.deck.ui.view;

import android.annotation.SuppressLint;
import android.content.Context;

import androidx.annotation.NonNull;
import androidx.annotation.Px;

import it.niedermann.nextcloud.deck.R;
import it.niedermann.nextcloud.deck.model.Label;

import static it.niedermann.nextcloud.deck.util.DimensionUtil.dpToPx;

@SuppressLint("ViewConstructor")
public class CompactLabelChip extends LabelChip {

    public CompactLabelChip(@NonNull Context context, @NonNull Label label, @Px int gutter) {
        super(context, label, gutter);
        params.setFlexBasisPercent(1 / 6.5f);
        setHeight(dpToPx(context, R.dimen.compact_label_height));
        setText("");
    }
}