android janitor... remove unnecessary imports, variables and casts
also no need to wrap primitives Change-Id: I6e22b2bfdb2b8b366dd6f50d995b573c770f0b5a
This commit is contained in:
@@ -28,8 +28,7 @@ public class ColorPaletteAdapter extends RecyclerView.Adapter<ColorPaletteAdapte
|
||||
@Override
|
||||
public ColorPaletteViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View item = LayoutInflater.from(mContext).inflate(R.layout.colorbox, parent, false);
|
||||
ColorPaletteViewHolder holder = new ColorPaletteViewHolder(item);
|
||||
return holder;
|
||||
return new ColorPaletteViewHolder(item);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -33,8 +33,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.
|
||||
@Override
|
||||
public ColorPickerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View item = LayoutInflater.from(mContext).inflate(R.layout.colorbox, parent, false);
|
||||
ColorPickerViewHolder holder = new ColorPickerViewHolder(item);
|
||||
return holder;
|
||||
return new ColorPickerViewHolder(item);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package org.libreoffice;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.support.design.widget.BottomSheetBehavior;
|
||||
@@ -249,7 +248,7 @@ public class FontController implements AdapterView.OnItemSelectedListener {
|
||||
}
|
||||
|
||||
private void setupColorPicker(){
|
||||
LinearLayout colorPickerLayout = (LinearLayout)mActivity.findViewById(R.id.toolbar_color_picker);
|
||||
LinearLayout colorPickerLayout = mActivity.findViewById(R.id.toolbar_color_picker);
|
||||
|
||||
RecyclerView recyclerView = colorPickerLayout.findViewById(R.id.fontColorView);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 11, GridLayoutManager.VERTICAL, true);
|
||||
|
@@ -16,7 +16,6 @@ import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.BottomSheetBehavior;
|
||||
import android.support.design.widget.Snackbar;
|
||||
|
@@ -13,7 +13,6 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.PointF;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import org.libreoffice.kit.Document;
|
||||
import org.mozilla.gecko.gfx.CairoImage;
|
||||
import org.mozilla.gecko.gfx.IntSize;
|
||||
|
||||
|
@@ -830,7 +830,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
|
||||
SharedPreferences defaultPrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
|
||||
viewMode = Integer.valueOf(defaultPrefs.getString(EXPLORER_VIEW_TYPE_KEY, ""+ GRID_VIEW));
|
||||
filterMode = Integer.valueOf(defaultPrefs.getString(FILTER_MODE_KEY , "-1"));
|
||||
showHiddenFiles = Boolean.valueOf(defaultPrefs.getBoolean(ENABLE_SHOW_HIDDEN_FILES_KEY, false));
|
||||
showHiddenFiles = defaultPrefs.getBoolean(ENABLE_SHOW_HIDDEN_FILES_KEY, false);
|
||||
|
||||
Intent i = this.getIntent();
|
||||
if (i.hasExtra(CURRENT_DIRECTORY_KEY)) {
|
||||
|
Reference in New Issue
Block a user