bug fix, code cleanup, drawable fix, style fix
This commit is contained in:
parent
3ffdfd96aa
commit
a498ec369f
|
@ -1,5 +1,6 @@
|
|||
package org.nuclearfog.twidda.backend.api.update;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
@ -125,15 +126,17 @@ public class ProfileUpdate {
|
|||
}
|
||||
|
||||
/**
|
||||
* initialize inputstreams of the image files
|
||||
* initialize input streams of the image files
|
||||
* streams must be closed calling {@link #close()}
|
||||
*
|
||||
* @return true if initialization finished without any error
|
||||
*/
|
||||
@SuppressLint("Recycle")
|
||||
public boolean prepare(ContentResolver resolver) {
|
||||
try {
|
||||
for (int i = 0; i < imageUrls.length; i++) {
|
||||
if (imageUrls[i] != null) {
|
||||
InputStream profileImgStream = resolver.openInputStream(imageUrls[i]);
|
||||
InputStream profileImgStream = resolver.openInputStream(imageUrls[i]);
|
||||
if (profileImgStream != null && profileImgStream.available() > 0) {
|
||||
this.imageStreams[i] = profileImgStream;
|
||||
} else {
|
||||
|
|
|
@ -100,6 +100,8 @@ public class UsersActivity extends AppCompatActivity implements OnTabSelectedLis
|
|||
private Toolbar toolbar;
|
||||
private TabLayout tablayout;
|
||||
|
||||
private int mode;
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
super.attachBaseContext(AppStyles.setFontScale(newBase));
|
||||
|
@ -120,7 +122,7 @@ public class UsersActivity extends AppCompatActivity implements OnTabSelectedLis
|
|||
|
||||
settings = GlobalSettings.getInstance(this);
|
||||
|
||||
int mode = getIntent().getIntExtra(KEY_USERDETAIL_MODE, 0);
|
||||
mode = getIntent().getIntExtra(KEY_USERDETAIL_MODE, 0);
|
||||
long id = getIntent().getLongExtra(KEY_USERDETAIL_ID, -1);
|
||||
|
||||
switch (mode) {
|
||||
|
@ -178,7 +180,6 @@ public class UsersActivity extends AppCompatActivity implements OnTabSelectedLis
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(@NonNull Menu m) {
|
||||
int mode = getIntent().getIntExtra(KEY_USERDETAIL_MODE, 0);
|
||||
if (mode == USERLIST_EXCLUDED_USERS) {
|
||||
getMenuInflater().inflate(R.menu.excludelist, m);
|
||||
MenuItem search = m.findItem(R.id.menu_exclude_user);
|
||||
|
@ -195,15 +196,18 @@ public class UsersActivity extends AppCompatActivity implements OnTabSelectedLis
|
|||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu m) {
|
||||
SearchView searchView = (SearchView) m.findItem(R.id.menu_exclude_user).getActionView();
|
||||
if (tablayout.getSelectedTabPosition() == 0) {
|
||||
String hint = getString(R.string.menu_hint_mute_user);
|
||||
searchView.setQueryHint(hint);
|
||||
} else if (tablayout.getSelectedTabPosition() == 1) {
|
||||
String hint = getString(R.string.menu_hint_block_user);
|
||||
searchView.setQueryHint(hint);
|
||||
if (mode == USERLIST_EXCLUDED_USERS) {
|
||||
SearchView searchView = (SearchView) m.findItem(R.id.menu_exclude_user).getActionView();
|
||||
if (tablayout.getSelectedTabPosition() == 0) {
|
||||
String hint = getString(R.string.menu_hint_mute_user);
|
||||
searchView.setQueryHint(hint);
|
||||
} else if (tablayout.getSelectedTabPosition() == 1) {
|
||||
String hint = getString(R.string.menu_hint_block_user);
|
||||
searchView.setQueryHint(hint);
|
||||
}
|
||||
return super.onPrepareOptionsMenu(m);
|
||||
}
|
||||
return super.onPrepareOptionsMenu(m);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="328dp"
|
||||
android:height="328dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="328"
|
||||
android:viewportHeight="328">
|
||||
<path
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="328dp"
|
||||
android:height="328dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="328"
|
||||
android:viewportHeight="328">
|
||||
<path
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
android:viewportWidth="12000"
|
||||
android:width="120dp">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h12000v4000h-12000z" />
|
||||
<path
|
||||
android:fillColor="#111111"
|
||||
android:fillType="evenOdd"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
android:viewportWidth="4000"
|
||||
android:width="40dp">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h4000v4000h-4000z" />
|
||||
<path
|
||||
android:fillColor="#111111"
|
||||
android:fillType="evenOdd"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/half_transparent"
|
||||
tools:context=".ui.activities.ImageViewer">
|
||||
|
||||
<org.nuclearfog.zoomview.ZoomView
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/metrics_scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/half_transparent"
|
||||
tools:context=".ui.activities.VideoViewer">
|
||||
|
||||
<VideoView
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
<!--dimens of item_tweet.xml-->
|
||||
<dimen name="tweetitem_profile_size">36sp</dimen>
|
||||
<dimen name="tweetitem_layout_padding">5dp</dimen>
|
||||
<dimen name="tweetitem_layout_margin">5dp</dimen>
|
||||
<dimen name="tweetitem_text_margin">5dp</dimen>
|
||||
<dimen name="tweetitem_drawable_margin">5dp</dimen>
|
||||
<dimen name="tweetitem_textsize_button">12sp</dimen>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFA500</color>
|
||||
</resources>
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
<style name="Transparency" parent="AppTheme">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackground">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="TransparencyDim" parent="Transparency">
|
||||
|
|
Loading…
Reference in New Issue