updated l icons
improved compose screen
@ -3,7 +3,7 @@
|
||||
|
||||
<item
|
||||
android:id="@id/center"
|
||||
android:icon="@drawable/ic_action_mylocation"
|
||||
android:icon="@drawable/ic_action_my_location"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/center"/>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<item
|
||||
android:id="@id/center"
|
||||
android:icon="@drawable/ic_action_mylocation"
|
||||
android:icon="@drawable/ic_action_my_location"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/center"/>
|
||||
|
||||
|
@ -109,6 +109,7 @@ public interface Constants extends TwidereConstants {
|
||||
public static final int MENU_OPEN_WITH_ACCOUNT = R.id.open_with_account;
|
||||
public static final int MENU_ACCOUNTS = R.id.accounts;
|
||||
public static final int MENU_INVERSE_SELECTION = R.id.inverse_selection;
|
||||
public static final int MENU_EDIT_MEDIAS = R.id.edit_medias;
|
||||
|
||||
public static final int LINK_ID_STATUS = 1;
|
||||
public static final int LINK_ID_USER = 2;
|
||||
|
@ -100,6 +100,7 @@ import org.mariotaku.twidere.util.ParseUtils;
|
||||
import org.mariotaku.twidere.util.SharedPreferencesWrapper;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.util.TwidereValidator;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.util.accessor.ViewAccessor;
|
||||
import org.mariotaku.twidere.view.StatusTextCountView;
|
||||
import org.mariotaku.twidere.view.holder.StatusViewHolder;
|
||||
@ -222,11 +223,13 @@ public class ComposeActivity extends BaseSupportDialogActivity implements TextWa
|
||||
|
||||
public boolean handleMenuItem(final MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case MENU_TAKE_PHOTO: {
|
||||
case MENU_TAKE_PHOTO:
|
||||
case R.id.take_photo_sub_item: {
|
||||
takePhoto();
|
||||
break;
|
||||
}
|
||||
case MENU_ADD_IMAGE: {
|
||||
case MENU_ADD_IMAGE:
|
||||
case R.id.add_image_sub_item: {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT || !openDocument()) {
|
||||
pickImage();
|
||||
}
|
||||
@ -647,7 +650,10 @@ public class ComposeActivity extends BaseSupportDialogActivity implements TextWa
|
||||
final Intent composeExtensionsIntent = new Intent(INTENT_ACTION_EXTENSION_COMPOSE);
|
||||
addIntentToMenu(this, menu, composeExtensionsIntent, MENU_GROUP_COMPOSE_EXTENSION);
|
||||
final Intent imageExtensionsIntent = new Intent(INTENT_ACTION_EXTENSION_EDIT_IMAGE);
|
||||
addIntentToMenu(this, menu, imageExtensionsIntent, MENU_GROUP_IMAGE_EXTENSION);
|
||||
final MenuItem mediasMenuItem = menu.findItem(R.id.medias_menu);
|
||||
if (mediasMenuItem != null && mediasMenuItem.hasSubMenu()) {
|
||||
addIntentToMenu(this, mediasMenuItem.getSubMenu(), imageExtensionsIntent, MENU_GROUP_IMAGE_EXTENSION);
|
||||
}
|
||||
setMenu();
|
||||
updateAccountSelection();
|
||||
updateMediasPreview();
|
||||
@ -881,6 +887,10 @@ public class ComposeActivity extends BaseSupportDialogActivity implements TextWa
|
||||
return !mMediaPreviewAdapter.isEmpty();
|
||||
}
|
||||
|
||||
private int getMediaCount() {
|
||||
return mMediaPreviewAdapter.getCount();
|
||||
}
|
||||
|
||||
private boolean isQuotingProtectedStatus() {
|
||||
if (INTENT_ACTION_QUOTE.equals(getIntent().getAction()) && mInReplyToStatus != null)
|
||||
return mInReplyToStatus.user_is_protected && mInReplyToStatus.account_id != mInReplyToStatus.user_id;
|
||||
@ -936,29 +946,7 @@ public class ComposeActivity extends BaseSupportDialogActivity implements TextWa
|
||||
// iconAddImage.clearColorFilter();
|
||||
// }
|
||||
// }
|
||||
final MenuItem itemAttachLocation = menu.findItem(MENU_ADD_LOCATION);
|
||||
if (itemAttachLocation != null) {
|
||||
final boolean attachLocation = mPreferences.getBoolean(KEY_ATTACH_LOCATION, false);
|
||||
if (attachLocation && getLocation()) {
|
||||
itemAttachLocation.setChecked(true);
|
||||
} else {
|
||||
setProgressVisibility(false);
|
||||
mPreferences.edit().putBoolean(KEY_ATTACH_LOCATION, false).apply();
|
||||
itemAttachLocation.setChecked(false);
|
||||
}
|
||||
}
|
||||
final MenuItem viewItem = menu.findItem(MENU_VIEW);
|
||||
if (viewItem != null) {
|
||||
viewItem.setVisible(mInReplyToStatus != null);
|
||||
}
|
||||
menu.setGroupEnabled(MENU_GROUP_IMAGE_EXTENSION, hasMedia);
|
||||
menu.setGroupVisible(MENU_GROUP_IMAGE_EXTENSION, hasMedia);
|
||||
final MenuItem itemToggleSensitive = menu.findItem(MENU_TOGGLE_SENSITIVE);
|
||||
if (itemToggleSensitive != null) {
|
||||
itemToggleSensitive.setVisible(hasMedia);
|
||||
itemToggleSensitive.setEnabled(hasMedia);
|
||||
itemToggleSensitive.setChecked(hasMedia && mIsPossiblySensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean setComposeTitle(final Intent intent) {
|
||||
@ -995,8 +983,43 @@ public class ComposeActivity extends BaseSupportDialogActivity implements TextWa
|
||||
|
||||
private void setMenu() {
|
||||
if (mMenuBar == null) return;
|
||||
final Menu bottomMenu = mMenuBar.getMenu();
|
||||
setCommonMenu(bottomMenu);
|
||||
final Menu menu = mMenuBar.getMenu();
|
||||
final MenuItem itemAttachLocation = menu.findItem(MENU_ADD_LOCATION);
|
||||
if (itemAttachLocation != null) {
|
||||
final boolean attachLocation = mPreferences.getBoolean(KEY_ATTACH_LOCATION, false);
|
||||
if (attachLocation && getLocation()) {
|
||||
itemAttachLocation.setChecked(true);
|
||||
} else {
|
||||
setProgressVisibility(false);
|
||||
mPreferences.edit().putBoolean(KEY_ATTACH_LOCATION, false).apply();
|
||||
itemAttachLocation.setChecked(false);
|
||||
}
|
||||
}
|
||||
final MenuItem viewItem = menu.findItem(MENU_VIEW);
|
||||
if (viewItem != null) {
|
||||
viewItem.setVisible(mInReplyToStatus != null);
|
||||
}
|
||||
final boolean hasMedia = hasMedia(), hasInReplyTo = mInReplyToStatus != null;
|
||||
|
||||
/*
|
||||
* No media & Not reply: [Take photo][Add image][Attach location][Drafts]
|
||||
* Has media & Not reply: [Take photo][Medias menu][Attach location][Drafts]
|
||||
* Is reply: [Medias menu][View status][Attach location][Drafts]
|
||||
*/
|
||||
Utils.setMenuItemAvailability(menu, MENU_TAKE_PHOTO, !hasInReplyTo);
|
||||
Utils.setMenuItemAvailability(menu, R.id.take_photo_sub_item, hasInReplyTo);
|
||||
Utils.setMenuItemAvailability(menu, MENU_ADD_IMAGE, !hasMedia && !hasInReplyTo);
|
||||
Utils.setMenuItemAvailability(menu, MENU_VIEW, hasInReplyTo);
|
||||
Utils.setMenuItemAvailability(menu, R.id.medias_menu, hasMedia || hasInReplyTo);
|
||||
Utils.setMenuItemAvailability(menu, MENU_TOGGLE_SENSITIVE, hasMedia);
|
||||
Utils.setMenuItemAvailability(menu, MENU_EDIT_MEDIAS, hasMedia);
|
||||
|
||||
menu.setGroupEnabled(MENU_GROUP_IMAGE_EXTENSION, hasMedia);
|
||||
menu.setGroupVisible(MENU_GROUP_IMAGE_EXTENSION, hasMedia);
|
||||
final MenuItem itemToggleSensitive = menu.findItem(MENU_TOGGLE_SENSITIVE);
|
||||
if (itemToggleSensitive != null) {
|
||||
itemToggleSensitive.setChecked(hasMedia && mIsPossiblySensitive);
|
||||
}
|
||||
mMenuBar.show();
|
||||
}
|
||||
|
||||
|
@ -470,7 +470,7 @@ public class AccountsDrawerFragment extends BaseSupportListFragment implements L
|
||||
add(new OptionItem(R.string.accounts, R.drawable.ic_action_accounts, MENU_ACCOUNTS));
|
||||
add(new OptionItem(R.string.drafts, R.drawable.ic_action_draft, MENU_DRAFTS));
|
||||
add(new OptionItem(R.string.filters, R.drawable.ic_action_speaker_muted, MENU_FILTERS));
|
||||
add(new OptionItem(R.string.settings, R.drawable.ic_action_preferences, MENU_SETTINGS));
|
||||
add(new OptionItem(R.string.settings, R.drawable.ic_action_settings, MENU_SETTINGS));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class CustomTabUtils implements Constants {
|
||||
if (Utils.hasStaggeredTimeline()) {
|
||||
CUSTOM_TABS_CONFIGURATION_MAP.put(TAB_TYPE_STAGGERED_HOME_TIMELINE, new CustomTabConfiguration(
|
||||
StaggeredHomeTimelineFragment.class, R.string.staggered_home_timeline,
|
||||
R.drawable.ic_action_staggered, CustomTabConfiguration.ACCOUNT_OPTIONAL,
|
||||
R.drawable.ic_action_view_quilt, CustomTabConfiguration.ACCOUNT_OPTIONAL,
|
||||
CustomTabConfiguration.FIELD_TYPE_NONE, 11, false));
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ public class CustomTabUtils implements Constants {
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("message", R.drawable.ic_action_message);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("quote", R.drawable.ic_action_quote);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("search", R.drawable.ic_action_search);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("staggered", R.drawable.ic_action_staggered);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("staggered", R.drawable.ic_action_view_quilt);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("star", R.drawable.ic_action_star);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("trends", R.drawable.ic_action_trends);
|
||||
CUSTOM_TABS_ICON_NAME_MAP.put("twidere", R.drawable.ic_action_twidere);
|
||||
|
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 828 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 765 B |
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 719 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_action_import_export.png
Normal file
After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 182 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_action_more_horizontal.png
Normal file
After Width: | Height: | Size: 289 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_action_more_vertical.png
Normal file
After Width: | Height: | Size: 289 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_action_my_location.png
Normal file
After Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 376 B After Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 765 B |
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 542 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 813 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 841 B After Width: | Height: | Size: 836 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 508 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_action_view_quilt.png
Normal file
After Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 651 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 474 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_import_export.png
Normal file
After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 394 B |
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 149 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_more_horizontal.png
Normal file
After Width: | Height: | Size: 161 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_more_vertical.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_my_location.png
Normal file
After Width: | Height: | Size: 576 B |
Before Width: | Height: | Size: 375 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 439 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 488 B |
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 199 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 324 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_view_quilt.png
Normal file
After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 893 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 684 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 532 B |
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 438 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 890 B After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 760 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 1012 B |
BIN
twidere/src/main/res/drawable-xhdpi/ic_action_import_export.png
Normal file
After Width: | Height: | Size: 481 B |