OSDN Git Service
(root)
/
android-x86
/
packages-apps-Taskbar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
db7b558
)
No need for findViewById wrapper methods anymore
author
Braden Farmer
<farmerbb@gmail.com>
Thu, 17 Jan 2019 04:21:02 +0000
(21:21 -0700)
committer
Braden Farmer
<farmerbb@gmail.com>
Thu, 17 Jan 2019 04:21:02 +0000
(21:21 -0700)
17 files changed:
app/src/main/java/com/farmerbb/taskbar/activity/ClearDataActivity.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/activity/DashboardActivity.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/activity/IconPackActivity.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/activity/InvisibleActivityAlt.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/activity/MainActivity.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/activity/SelectAppActivity.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/activity/TouchAbsorberActivity.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/adapter/AppListAdapter.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/adapter/StartMenuAdapter.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/fragment/AdvancedFragment.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/fragment/AppearanceFragment.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/fragment/RecentAppsFragment.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/fragment/SettingsFragment.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/service/DashboardService.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/service/StartMenuService.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/service/TaskbarService.java
patch
|
blob
|
history
app/src/main/java/com/farmerbb/taskbar/util/U.java
patch
|
blob
|
history
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/ClearDataActivity.java
b/app/src/main/java/com/farmerbb/taskbar/activity/ClearDataActivity.java
index
2949312
..
89d31a9
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/ClearDataActivity.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/ClearDataActivity.java
@@
-54,22
+54,22
@@
public class ClearDataActivity extends AppCompatActivity {
setContentView(R.layout.clear_data);
setTitle(R.string.clear_pinned_apps);
setContentView(R.layout.clear_data);
setTitle(R.string.clear_pinned_apps);
- pba =
U.findViewById(this,
R.id.clear_pba);
+ pba =
findViewById(
R.id.clear_pba);
pba.setOnCheckedChangeListener(listener);
pba.setOnCheckedChangeListener(listener);
- hiddenApps =
U.findViewById(this,
R.id.clear_hidden_apps);
+ hiddenApps =
findViewById(
R.id.clear_hidden_apps);
hiddenApps.setOnCheckedChangeListener(listener);
hiddenApps.setOnCheckedChangeListener(listener);
- topApps =
U.findViewById(this,
R.id.clear_top_apps);
+ topApps =
findViewById(
R.id.clear_top_apps);
topApps.setOnCheckedChangeListener(listener);
topApps.setOnCheckedChangeListener(listener);
- savedWindowSizes =
U.findViewById(this,
R.id.clear_window_sizes);
+ savedWindowSizes =
findViewById(
R.id.clear_window_sizes);
if(U.canEnableFreeform())
savedWindowSizes.setOnCheckedChangeListener(listener);
else
savedWindowSizes.setVisibility(View.GONE);
if(U.canEnableFreeform())
savedWindowSizes.setOnCheckedChangeListener(listener);
else
savedWindowSizes.setVisibility(View.GONE);
- button =
U.findViewById(this,
R.id.button);
+ button =
findViewById(
R.id.button);
button.setText(getResources().getString(R.string.action_close).toUpperCase());
button.setOnClickListener(view -> {
if(pba.isChecked())
button.setText(getResources().getString(R.string.action_close).toUpperCase());
button.setOnClickListener(view -> {
if(pba.isChecked())
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/DashboardActivity.java
b/app/src/main/java/com/farmerbb/taskbar/activity/DashboardActivity.java
index
6096e14
..
13e16d6
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/DashboardActivity.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/DashboardActivity.java
@@
-132,7
+132,7
@@
public class DashboardActivity extends Activity {
setContentView(R.layout.incognito);
setContentView(R.layout.incognito);
- LinearLayout layout =
U.findViewById(this,
R.id.incognitoLayout);
+ LinearLayout layout =
findViewById(
R.id.incognitoLayout);
layout.setLayoutParams(new FrameLayout.LayoutParams(display.width, display.height));
LocalBroadcastManager.getInstance(this).registerReceiver(addWidgetReceiver, new IntentFilter("com.farmerbb.taskbar.ADD_WIDGET_REQUESTED"));
layout.setLayoutParams(new FrameLayout.LayoutParams(display.width, display.height));
LocalBroadcastManager.getInstance(this).registerReceiver(addWidgetReceiver, new IntentFilter("com.farmerbb.taskbar.ADD_WIDGET_REQUESTED"));
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/IconPackActivity.java
b/app/src/main/java/com/farmerbb/taskbar/activity/IconPackActivity.java
index
a49455f
..
0fa8572
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/IconPackActivity.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/IconPackActivity.java
@@
-60,8
+60,8
@@
public class IconPackActivity extends AppCompatActivity {
setFinishOnTouchOutside(false);
setTitle(R.string.icon_pack);
setFinishOnTouchOutside(false);
setTitle(R.string.icon_pack);
- progressBar =
U.findViewById(this,
R.id.progress_bar);
- appList =
U.findViewById(this,
R.id.list);
+ progressBar =
findViewById(
R.id.progress_bar);
+ appList =
findViewById(
R.id.list);
appListGenerator = new AppListGenerator();
appListGenerator.execute();
appListGenerator = new AppListGenerator();
appListGenerator.execute();
@@
-98,11
+98,11
@@
public class IconPackActivity extends AppCompatActivity {
final IconPack entry = getItem(position);
assert entry != null;
final IconPack entry = getItem(position);
assert entry != null;
- TextView textView =
U.findViewById(convertView,
R.id.name);
+ TextView textView =
convertView.findViewById(
R.id.name);
textView.setText(entry.getName());
PackageManager pm = getPackageManager();
textView.setText(entry.getName());
PackageManager pm = getPackageManager();
- ImageView imageView =
U.findViewById(convertView,
R.id.icon);
+ ImageView imageView =
convertView.findViewById(
R.id.icon);
if(entry.getPackageName().equals(BuildConfig.APPLICATION_ID)) {
imageView.setImageDrawable(null);
if(entry.getPackageName().equals(BuildConfig.APPLICATION_ID)) {
imageView.setImageDrawable(null);
@@
-114,7
+114,7
@@
public class IconPackActivity extends AppCompatActivity {
}
}
}
}
- LinearLayout layout =
U.findViewById(convertView,
R.id.entry);
+ LinearLayout layout =
convertView.findViewById(
R.id.entry);
layout.setOnClickListener(view -> {
SharedPreferences pref = U.getSharedPreferences(IconPackActivity.this);
pref.edit().putString("icon_pack", entry.getPackageName()).apply();
layout.setOnClickListener(view -> {
SharedPreferences pref = U.getSharedPreferences(IconPackActivity.this);
pref.edit().putString("icon_pack", entry.getPackageName()).apply();
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/InvisibleActivityAlt.java
b/app/src/main/java/com/farmerbb/taskbar/activity/InvisibleActivityAlt.java
index
82fc859
..
7ca444c
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/InvisibleActivityAlt.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/InvisibleActivityAlt.java
@@
-44,7
+44,7
@@
public class InvisibleActivityAlt extends InvisibleActivity {
setContentView(R.layout.incognito);
setContentView(R.layout.incognito);
- LinearLayout layout =
U.findViewById(this,
R.id.incognitoLayout);
+ LinearLayout layout =
findViewById(
R.id.incognitoLayout);
layout.setLayoutParams(new FrameLayout.LayoutParams(display.width, display.height));
if(!MenuHelper.getInstance().isStartMenuOpen() && !powerButtonWarning) finish();
layout.setLayoutParams(new FrameLayout.LayoutParams(display.width, display.height));
if(!MenuHelper.getInstance().isStartMenuOpen() && !powerButtonWarning) finish();
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/MainActivity.java
b/app/src/main/java/com/farmerbb/taskbar/activity/MainActivity.java
index
37464b7
..
ad48643
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/MainActivity.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/MainActivity.java
@@
-166,7
+166,7
@@
public class MainActivity extends AppCompatActivity {
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
}
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
}
- theSwitch =
U.findViewById(this,
R.id.the_switch);
+ theSwitch =
findViewById(
R.id.the_switch);
if(theSwitch != null) {
final SharedPreferences pref = U.getSharedPreferences(this);
theSwitch.setChecked(pref.getBoolean("taskbar_active", false));
if(theSwitch != null) {
final SharedPreferences pref = U.getSharedPreferences(this);
theSwitch.setChecked(pref.getBoolean("taskbar_active", false));
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/SelectAppActivity.java
b/app/src/main/java/com/farmerbb/taskbar/activity/SelectAppActivity.java
index
2c41ffd
..
4f6b06c
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/SelectAppActivity.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/SelectAppActivity.java
@@
-103,7
+103,7
@@
public class SelectAppActivity extends AppCompatActivity {
getWindow().setElevation(0);
}
getWindow().setElevation(0);
}
- progressBar =
U.findViewById(this,
R.id.progress_bar);
+ progressBar =
findViewById(
R.id.progress_bar);
appListGenerator = new AppListGenerator();
appListGenerator.execute();
} else {
appListGenerator = new AppListGenerator();
appListGenerator.execute();
} else {
@@
-235,10
+235,10
@@
public class SelectAppActivity extends AppCompatActivity {
topAppsAdapter = adapters[U.TOP_APPS];
SelectAppPagerAdapter pagerAdapter = new SelectAppPagerAdapter(getSupportFragmentManager());
topAppsAdapter = adapters[U.TOP_APPS];
SelectAppPagerAdapter pagerAdapter = new SelectAppPagerAdapter(getSupportFragmentManager());
- ViewPager viewPager =
U.findViewById(SelectAppActivity.this,
R.id.pager);
+ ViewPager viewPager =
findViewById(
R.id.pager);
viewPager.setAdapter(pagerAdapter);
viewPager.setAdapter(pagerAdapter);
- TabLayout tabLayout =
U.findViewById(SelectAppActivity.this,
R.id.sliding_tabs);
+ TabLayout tabLayout =
findViewById(
R.id.sliding_tabs);
tabLayout.setupWithViewPager(viewPager);
findViewById(R.id.configure_start_menu_layout).setVisibility(View.VISIBLE);
tabLayout.setupWithViewPager(viewPager);
findViewById(R.id.configure_start_menu_layout).setVisibility(View.VISIBLE);
diff --git
a/app/src/main/java/com/farmerbb/taskbar/activity/TouchAbsorberActivity.java
b/app/src/main/java/com/farmerbb/taskbar/activity/TouchAbsorberActivity.java
index
ff494b7
..
1f5a233
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/activity/TouchAbsorberActivity.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/activity/TouchAbsorberActivity.java
@@
-52,7
+52,7
@@
public class TouchAbsorberActivity extends Activity {
setContentView(R.layout.incognito);
DisplayInfo display = U.getDisplayInfo(this);
setContentView(R.layout.incognito);
DisplayInfo display = U.getDisplayInfo(this);
- LinearLayout layout =
U.findViewById(this,
R.id.incognitoLayout);
+ LinearLayout layout =
findViewById(
R.id.incognitoLayout);
layout.setLayoutParams(new FrameLayout.LayoutParams(display.width, display.height));
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
layout.setLayoutParams(new FrameLayout.LayoutParams(display.width, display.height));
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
diff --git
a/app/src/main/java/com/farmerbb/taskbar/adapter/AppListAdapter.java
b/app/src/main/java/com/farmerbb/taskbar/adapter/AppListAdapter.java
index
13691de
..
4e24b6f
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/adapter/AppListAdapter.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/adapter/AppListAdapter.java
@@
-71,13
+71,13
@@
public class AppListAdapter extends ArrayAdapter<BlacklistEntry> {
final String componentName = entry.getPackageName();
final String componentNameAlt = componentName.contains("/") ? componentName.split("/")[1] : componentName;
final String componentName = entry.getPackageName();
final String componentNameAlt = componentName.contains("/") ? componentName.split("/")[1] : componentName;
- TextView textView =
U.findViewById(convertView,
R.id.name);
+ TextView textView =
convertView.findViewById(
R.id.name);
textView.setText(entry.getLabel());
textView.setText(entry.getLabel());
- final CheckBox checkBox =
U.findViewById(convertView,
R.id.checkbox);
+ final CheckBox checkBox =
convertView.findViewById(
R.id.checkbox);
checkBox.setChecked(blacklist.isBlocked(componentName) || blacklist.isBlocked(componentNameAlt));
checkBox.setChecked(blacklist.isBlocked(componentName) || blacklist.isBlocked(componentNameAlt));
- LinearLayout layout =
U.findViewById(convertView,
R.id.entry);
+ LinearLayout layout =
convertView.findViewById(
R.id.entry);
layout.setOnClickListener(view -> {
if(topApps.isTopApp(componentName) || topApps.isTopApp(componentNameAlt)) {
U.showToast(getContext(),
layout.setOnClickListener(view -> {
if(topApps.isTopApp(componentName) || topApps.isTopApp(componentNameAlt)) {
U.showToast(getContext(),
@@
-103,13
+103,13
@@
public class AppListAdapter extends ArrayAdapter<BlacklistEntry> {
final String componentName = entry.getPackageName();
final String componentNameAlt = componentName.contains("/") ? componentName.split("/")[1] : componentName;
final String componentName = entry.getPackageName();
final String componentNameAlt = componentName.contains("/") ? componentName.split("/")[1] : componentName;
- TextView textView =
U.findViewById(convertView,
R.id.name);
+ TextView textView =
convertView.findViewById(
R.id.name);
textView.setText(entry.getLabel());
textView.setText(entry.getLabel());
- final CheckBox checkBox =
U.findViewById(convertView,
R.id.checkbox);
+ final CheckBox checkBox =
convertView.findViewById(
R.id.checkbox);
checkBox.setChecked(topApps.isTopApp(componentName) || topApps.isTopApp(componentNameAlt));
checkBox.setChecked(topApps.isTopApp(componentName) || topApps.isTopApp(componentNameAlt));
- LinearLayout layout =
U.findViewById(convertView,
R.id.entry);
+ LinearLayout layout =
convertView.findViewById(
R.id.entry);
layout.setOnClickListener(view -> {
if(blacklist.isBlocked(componentName) || blacklist.isBlocked(componentNameAlt)) {
U.showToast(getContext(),
layout.setOnClickListener(view -> {
if(blacklist.isBlocked(componentName) || blacklist.isBlocked(componentNameAlt)) {
U.showToast(getContext(),
diff --git
a/app/src/main/java/com/farmerbb/taskbar/adapter/StartMenuAdapter.java
b/app/src/main/java/com/farmerbb/taskbar/adapter/StartMenuAdapter.java
index
02e8a66
..
e2723ca
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/adapter/StartMenuAdapter.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/adapter/StartMenuAdapter.java
@@
-90,7
+90,7
@@
public class StartMenuAdapter extends ArrayAdapter<AppEntry> implements SectionI
final SharedPreferences pref = U.getSharedPreferences(getContext());
final SharedPreferences pref = U.getSharedPreferences(getContext());
- TextView textView =
U.findViewById(convertView,
R.id.name);
+ TextView textView =
convertView.findViewById(
R.id.name);
textView.setText(entry.getLabel());
textView.setTypeface(null, isTopApp(entry) ? Typeface.BOLD : Typeface.NORMAL);
textView.setText(entry.getLabel());
textView.setTypeface(null, isTopApp(entry) ? Typeface.BOLD : Typeface.NORMAL);
@@
-103,10
+103,10
@@
public class StartMenuAdapter extends ArrayAdapter<AppEntry> implements SectionI
break;
}
break;
}
- ImageView imageView =
U.findViewById(convertView,
R.id.icon);
+ ImageView imageView =
convertView.findViewById(
R.id.icon);
imageView.setImageDrawable(entry.getIcon(getContext()));
imageView.setImageDrawable(entry.getIcon(getContext()));
- LinearLayout layout =
U.findViewById(convertView,
R.id.entry);
+ LinearLayout layout =
convertView.findViewById(
R.id.entry);
layout.setOnClickListener(view -> {
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(new Intent("com.farmerbb.taskbar.HIDE_START_MENU"));
U.launchApp(getContext(), entry.getPackageName(), entry.getComponentName(), entry.getUserId(getContext()), null, false, false);
layout.setOnClickListener(view -> {
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(new Intent("com.farmerbb.taskbar.HIDE_START_MENU"));
U.launchApp(getContext(), entry.getPackageName(), entry.getComponentName(), entry.getUserId(getContext()), null, false, false);
diff --git
a/app/src/main/java/com/farmerbb/taskbar/fragment/AdvancedFragment.java
b/app/src/main/java/com/farmerbb/taskbar/fragment/AdvancedFragment.java
index
0bba16c
..
a8d24f3
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/fragment/AdvancedFragment.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/fragment/AdvancedFragment.java
@@
-203,8
+203,8
@@
public class AdvancedFragment extends SettingsFragment implements Preference.OnP
editText2Id = R.id.fragmentEditText2;
}
editText2Id = R.id.fragmentEditText2;
}
- final EditText editText =
U.findViewById(dialogLayout,
editTextId);
- final EditText editText2 =
U.findViewById(dialogLayout,
editText2Id);
+ final EditText editText =
dialogLayout.findViewById(
editTextId);
+ final EditText editText2 =
dialogLayout.findViewById(
editText2Id);
builder.setView(dialogLayout)
.setTitle(R.string.dashboard_grid_size)
builder.setView(dialogLayout)
.setTitle(R.string.dashboard_grid_size)
diff --git
a/app/src/main/java/com/farmerbb/taskbar/fragment/AppearanceFragment.java
b/app/src/main/java/com/farmerbb/taskbar/fragment/AppearanceFragment.java
index
32f3dc3
..
a43892e
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/fragment/AppearanceFragment.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/fragment/AppearanceFragment.java
@@
-196,13
+196,13
@@
public class AppearanceFragment extends SettingsFragment implements Preference.O
View colorPreview = dialogLayout.findViewById(R.id.color_preview);
colorPreview.setBackgroundColor(Color.argb(alpha, red, green, blue));
View colorPreview = dialogLayout.findViewById(R.id.color_preview);
colorPreview.setBackgroundColor(Color.argb(alpha, red, green, blue));
- TextView hexPreview =
U.findViewById(dialogLayout,
R.id.hex_preview);
+ TextView hexPreview =
dialogLayout.findViewById(
R.id.hex_preview);
hexPreview.setText("#" + String.format("%08x", Color.argb(alpha, red, green, blue)).toUpperCase());
hexPreview.setText("#" + String.format("%08x", Color.argb(alpha, red, green, blue)).toUpperCase());
- final TextView alphaValue =
U.findViewById(dialogLayout,
R.id.alpha_value);
+ final TextView alphaValue =
dialogLayout.findViewById(
R.id.alpha_value);
alphaValue.setText("0");
alphaValue.setText("0");
- final SeekBar alphaSeekBar =
U.findViewById(dialogLayout,
R.id.alpha_seekbar);
+ final SeekBar alphaSeekBar =
dialogLayout.findViewById(
R.id.alpha_seekbar);
alphaSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
alphaSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
@@
-222,10
+222,10
@@
public class AppearanceFragment extends SettingsFragment implements Preference.O
alphaSeekBar.setProgress(Color.alpha(color));
alphaSeekBar.setProgress(Color.alpha(color));
- final TextView redValue =
U.findViewById(dialogLayout,
R.id.red_value);
+ final TextView redValue =
dialogLayout.findViewById(
R.id.red_value);
redValue.setText("0");
redValue.setText("0");
- final SeekBar redSeekBar =
U.findViewById(dialogLayout,
R.id.red_seekbar);
+ final SeekBar redSeekBar =
dialogLayout.findViewById(
R.id.red_seekbar);
redSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
redSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
@@
-245,10
+245,10
@@
public class AppearanceFragment extends SettingsFragment implements Preference.O
redSeekBar.setProgress(Color.red(color));
redSeekBar.setProgress(Color.red(color));
- final TextView greenValue =
U.findViewById(dialogLayout,
R.id.green_value);
+ final TextView greenValue =
dialogLayout.findViewById(
R.id.green_value);
greenValue.setText("0");
greenValue.setText("0");
- final SeekBar greenSeekBar =
U.findViewById(dialogLayout,
R.id.green_seekbar);
+ final SeekBar greenSeekBar =
dialogLayout.findViewById(
R.id.green_seekbar);
greenSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
greenSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
@@
-268,10
+268,10
@@
public class AppearanceFragment extends SettingsFragment implements Preference.O
greenSeekBar.setProgress(Color.green(color));
greenSeekBar.setProgress(Color.green(color));
- final TextView blueValue =
U.findViewById(dialogLayout,
R.id.blue_value);
+ final TextView blueValue =
dialogLayout.findViewById(
R.id.blue_value);
blueValue.setText("0");
blueValue.setText("0");
- final SeekBar blueSeekBar =
U.findViewById(dialogLayout,
R.id.blue_seekbar);
+ final SeekBar blueSeekBar =
dialogLayout.findViewById(
R.id.blue_seekbar);
blueSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
blueSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
diff --git
a/app/src/main/java/com/farmerbb/taskbar/fragment/RecentAppsFragment.java
b/app/src/main/java/com/farmerbb/taskbar/fragment/RecentAppsFragment.java
index
a950d83
..
7e2c1ce
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/fragment/RecentAppsFragment.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/fragment/RecentAppsFragment.java
@@
-108,10
+108,10
@@
public class RecentAppsFragment extends SettingsFragment implements Preference.O
String value = pref.getString("max_num_of_recents", "10");
String value = pref.getString("max_num_of_recents", "10");
- final TextView textView =
U.findViewById(dialogLayout,
R.id.seekbar_value);
+ final TextView textView =
dialogLayout.findViewById(
R.id.seekbar_value);
textView.setText("0");
textView.setText("0");
- final SeekBar seekBar =
U.findViewById(dialogLayout,
R.id.seekbar);
+ final SeekBar seekBar =
dialogLayout.findViewById(
R.id.seekbar);
seekBar.setMax(max);
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
seekBar.setMax(max);
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
@@
-131,7
+131,7
@@
public class RecentAppsFragment extends SettingsFragment implements Preference.O
seekBar.setProgress(Integer.parseInt(value));
seekBar.setProgress(Integer.parseInt(value));
- TextView blurb =
U.findViewById(dialogLayout,
R.id.blurb);
+ TextView blurb =
dialogLayout.findViewById(
R.id.blurb);
blurb.setText(R.string.num_of_recents_blurb);
builder.setView(dialogLayout)
blurb.setText(R.string.num_of_recents_blurb);
builder.setView(dialogLayout)
@@
-157,10
+157,10
@@
public class RecentAppsFragment extends SettingsFragment implements Preference.O
String value2 = pref.getString("refresh_frequency", "2");
String value2 = pref.getString("refresh_frequency", "2");
- final TextView textView2 =
U.findViewById(dialogLayout2,
R.id.seekbar_value);
+ final TextView textView2 =
dialogLayout2.findViewById(
R.id.seekbar_value);
textView2.setText(R.string.infinity);
textView2.setText(R.string.infinity);
- final SeekBar seekBar2 =
U.findViewById(dialogLayout2,
R.id.seekbar);
+ final SeekBar seekBar2 =
dialogLayout2.findViewById(
R.id.seekbar);
seekBar2.setMax(max2);
seekBar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
seekBar2.setMax(max2);
seekBar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
@@
-180,7
+180,7
@@
public class RecentAppsFragment extends SettingsFragment implements Preference.O
seekBar2.setProgress((int) (Double.parseDouble(value2) * 2));
seekBar2.setProgress((int) (Double.parseDouble(value2) * 2));
- TextView blurb2 =
U.findViewById(dialogLayout2,
R.id.blurb);
+ TextView blurb2 =
dialogLayout2.findViewById(
R.id.blurb);
blurb2.setText(R.string.refresh_frequency_blurb);
builder2.setView(dialogLayout2)
blurb2.setText(R.string.refresh_frequency_blurb);
builder2.setView(dialogLayout2)
diff --git
a/app/src/main/java/com/farmerbb/taskbar/fragment/SettingsFragment.java
b/app/src/main/java/com/farmerbb/taskbar/fragment/SettingsFragment.java
index
0407844
..
3c8ceaa
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/fragment/SettingsFragment.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/fragment/SettingsFragment.java
@@
-55,7
+55,7
@@
public abstract class SettingsFragment extends PreferenceFragment {
// Remove dividers
View rootView = getView();
if(rootView != null) {
// Remove dividers
View rootView = getView();
if(rootView != null) {
- ListView list =
U.findViewById(rootView,
android.R.id.list);
+ ListView list =
rootView.findViewById(
android.R.id.list);
if(list != null) list.setDivider(null);
}
}
if(list != null) list.setDivider(null);
}
}
diff --git
a/app/src/main/java/com/farmerbb/taskbar/service/DashboardService.java
b/app/src/main/java/com/farmerbb/taskbar/service/DashboardService.java
index
ff9565f
..
944b069
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/service/DashboardService.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/service/DashboardService.java
@@
-241,7
+241,7
@@
public class DashboardService extends Service {
cellLayout.setOnClickListener(cellOcl);
cellLayout.setOnHoverListener(cellOhl);
cellLayout.setOnClickListener(cellOcl);
cellLayout.setOnHoverListener(cellOhl);
- TextView empty =
U.findViewById(cellLayout,
R.id.empty);
+ TextView empty =
cellLayout.findViewById(
R.id.empty);
empty.setBackgroundColor(accentColorAlt);
empty.setTextColor(accentColor);
empty.setBackgroundColor(accentColorAlt);
empty.setTextColor(accentColor);
@@
-539,7
+539,7
@@
public class DashboardService extends Service {
cellLayout.setOnGenericMotionListener(ogml);
cellLayout.setOnInterceptedLongPressListener(listener);
cellLayout.setOnGenericMotionListener(ogml);
cellLayout.setOnInterceptedLongPressListener(listener);
- LinearLayout linearLayout =
U.findViewById(cellLayout,
R.id.dashboard);
+ LinearLayout linearLayout =
cellLayout.findViewById(
R.id.dashboard);
linearLayout.addView(hostView);
Bundle bundle2 = (Bundle) cellLayout.getTag();
linearLayout.addView(hostView);
Bundle bundle2 = (Bundle) cellLayout.getTag();
@@
-575,7
+575,7
@@
public class DashboardService extends Service {
mAppWidgetHost.deleteAppWidgetId(bundle.getInt("appWidgetId"));
bundle.remove("appWidgetId");
mAppWidgetHost.deleteAppWidgetId(bundle.getInt("appWidgetId"));
bundle.remove("appWidgetId");
- LinearLayout linearLayout =
U.findViewById(cellLayout,
R.id.dashboard);
+ LinearLayout linearLayout =
cellLayout.findViewById(
R.id.dashboard);
linearLayout.removeAllViews();
cellLayout.setTag(bundle);
linearLayout.removeAllViews();
cellLayout.setTag(bundle);
@@
-599,12
+599,12
@@
public class DashboardService extends Service {
}
private void addPlaceholder(int cellId) {
}
private void addPlaceholder(int cellId) {
- FrameLayout placeholder =
U.findViewById(cells.get(cellId),
R.id.placeholder);
+ FrameLayout placeholder =
cells.get(cellId).findViewById(
R.id.placeholder);
SharedPreferences pref = U.getSharedPreferences(this);
String providerName = pref.getString("dashboard_widget_" + Integer.toString(cellId) + "_provider", "null");
if(!providerName.equals("null")) {
SharedPreferences pref = U.getSharedPreferences(this);
String providerName = pref.getString("dashboard_widget_" + Integer.toString(cellId) + "_provider", "null");
if(!providerName.equals("null")) {
- ImageView imageView =
U.findViewById(placeholder,
R.id.placeholder_image);
+ ImageView imageView =
placeholder.findViewById(
R.id.placeholder_image);
ComponentName componentName = ComponentName.unflattenFromString(providerName);
List<AppWidgetProviderInfo> providerInfoList = mAppWidgetManager.getInstalledProvidersForProfile(Process.myUserHandle());
ComponentName componentName = ComponentName.unflattenFromString(providerName);
List<AppWidgetProviderInfo> providerInfoList = mAppWidgetManager.getInstalledProvidersForProfile(Process.myUserHandle());
diff --git
a/app/src/main/java/com/farmerbb/taskbar/service/StartMenuService.java
b/app/src/main/java/com/farmerbb/taskbar/service/StartMenuService.java
index
a954bfd
..
f9d8941
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/service/StartMenuService.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/service/StartMenuService.java
@@
-255,7
+255,7
@@
public class StartMenuService extends Service {
// Initialize views
layout = (StartMenuLayout) LayoutInflater.from(U.wrapContext(this)).inflate(layoutId, null);
// Initialize views
layout = (StartMenuLayout) LayoutInflater.from(U.wrapContext(this)).inflate(layoutId, null);
- startMenu =
U.findViewById(layout,
R.id.start_menu);
+ startMenu =
layout.findViewById(
R.id.start_menu);
if((shouldShowSearchBox && !hasHardwareKeyboard) || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1)
layout.viewHandlesBackButton();
if((shouldShowSearchBox && !hasHardwareKeyboard) || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1)
layout.viewHandlesBackButton();
@@
-271,12
+271,12
@@
public class StartMenuService extends Service {
if(U.visualFeedbackEnabled(this))
startMenu.setRecyclerListener(view -> view.setBackgroundColor(0));
if(U.visualFeedbackEnabled(this))
startMenu.setRecyclerListener(view -> view.setBackgroundColor(0));
- searchView =
U.findViewById(layout,
R.id.search);
+ searchView =
layout.findViewById(
R.id.search);
int backgroundTint = U.getBackgroundTint(this);
int backgroundTint = U.getBackgroundTint(this);
- FrameLayout startMenuFrame =
U.findViewById(layout,
R.id.start_menu_frame);
- FrameLayout searchViewLayout =
U.findViewById(layout,
R.id.search_view_layout);
+ FrameLayout startMenuFrame =
layout.findViewById(
R.id.start_menu_frame);
+ FrameLayout searchViewLayout =
layout.findViewById(
R.id.search_view_layout);
startMenuFrame.setBackgroundColor(backgroundTint);
searchViewLayout.setBackgroundColor(backgroundTint);
startMenuFrame.setBackgroundColor(backgroundTint);
searchViewLayout.setBackgroundColor(backgroundTint);
@@
-293,7
+293,7
@@
public class StartMenuService extends Service {
if(adapter.getCount() > 0) {
View view = adapter.getView(0, null, startMenu);
if(adapter.getCount() > 0) {
View view = adapter.getView(0, null, startMenu);
- LinearLayout layout =
U.findViewById(view,
R.id.entry);
+ LinearLayout layout =
view.findViewById(
R.id.entry);
layout.performClick();
} else {
if(U.shouldCollapse(StartMenuService.this, true))
layout.performClick();
} else {
if(U.shouldCollapse(StartMenuService.this, true))
@@
-348,7
+348,7
@@
public class StartMenuService extends Service {
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
new Handler().postDelayed(() -> {
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
new Handler().postDelayed(() -> {
- EditText editText =
U.findViewById(searchView,
R.id.search_src_text);
+ EditText editText =
searchView.findViewById(
R.id.search_src_text);
if(editText != null) {
editText.requestFocus();
editText.setSelection(editText.getText().length());
if(editText != null) {
editText.requestFocus();
editText.setSelection(editText.getText().length());
@@
-382,7
+382,7
@@
public class StartMenuService extends Service {
searchView.setImeOptions(EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
searchView.setImeOptions(EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
- LinearLayout powerButton =
U.findViewById(layout,
R.id.power_button);
+ LinearLayout powerButton =
layout.findViewById(
R.id.power_button);
powerButton.setOnClickListener(view -> {
int[] location = new int[2];
view.getLocationOnScreen(location);
powerButton.setOnClickListener(view -> {
int[] location = new int[2];
view.getLocationOnScreen(location);
@@
-413,7
+413,7
@@
public class StartMenuService extends Service {
} else
searchViewLayout.setVisibility(View.GONE);
} else
searchViewLayout.setVisibility(View.GONE);
- textView =
U.findViewById(layout,
R.id.no_apps_found);
+ textView =
layout.findViewById(
R.id.no_apps_found);
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
diff --git
a/app/src/main/java/com/farmerbb/taskbar/service/TaskbarService.java
b/app/src/main/java/com/farmerbb/taskbar/service/TaskbarService.java
index
e81e6cc
..
44a72b1
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/service/TaskbarService.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/service/TaskbarService.java
@@
-270,23
+270,23
@@
public class TaskbarService extends Service {
boolean altButtonConfig = pref.getBoolean("alt_button_config", false);
layout = (LinearLayout) LayoutInflater.from(U.wrapContext(this)).inflate(layoutId, null);
boolean altButtonConfig = pref.getBoolean("alt_button_config", false);
layout = (LinearLayout) LayoutInflater.from(U.wrapContext(this)).inflate(layoutId, null);
- taskbar =
U.findViewById(layout,
R.id.taskbar);
- scrollView =
U.findViewById(layout,
R.id.taskbar_scrollview);
+ taskbar =
layout.findViewById(
R.id.taskbar);
+ scrollView =
layout.findViewById(
R.id.taskbar_scrollview);
int backgroundTint = U.getBackgroundTint(this);
int accentColor = U.getAccentColor(this);
if(altButtonConfig) {
int backgroundTint = U.getBackgroundTint(this);
int accentColor = U.getAccentColor(this);
if(altButtonConfig) {
- space =
U.findViewById(layout,
R.id.space_alt);
+ space =
layout.findViewById(
R.id.space_alt);
layout.findViewById(R.id.space).setVisibility(View.GONE);
} else {
layout.findViewById(R.id.space).setVisibility(View.GONE);
} else {
- space =
U.findViewById(layout,
R.id.space);
+ space =
layout.findViewById(
R.id.space);
layout.findViewById(R.id.space_alt).setVisibility(View.GONE);
}
space.setOnClickListener(v -> toggleTaskbar(true));
layout.findViewById(R.id.space_alt).setVisibility(View.GONE);
}
space.setOnClickListener(v -> toggleTaskbar(true));
- startButton =
U.findViewById(layout,
R.id.start_button);
+ startButton =
layout.findViewById(
R.id.start_button);
int padding;
if(pref.getBoolean("app_drawer_icon", false)) {
int padding;
if(pref.getBoolean("app_drawer_icon", false)) {
@@
-346,10
+346,10
@@
public class TaskbarService extends Service {
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
if(altButtonConfig) {
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
if(altButtonConfig) {
- button =
U.findViewById(layout,
R.id.hide_taskbar_button_alt);
+ button =
layout.findViewById(
R.id.hide_taskbar_button_alt);
layout.findViewById(R.id.hide_taskbar_button).setVisibility(View.GONE);
} else {
layout.findViewById(R.id.hide_taskbar_button).setVisibility(View.GONE);
} else {
- button =
U.findViewById(layout,
R.id.hide_taskbar_button);
+ button =
layout.findViewById(
R.id.hide_taskbar_button);
layout.findViewById(R.id.hide_taskbar_button_alt).setVisibility(View.GONE);
}
layout.findViewById(R.id.hide_taskbar_button_alt).setVisibility(View.GONE);
}
@@
-360,18
+360,18
@@
public class TaskbarService extends Service {
updateButton(false);
button.setOnClickListener(v -> toggleTaskbar(true));
updateButton(false);
button.setOnClickListener(v -> toggleTaskbar(true));
- LinearLayout buttonLayout =
U.findViewById(layout,
altButtonConfig
+ LinearLayout buttonLayout =
layout.findViewById(
altButtonConfig
? R.id.hide_taskbar_button_layout_alt
: R.id.hide_taskbar_button_layout);
if(buttonLayout != null) buttonLayout.setOnClickListener(v -> toggleTaskbar(true));
? R.id.hide_taskbar_button_layout_alt
: R.id.hide_taskbar_button_layout);
if(buttonLayout != null) buttonLayout.setOnClickListener(v -> toggleTaskbar(true));
- LinearLayout buttonLayoutToHide =
U.findViewById(layout,
altButtonConfig
+ LinearLayout buttonLayoutToHide =
layout.findViewById(
altButtonConfig
? R.id.hide_taskbar_button_layout
: R.id.hide_taskbar_button_layout_alt);
if(buttonLayoutToHide != null) buttonLayoutToHide.setVisibility(View.GONE);
? R.id.hide_taskbar_button_layout
: R.id.hide_taskbar_button_layout_alt);
if(buttonLayoutToHide != null) buttonLayoutToHide.setVisibility(View.GONE);
- dashboardButton =
U.findViewById(layout,
R.id.dashboard_button);
- navbarButtons =
U.findViewById(layout,
R.id.navbar_buttons);
+ dashboardButton =
layout.findViewById(
R.id.dashboard_button);
+ navbarButtons =
layout.findViewById(
R.id.navbar_buttons);
dashboardEnabled = pref.getBoolean("dashboard", false);
if(dashboardEnabled) {
dashboardEnabled = pref.getBoolean("dashboard", false);
if(dashboardEnabled) {
@@
-389,7
+389,7
@@
public class TaskbarService extends Service {
if(pref.getBoolean("button_back", false)) {
navbarButtonsEnabled = true;
if(pref.getBoolean("button_back", false)) {
navbarButtonsEnabled = true;
- ImageView backButton =
U.findViewById(layout,
R.id.button_back);
+ ImageView backButton =
layout.findViewById(
R.id.button_back);
backButton.setColorFilter(accentColor);
backButton.setVisibility(View.VISIBLE);
backButton.setOnClickListener(v -> {
backButton.setColorFilter(accentColor);
backButton.setVisibility(View.VISIBLE);
backButton.setOnClickListener(v -> {
@@
-424,7
+424,7
@@
public class TaskbarService extends Service {
if(pref.getBoolean("button_home", false)) {
navbarButtonsEnabled = true;
if(pref.getBoolean("button_home", false)) {
navbarButtonsEnabled = true;
- ImageView homeButton =
U.findViewById(layout,
R.id.button_home);
+ ImageView homeButton =
layout.findViewById(
R.id.button_home);
homeButton.setColorFilter(accentColor);
homeButton.setVisibility(View.VISIBLE);
homeButton.setOnClickListener(v -> {
homeButton.setColorFilter(accentColor);
homeButton.setVisibility(View.VISIBLE);
homeButton.setOnClickListener(v -> {
@@
-467,7
+467,7
@@
public class TaskbarService extends Service {
if(pref.getBoolean("button_recents", false)) {
navbarButtonsEnabled = true;
if(pref.getBoolean("button_recents", false)) {
navbarButtonsEnabled = true;
- ImageView recentsButton =
U.findViewById(layout,
R.id.button_recents);
+ ImageView recentsButton =
layout.findViewById(
R.id.button_recents);
recentsButton.setColorFilter(accentColor);
recentsButton.setVisibility(View.VISIBLE);
recentsButton.setOnClickListener(v -> {
recentsButton.setColorFilter(accentColor);
recentsButton.setVisibility(View.VISIBLE);
recentsButton.setOnClickListener(v -> {
@@
-857,7
+857,7
@@
public class TaskbarService extends Service {
if(fullLength && U.getTaskbarPosition(this).contains("bottom")) {
try {
if(fullLength && U.getTaskbarPosition(this).contains("bottom")) {
try {
- Space whitespace =
U.findViewById(layout,
R.id.whitespace);
+ Space whitespace =
layout.findViewById(
R.id.whitespace);
ViewGroup.LayoutParams params2 = whitespace.getLayoutParams();
params2.height = maxScreenSize - recentsSize;
whitespace.setLayoutParams(params2);
ViewGroup.LayoutParams params2 = whitespace.getLayoutParams();
params2.height = maxScreenSize - recentsSize;
whitespace.setLayoutParams(params2);
@@
-871,7
+871,7
@@
public class TaskbarService extends Service {
if(fullLength && U.getTaskbarPosition(this).contains("right")) {
try {
if(fullLength && U.getTaskbarPosition(this).contains("right")) {
try {
- Space whitespace =
U.findViewById(layout,
R.id.whitespace);
+ Space whitespace =
layout.findViewById(
R.id.whitespace);
ViewGroup.LayoutParams params2 = whitespace.getLayoutParams();
params2.width = maxScreenSize - recentsSize;
whitespace.setLayoutParams(params2);
ViewGroup.LayoutParams params2 = whitespace.getLayoutParams();
params2.width = maxScreenSize - recentsSize;
whitespace.setLayoutParams(params2);
@@
-1177,8
+1177,8
@@
public class TaskbarService extends Service {
final AppEntry entry = list.get(position);
final SharedPreferences pref = U.getSharedPreferences(this);
final AppEntry entry = list.get(position);
final SharedPreferences pref = U.getSharedPreferences(this);
- ImageView imageView =
U.findViewById(convertView,
R.id.icon);
- ImageView imageView2 =
U.findViewById(convertView,
R.id.shortcut_icon);
+ ImageView imageView =
convertView.findViewById(
R.id.icon);
+ ImageView imageView2 =
convertView.findViewById(
R.id.shortcut_icon);
imageView.setImageDrawable(entry.getIcon(this));
imageView2.setBackgroundColor(pref.getInt("accent_color", getResources().getInteger(R.integer.translucent_white)));
imageView.setImageDrawable(entry.getIcon(this));
imageView2.setBackgroundColor(pref.getInt("accent_color", getResources().getInteger(R.integer.translucent_white)));
@@
-1198,7
+1198,7
@@
public class TaskbarService extends Service {
imageView2.setRotationY(180);
}
imageView2.setRotationY(180);
}
- FrameLayout layout =
U.findViewById(convertView,
R.id.entry);
+ FrameLayout layout =
convertView.findViewById(
R.id.entry);
layout.setOnClickListener(view -> U.launchApp(this, entry.getPackageName(), entry.getComponentName(), entry.getUserId(this), null, true, false));
layout.setOnLongClickListener(view -> {
layout.setOnClickListener(view -> U.launchApp(this, entry.getPackageName(), entry.getComponentName(), entry.getUserId(this), null, true, false));
layout.setOnLongClickListener(view -> {
diff --git
a/app/src/main/java/com/farmerbb/taskbar/util/U.java
b/app/src/main/java/com/farmerbb/taskbar/util/U.java
index
b960354
..
8c10cdc
100644
(file)
--- a/
app/src/main/java/com/farmerbb/taskbar/util/U.java
+++ b/
app/src/main/java/com/farmerbb/taskbar/util/U.java
@@
-17,7
+17,6
@@
package com.farmerbb.taskbar.util;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
-import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.AlertDialog;
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.AlertDialog;
@@
-55,7
+54,6
@@
import android.support.v7.view.ContextThemeWrapper;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Surface;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Surface;
-import android.view.View;
import android.view.WindowManager;
import android.widget.Toast;
import android.view.WindowManager;
import android.widget.Toast;
@@
-1322,16
+1320,6
@@
public class U {
|| (!isChromeOs(context) && getCurrentApiVersion() >= 28.0f));
}
|| (!isChromeOs(context) && getCurrentApiVersion() >= 28.0f));
}
- @SuppressWarnings("unchecked")
- public static <T extends View> T findViewById(Activity target, int id) {
- return (T) target.findViewById(id);
- }
-
- @SuppressWarnings("unchecked")
- public static <T extends View> T findViewById(View target, int id) {
- return (T) target.findViewById(id);
- }
-
public static boolean isPlayStoreInstalled(Context context) {
try {
context.getPackageManager().getPackageInfo("com.android.vending", 0);
public static boolean isPlayStoreInstalled(Context context) {
try {
context.getPackageManager().getPackageInfo("com.android.vending", 0);