diff --git a/twidere/src/main/AndroidManifest.xml b/twidere/src/main/AndroidManifest.xml index 804970bc7..e769736d2 100644 --- a/twidere/src/main/AndroidManifest.xml +++ b/twidere/src/main/AndroidManifest.xml @@ -2,7 +2,8 @@ + android:installLocation="auto" + > diff --git a/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsAdapter.java b/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsAdapter.java index 399212afc..020167d77 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsAdapter.java +++ b/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsAdapter.java @@ -72,7 +72,7 @@ public class AccountsAdapter extends SimpleDragSortCursorAdapter implements Cons mImageLoader.displayProfileImage(holder.profile_image, cursor.getString(mIndices.profile_image_url)); } else { mImageLoader.cancelDisplayTask(holder.profile_image); - holder.profile_image.setImageResource(R.drawable.ic_profile_image_default); +// holder.profile_image.setImageResource(R.drawable.ic_profile_image_default); } final boolean isMultipleChoice = mChoiceMode == ListView.CHOICE_MODE_MULTIPLE || mChoiceMode == ListView.CHOICE_MODE_MULTIPLE_MODAL; diff --git a/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsSpinnerAdapter.java b/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsSpinnerAdapter.java index 6d13cbc75..94cc9c901 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsSpinnerAdapter.java +++ b/twidere/src/main/java/org/mariotaku/twidere/adapter/AccountsSpinnerAdapter.java @@ -95,7 +95,7 @@ public class AccountsSpinnerAdapter extends ArrayAdapter { mImageLoader.displayProfileImage(icon, item.profile_image_url); } else { mImageLoader.cancelDisplayTask(icon); - icon.setImageResource(R.drawable.ic_profile_image_default); +// icon.setImageResource(R.drawable.ic_profile_image_default); } } } else if (text1 != null) { diff --git a/twidere/src/main/java/org/mariotaku/twidere/adapter/UserHashtagAutoCompleteAdapter.java b/twidere/src/main/java/org/mariotaku/twidere/adapter/UserHashtagAutoCompleteAdapter.java index 8dadcab37..4a016628c 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/adapter/UserHashtagAutoCompleteAdapter.java +++ b/twidere/src/main/java/org/mariotaku/twidere/adapter/UserHashtagAutoCompleteAdapter.java @@ -115,7 +115,7 @@ public class UserHashtagAutoCompleteAdapter extends SimpleCursorAdapter implemen final String profile_image_url_string = cursor.getString(mProfileImageUrlIdx); mProfileImageLoader.displayProfileImage(icon, profile_image_url_string); } else { - icon.setImageResource(R.drawable.ic_profile_image_default); +// icon.setImageResource(R.drawable.ic_profile_image_default); } } else { icon.setImageResource(R.drawable.ic_action_hashtag); diff --git a/twidere/src/main/java/org/mariotaku/twidere/preference/AccountsListPreference.java b/twidere/src/main/java/org/mariotaku/twidere/preference/AccountsListPreference.java index 9c65e50b3..9493f87ce 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/preference/AccountsListPreference.java +++ b/twidere/src/main/java/org/mariotaku/twidere/preference/AccountsListPreference.java @@ -131,7 +131,7 @@ public abstract class AccountsListPreference extends PreferenceCategory implemen @Override public void onLoadingCancelled(final String imageUri, final View view) { - setIcon(R.drawable.ic_profile_image_default); +// setIcon(R.drawable.ic_profile_image_default); } @Override @@ -142,12 +142,12 @@ public abstract class AccountsListPreference extends PreferenceCategory implemen @Override public void onLoadingFailed(final String imageUri, final View view, final FailReason failReason) { - setIcon(R.drawable.ic_profile_image_default); +// setIcon(R.drawable.ic_profile_image_default); } @Override public void onLoadingStarted(final String imageUri, final View view) { - setIcon(R.drawable.ic_profile_image_default); +// setIcon(R.drawable.ic_profile_image_default); } @Override @@ -160,7 +160,7 @@ public abstract class AccountsListPreference extends PreferenceCategory implemen super.onAttachedToHierarchy(preferenceManager); setTitle(mAccount.name); setSummary(String.format("@%s", mAccount.screen_name)); - setIcon(R.drawable.ic_profile_image_default); +// setIcon(R.drawable.ic_profile_image_default); mImageLoader.loadProfileImage(mAccount.profile_image_url, this); } diff --git a/twidere/src/main/java/org/mariotaku/twidere/provider/TwidereDataProvider.java b/twidere/src/main/java/org/mariotaku/twidere/provider/TwidereDataProvider.java index 80faca0a1..6f8702688 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/provider/TwidereDataProvider.java +++ b/twidere/src/main/java/org/mariotaku/twidere/provider/TwidereDataProvider.java @@ -1023,8 +1023,7 @@ public final class TwidereDataProvider extends ContentProvider implements Consta final Bitmap profile_image = profile_image_file != null && profile_image_file.isFile() ? BitmapFactory .decodeFile(profile_image_file.getPath()) : null; if (profile_image != null) return Bitmap.createScaledBitmap(profile_image, w, h, true); - return Bitmap.createScaledBitmap(BitmapFactory.decodeResource(res, R.drawable.ic_profile_image_default), w, h, - true); + return Bitmap.createScaledBitmap(BitmapFactory.decodeResource(res, R.mipmap.ic_launcher), w, h, true); } private int getSendersCount(final List items) { diff --git a/twidere/src/main/java/org/mariotaku/twidere/util/MediaLoaderWrapper.java b/twidere/src/main/java/org/mariotaku/twidere/util/MediaLoaderWrapper.java index 43cc36263..45aec5980 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/util/MediaLoaderWrapper.java +++ b/twidere/src/main/java/org/mariotaku/twidere/util/MediaLoaderWrapper.java @@ -51,17 +51,17 @@ public class MediaLoaderWrapper implements Constants { final DisplayImageOptions.Builder profileOptsBuilder = new DisplayImageOptions.Builder(); profileOptsBuilder.cacheInMemory(true); profileOptsBuilder.cacheOnDisk(true); - profileOptsBuilder.showImageForEmptyUri(R.drawable.ic_profile_image_default); - profileOptsBuilder.showImageOnFail(R.drawable.ic_profile_image_default); - profileOptsBuilder.showImageOnLoading(R.drawable.ic_profile_image_default); +// profileOptsBuilder.showImageForEmptyUri(R.drawable.ic_profile_image_default); +// profileOptsBuilder.showImageOnFail(R.drawable.ic_profile_image_default); +// profileOptsBuilder.showImageOnLoading(R.drawable.ic_profile_image_default); profileOptsBuilder.bitmapConfig(Bitmap.Config.ARGB_8888); profileOptsBuilder.resetViewBeforeLoading(true); final DisplayImageOptions.Builder ovalProfileOptsBuilder = new DisplayImageOptions.Builder(); ovalProfileOptsBuilder.cacheInMemory(true); ovalProfileOptsBuilder.cacheOnDisk(true); - ovalProfileOptsBuilder.showImageForEmptyUri(R.drawable.ic_profile_image_default); - ovalProfileOptsBuilder.showImageOnFail(R.drawable.ic_profile_image_default); - ovalProfileOptsBuilder.showImageOnLoading(R.drawable.ic_profile_image_default); +// ovalProfileOptsBuilder.showImageForEmptyUri(R.drawable.ic_profile_image_default); +// ovalProfileOptsBuilder.showImageOnFail(R.drawable.ic_profile_image_default); +// ovalProfileOptsBuilder.showImageOnLoading(R.drawable.ic_profile_image_default); ovalProfileOptsBuilder.bitmapConfig(Bitmap.Config.ARGB_8888); ovalProfileOptsBuilder.displayer(new OvalBitmapDisplayer()); ovalProfileOptsBuilder.resetViewBeforeLoading(true); diff --git a/twidere/src/main/res/drawable-hdpi/ic_profile_image_default.png b/twidere/src/main/res/drawable-hdpi/ic_profile_image_default.png deleted file mode 100644 index b181ec093..000000000 Binary files a/twidere/src/main/res/drawable-hdpi/ic_profile_image_default.png and /dev/null differ diff --git a/twidere/src/main/res/drawable-mdpi/ic_profile_image_default.png b/twidere/src/main/res/drawable-mdpi/ic_profile_image_default.png deleted file mode 100644 index d20e66ba0..000000000 Binary files a/twidere/src/main/res/drawable-mdpi/ic_profile_image_default.png and /dev/null differ diff --git a/twidere/src/main/res/drawable-xhdpi/ic_profile_image_default.png b/twidere/src/main/res/drawable-xhdpi/ic_profile_image_default.png deleted file mode 100644 index 7b7c0f10f..000000000 Binary files a/twidere/src/main/res/drawable-xhdpi/ic_profile_image_default.png and /dev/null differ diff --git a/twidere/src/main/res/drawable-xxhdpi/ic_profile_image_default.png b/twidere/src/main/res/drawable-xxhdpi/ic_profile_image_default.png deleted file mode 100644 index c46baab8b..000000000 Binary files a/twidere/src/main/res/drawable-xxhdpi/ic_profile_image_default.png and /dev/null differ diff --git a/twidere/src/main/res/layout/activity_compose_bottombar.xml b/twidere/src/main/res/layout/activity_compose_bottombar.xml index 1dc384f09..f76ba9f01 100644 --- a/twidere/src/main/res/layout/activity_compose_bottombar.xml +++ b/twidere/src/main/res/layout/activity_compose_bottombar.xml @@ -29,7 +29,7 @@ android:orientation="horizontal" android:showDividers="middle" xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools"> + > + app:sivBorderWidth="@dimen/line_width_compose_account_profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + tools:text="@string/sample_status_text" + tools:textSize="12sp"/> \ No newline at end of file diff --git a/twidere/src/main/res/layout/card_item_activity_summary_compact.xml b/twidere/src/main/res/layout/card_item_activity_summary_compact.xml index c551ee690..b732f96bb 100644 --- a/twidere/src/main/res/layout/card_item_activity_summary_compact.xml +++ b/twidere/src/main/res/layout/card_item_activity_summary_compact.xml @@ -52,8 +52,7 @@ android:layout_width="@dimen/profile_image_size_activity_small" android:layout_height="@dimen/profile_image_size_activity_small" android:layout_margin="2dp" - android:contentDescription="@string/profile_image" - tools:src="@drawable/ic_profile_image_default"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:layout_margin="@dimen/element_spacing_normal"/> \ No newline at end of file diff --git a/twidere/src/main/res/layout/header_status_common.xml b/twidere/src/main/res/layout/header_status_common.xml index 48fafe071..63c143004 100644 --- a/twidere/src/main/res/layout/header_status_common.xml +++ b/twidere/src/main/res/layout/header_status_common.xml @@ -73,8 +73,7 @@ android:contentDescription="@string/profile_image" android:scaleType="centerCrop" app:sivBorder="true" - app:sivBorderWidth="1dp" - tools:src="@drawable/ic_profile_image_default"/> + app:sivBorderWidth="1dp"/> + android:contentDescription="@string/profile_image"/> + android:contentDescription="@string/profile_image"/> + android:scaleType="centerCrop"/> + android:scaleType="centerCrop"/> + android:scaleType="fitCenter"/> \ No newline at end of file diff --git a/twidere/src/main/res/layout/spinner_item_account_icon.xml b/twidere/src/main/res/layout/spinner_item_account_icon.xml index f90895654..c2f9fb38c 100644 --- a/twidere/src/main/res/layout/spinner_item_account_icon.xml +++ b/twidere/src/main/res/layout/spinner_item_account_icon.xml @@ -33,7 +33,6 @@ android:layout_height="match_parent" android:layout_gravity="center" android:contentDescription="@string/profile_image" - android:scaleType="centerCrop" - tools:src="@drawable/ic_profile_image_default"/> + android:scaleType="centerCrop"/> \ No newline at end of file diff --git a/twidere/src/main/res/values/styles.xml b/twidere/src/main/res/values/styles.xml index acadf088e..edb283305 100644 --- a/twidere/src/main/res/values/styles.xml +++ b/twidere/src/main/res/values/styles.xml @@ -119,12 +119,14 @@ centerCrop 1dp 10%p + ?android:colorBackground