mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Removing unnecessary work adapter wrapper
Simplifying view type constants to make it easier to add new view types Bug: 234008165 Test: Verified on device Change-Id: I96589ceba362ea7e75afdfc3fe8da3be214aa682
This commit is contained in:
@@ -23,9 +23,11 @@ import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.model.StringCache;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
/**
|
||||
@@ -49,12 +51,27 @@ public class WorkPausedCard extends LinearLayout implements View.OnClickListener
|
||||
mActivityContext = ActivityContext.lookupContext(getContext());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
mBtn = findViewById(R.id.enable_work_apps);
|
||||
mBtn.setOnClickListener(this);
|
||||
|
||||
StringCache cache = mActivityContext.getStringCache();
|
||||
if (cache != null) {
|
||||
setWorkProfilePausedResources(cache);
|
||||
}
|
||||
}
|
||||
|
||||
private void setWorkProfilePausedResources(StringCache cache) {
|
||||
TextView title = findViewById(R.id.work_apps_paused_title);
|
||||
title.setText(cache.workProfilePausedTitle);
|
||||
|
||||
TextView body = findViewById(R.id.work_apps_paused_content);
|
||||
body.setText(cache.workProfilePausedDescription);
|
||||
|
||||
TextView button = findViewById(R.id.enable_work_apps);
|
||||
button.setText(cache.workProfileEnableButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user