-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fixes #171 Fix Lint errors/warnings: global, coding style: add missing spaces #1955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e2c9c1c
a3aa573
c5b6979
145b0f2
484aac2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -60,15 +60,15 @@ public Object instantiateItem(ViewGroup container, int position) { | |||||
this.container=container; | ||||||
LayoutInflater inflater = LayoutInflater.from(container.getContext()); | ||||||
ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false); | ||||||
if( BuildConfig.FLAVOR == "beta"){ | ||||||
if (BuildConfig.FLAVOR == "beta") { | ||||||
TextView textView = layout.findViewById(R.id.welcomeYesButton); | ||||||
if( textView.getVisibility() != View.VISIBLE){ | ||||||
if (textView.getVisibility() != View.VISIBLE) { | ||||||
textView.setVisibility(View.VISIBLE); | ||||||
} | ||||||
ViewHolder holder = new ViewHolder(layout); | ||||||
layout.setTag(holder); | ||||||
|
||||||
if(position == PAGE_FINAL){ | ||||||
if (position == PAGE_FINAL){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TextView moreInfo = layout.findViewById(R.id.welcomeInfo); | ||||||
moreInfo.setText(Html.fromHtml(WelcomeActivity.moreInformation)); | ||||||
ViewHolder holder1 = new ViewHolder(layout); | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,7 +19,7 @@ public class BitmapUtils { | |||||
*/ | ||||||
public static BitmapDrawable writeOnDrawable(Bitmap bm, String text, Context context){ | ||||||
Bitmap.Config config = bm.getConfig(); | ||||||
if(config == null){ | ||||||
if (config == null){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
config = Bitmap.Config.ARGB_8888; | ||||||
} | ||||||
Bitmap bitmap = Bitmap.createBitmap(bm.getWidth(),bm.getHeight(),config); | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,4 @@ public String getUser() { | |
public int getImagesEditedBySomeoneElse() { | ||
return imagesEditedBySomeoneElse; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -139,7 +139,7 @@ public void onCreate(Bundle savedInstanceState) { | |||||
.setNegativeButton(R.string.no, (dialog, which) -> dialog.cancel()) | ||||||
.show()); | ||||||
|
||||||
if(BuildConfig.FLAVOR.equals("beta")){ | ||||||
if (BuildConfig.FLAVOR.equals("beta")){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
loginCredentials.setText(getString(R.string.login_credential)); | ||||||
} else { | ||||||
loginCredentials.setVisibility(View.GONE); | ||||||
|
@@ -381,10 +381,10 @@ protected void onRestoreInstanceState(Bundle savedInstanceState) { | |||||
super.onRestoreInstanceState(savedInstanceState); | ||||||
loginCurrentlyInProgress = savedInstanceState.getBoolean(LOGING_IN, false); | ||||||
errorMessageShown = savedInstanceState.getBoolean(ERROR_MESSAGE_SHOWN, false); | ||||||
if(loginCurrentlyInProgress){ | ||||||
if (loginCurrentlyInProgress){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
performLogin(); | ||||||
} | ||||||
if(errorMessageShown){ | ||||||
if (errorMessageShown){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
resultantError = savedInstanceState.getString(RESULTANT_ERROR); | ||||||
handleOtherResults(resultantError); | ||||||
} | ||||||
|
@@ -399,7 +399,7 @@ public void askUserForTwoFactorAuth() { | |||||
|
||||||
public void showMessageAndCancelDialog(@StringRes int resId) { | ||||||
showMessage(resId, R.color.secondaryDarkColor); | ||||||
if(progressDialog != null){ | ||||||
if (progressDialog != null){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
progressDialog.cancel(); | ||||||
} | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,4 +93,4 @@ public void setContentUri(Uri contentUri) { | |
this.contentUri = contentUri; | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,4 +109,4 @@ private void setAuthorView(Media item, TextView author) { | |
author.setVisibility(View.GONE); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -73,7 +73,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle sav | |||||
categoryName = getArguments().getString("categoryName"); | ||||||
isParentCategory = getArguments().getBoolean("isParentCategory"); | ||||||
initSubCategoryList(); | ||||||
if(getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){ | ||||||
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
categoriesRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); | ||||||
} | ||||||
else{ | ||||||
|
@@ -91,7 +91,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle sav | |||||
*/ | ||||||
public void initSubCategoryList() { | ||||||
categoriesNotFoundView.setVisibility(GONE); | ||||||
if(!NetworkUtils.isInternetConnectionEstablished(getContext())) { | ||||||
if (!NetworkUtils.isInternetConnectionEstablished(getContext())) { | ||||||
handleNoInternet(); | ||||||
return; | ||||||
} | ||||||
|
@@ -118,7 +118,7 @@ public void initSubCategoryList() { | |||||
* @param subCategoryList | ||||||
*/ | ||||||
private void handleSuccess(List<String> subCategoryList) { | ||||||
if(subCategoryList == null || subCategoryList.isEmpty()) { | ||||||
if (subCategoryList == null || subCategoryList.isEmpty()) { | ||||||
initEmptyView(); | ||||||
} | ||||||
else { | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,4 +121,4 @@ public ThreadPoolService build() { | |
return new ThreadPoolService(this); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -147,12 +147,12 @@ protected void onCreate(Bundle savedInstanceState) { | |||||
setTitle(getString(R.string.title_activity_contributions)); | ||||||
|
||||||
|
||||||
if(checkAccount()) { | ||||||
if (checkAccount()) { | ||||||
new QuizChecker(this, | ||||||
sessionManager.getCurrentAccount().name, | ||||||
mediaWikiApi); | ||||||
} | ||||||
if(!BuildConfig.FLAVOR.equalsIgnoreCase("beta")){ | ||||||
if (!BuildConfig.FLAVOR.equalsIgnoreCase("beta")){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
setUploadCount(); | ||||||
} | ||||||
|
||||||
|
@@ -256,7 +256,7 @@ public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) { | |||||
((CursorAdapter) contributionsList.getAdapter()).swapCursor(cursor); | ||||||
} | ||||||
|
||||||
if(contributionsList.getAdapter().getCount()>0){ | ||||||
if (contributionsList.getAdapter().getCount()>0){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
contributionsList.changeEmptyScreen(false); | ||||||
} | ||||||
contributionsList.clearSyncMessage(); | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -93,7 +93,7 @@ public ListAdapter getAdapter() { | |||||
public void setAdapter(ListAdapter adapter) { | ||||||
this.contributionsList.setAdapter(adapter); | ||||||
|
||||||
if(BuildConfig.FLAVOR.equalsIgnoreCase("beta")){ | ||||||
if (BuildConfig.FLAVOR.equalsIgnoreCase("beta")){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
((ContributionsActivity) getActivity()).betaSetUploadCount(adapter.getCount()); | ||||||
} | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,4 +90,4 @@ public static ApplicationlessInjection getInstance(Context applicationContext) { | |
return instance; | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,4 @@ private void inject() { | |
activityInjector.inject(this); | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ private void inject(Context context) { | |
serviceInjector.inject(this); | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ private void inject() { | |
serviceInjector.inject(this); | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ private void inject() { | |
serviceInjector.inject(this); | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ private void inject() { | |
serviceInjector.inject(this); | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -95,7 +95,7 @@ private void saveQuery(String query) { | |||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { | ||||||
View rootView = inflater.inflate(R.layout.fragment_browse_image, container, false); | ||||||
ButterKnife.bind(this, rootView); | ||||||
if(getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){ | ||||||
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
categoriesRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); | ||||||
} | ||||||
else{ | ||||||
|
@@ -124,7 +124,7 @@ public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |||||
public void updateCategoryList(String query) { | ||||||
this.query = query; | ||||||
categoriesNotFoundView.setVisibility(GONE); | ||||||
if(!NetworkUtils.isInternetConnectionEstablished(getContext())) { | ||||||
if (!NetworkUtils.isInternetConnectionEstablished(getContext())) { | ||||||
handleNoInternet(); | ||||||
return; | ||||||
} | ||||||
|
@@ -173,7 +173,7 @@ private void handlePaginationSuccess(List<String> mediaList) { | |||||
*/ | ||||||
private void handleSuccess(List<String> mediaList) { | ||||||
queryList = mediaList; | ||||||
if(mediaList == null || mediaList.isEmpty()) { | ||||||
if (mediaList == null || mediaList.isEmpty()) { | ||||||
initErrorView(); | ||||||
} | ||||||
else { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.