Theme work tab cards
This commit is contained in:
@@ -21,11 +21,20 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.R;
|
||||
|
||||
import app.lawnchair.font.FontManager;
|
||||
import app.lawnchair.theme.color.ColorTokens;
|
||||
import app.lawnchair.theme.drawable.DrawableTokens;
|
||||
|
||||
/**
|
||||
* Work profile toggle switch shown at the bottom of AllApps work tab
|
||||
*/
|
||||
@@ -67,9 +76,18 @@ public class WorkEduCard extends FrameLayout implements View.OnClickListener,
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
findViewById(R.id.action_btn).setOnClickListener(this);
|
||||
MarginLayoutParams lp = ((MarginLayoutParams) findViewById(R.id.wrapper).getLayoutParams());
|
||||
Button button = ViewCompat.requireViewById(this, R.id.action_btn);
|
||||
button.setOnClickListener(this);
|
||||
button.setAllCaps(false);
|
||||
FontManager.INSTANCE.get(getContext()).setCustomFont(button, R.id.font_button);
|
||||
|
||||
LinearLayout wrapper = ViewCompat.requireViewById(this, R.id.wrapper);
|
||||
wrapper.setBackground(DrawableTokens.WorkCard.resolve(getContext()));
|
||||
MarginLayoutParams lp = ((MarginLayoutParams) wrapper.getLayoutParams());
|
||||
lp.width = mLauncher.getAppsView().getActiveRecyclerView().getTabWidth();
|
||||
|
||||
TextView title = ViewCompat.requireViewById(this, R.id.work_apps_paused_title);
|
||||
title.setTextColor(ColorTokens.TextColorPrimary.resolveColor(getContext()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user