Lint
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package i2p.bote.android;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import i2p.bote.android.util.LocaleManager;
|
||||
|
||||
@SuppressLint("Registered")
|
||||
public class BoteActivityBase extends AppCompatActivity {
|
||||
private final LocaleManager localeManager = new LocaleManager();
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ public class SetPasswordActivity extends BoteActivityBase implements
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
// Enable ActionBar app icon to behave as action to go back
|
||||
//noinspection ConstantConditions
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ public class SettingsActivity extends BoteActivityBase implements
|
||||
// Set the action bar
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
//noinspection ConstantConditions
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
Fragment fragment;
|
||||
@@ -98,6 +99,7 @@ public class SettingsActivity extends BoteActivityBase implements
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
//noinspection ConstantConditions
|
||||
((SettingsActivity) getActivity()).getSupportActionBar().setTitle(R.string.action_settings);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,6 @@
|
||||
|
||||
package org.sufficientlysecure.htmltextview;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.Html;
|
||||
import android.text.Layout;
|
||||
@@ -31,12 +27,16 @@ import android.text.style.LeadingMarginSpan;
|
||||
import android.text.style.TypefaceSpan;
|
||||
import android.util.Log;
|
||||
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* Some parts of this code are based on android.text.Html
|
||||
*/
|
||||
public class HtmlTagHandler implements Html.TagHandler {
|
||||
private int mListItemCount = 0;
|
||||
private Vector<String> mListParents = new Vector<String>();
|
||||
private Vector<String> mListParents = new Vector<>();
|
||||
|
||||
private static class Code {
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class UrlImageGetter implements ImageGetter {
|
||||
@Override
|
||||
protected void onPostExecute(Drawable result) {
|
||||
// set the correct bound according to the result from HTTP call
|
||||
urlDrawable.setBounds(0, 0, 0 + result.getIntrinsicWidth(), 0 + result.getIntrinsicHeight());
|
||||
urlDrawable.setBounds(0, 0, result.getIntrinsicWidth(), result.getIntrinsicHeight());
|
||||
|
||||
// change the reference of the current drawable to the result from the HTTP call
|
||||
urlDrawable.drawable = result;
|
||||
@@ -94,7 +94,7 @@ public class UrlImageGetter implements ImageGetter {
|
||||
try {
|
||||
InputStream is = fetch(urlString);
|
||||
Drawable drawable = Drawable.createFromStream(is, "src");
|
||||
drawable.setBounds(0, 0, 0 + drawable.getIntrinsicWidth(), 0 + drawable.getIntrinsicHeight());
|
||||
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
|
||||
return drawable;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
|
||||
@@ -1,33 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
<i2p.bote.android.widget.LoadingRecyclerView
|
||||
android:id="@+id/identities_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<i2p.bote.android.widget.LoadingRecyclerView
|
||||
android:id="@+id/identities_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.pnikosis.materialishprogress.ProgressWheel
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
app:matProg_barColor="@color/accent"
|
||||
app:matProg_progressIndeterminate="true"/>
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
<com.pnikosis.materialishprogress.ProgressWheel
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
app:matProg_barColor="@color/accent"
|
||||
app:matProg_progressIndeterminate="true"/>
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user