Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

minor changes to toolbar style and other UI elements #2529

Merged
merged 7 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Features:
-

Improvements:
-
- Minor changes to toolbar style and other UI elements (#2529)

Other changes:
-
Expand Down
2 changes: 1 addition & 1 deletion vector/src/app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:label="@string/riot_app_name"
android:largeHeap="true"
android:logo="@drawable/logo"
android:theme="@style/AppTheme"
android:theme="@style/AppTheme.Light"
tools:replace="allowBackup,label">


Expand Down
2 changes: 1 addition & 1 deletion vector/src/appfdroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:label="@string/riot_app_name"
android:largeHeap="true"
android:logo="@drawable/logo"
android:theme="@style/AppTheme"
android:theme="@style/AppTheme.Light"
tools:replace="allowBackup,label">
<provider
android:name="im.vector.db.VectorContentProvider"
Expand Down
46 changes: 23 additions & 23 deletions vector/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
android:largeHeap="true"
android:logo="@drawable/logo"
android:resizeableActivity="false"
android:theme="@style/AppTheme"
android:theme="@style/AppTheme.Light"
tools:replace="allowBackup,label">

<!-- No limit for screen ratio: avoid black strips -->
Expand All @@ -116,7 +116,7 @@
<activity
android:name=".activity.LoginActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/LoginAppTheme"
android:theme="@style/LoginAppTheme.Light"
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -139,33 +139,33 @@
<activity
android:name=".activity.SplashActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.LoggingOutActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.VectorHomeActivity"
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_home"
android:theme="@style/HomeActivityTheme"
android:theme="@style/HomeActivityTheme.Light"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".activity.HistoricalRoomsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_historical"
android:parentActivityName=".activity.VectorHomeActivity"
android:theme="@style/HomeActivityTheme"
android:theme="@style/HomeActivityTheme.Light"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".activity.VectorRoomActivity"
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_room"
android:theme="@style/AppTheme.NoActionBar"
android:theme="@style/AppTheme.NoActionBar.Light"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activity.DeactivateAccountActivity"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.VectorRoomCreationActivity"
android:configChanges="orientation|screenSize"
Expand Down Expand Up @@ -203,7 +203,7 @@
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_member_details"
android:parentActivityName=".activity.VectorRoomActivity"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/AppTheme.NoActionBar.Light">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="im.vector.activity.VectorRoomActivity" />
Expand Down Expand Up @@ -238,7 +238,7 @@
<activity
android:name=".activity.VectorCallViewActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/CallActivityTheme" />
android:theme="@style/CallActivityTheme.Light" />
<activity
android:name=".activity.JitsiCallActivity"
android:configChanges="orientation|screenSize"
Expand All @@ -250,11 +250,11 @@
<activity
android:name=".activity.IntegrationManagerActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.StickerPickerActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.VectorMediasPickerActivity"
android:label="@string/media_picker_both_capture_title"
Expand Down Expand Up @@ -283,7 +283,7 @@
android:label="Vector searches"
android:launchMode="singleTop"
android:parentActivityName=".activity.VectorHomeActivity"
android:theme="@style/SearchesAppTheme"
android:theme="@style/SearchesAppTheme.Light"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
Expand All @@ -295,7 +295,7 @@
android:label="Vector searches"
android:launchMode="singleTop"
android:parentActivityName=".activity.VectorRoomDetailsActivity"
android:theme="@style/SearchesAppTheme"
android:theme="@style/SearchesAppTheme.Light"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
Expand All @@ -311,7 +311,7 @@
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_group_details"
android:launchMode="singleTop"
android:theme="@style/GroupAppTheme"
android:theme="@style/GroupAppTheme.Light"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".activity.VectorUniversalLinkActivity">
<intent-filter>
Expand Down Expand Up @@ -364,40 +364,40 @@
android:name=".activity.PhoneNumberAdditionActivity"
android:configChanges="orientation|screenSize"
android:label="@string/settings_add_phone_number"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.CountryPickerActivity"
android:configChanges="orientation|screenSize"
android:label="@string/settings_select_country"
android:theme="@style/CountryPickerTheme" />
android:theme="@style/CountryPickerTheme.Light" />
<activity
android:name=".activity.LanguagePickerActivity"
android:configChanges="orientation|screenSize"
android:label="@string/settings_select_language"
android:theme="@style/CountryPickerTheme" />
android:theme="@style/CountryPickerTheme.Light" />
<activity
android:name=".activity.RoomDirectoryPickerActivity"
android:configChanges="orientation|screenSize"
android:label="@string/select_room_directory"
android:theme="@style/DirectoryPickerTheme" />
android:theme="@style/DirectoryPickerTheme.Light" />
<activity
android:name=".activity.PhoneNumberVerificationActivity"
android:configChanges="orientation|screenSize"
android:label="@string/settings_phone_number_verification"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />
<activity
android:name=".activity.NotificationPrivacyActivity"
android:configChanges="orientation|screenSize"
android:label="@string/settings_notification_privacy"
android:theme="@style/CountryPickerTheme" />
android:theme="@style/CountryPickerTheme.Light" />
<activity
android:name=".activity.VectorWebViewActivity"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />

<activity
android:name="im.vector.activity.MediaPreviewerActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar.Light" />

<!-- broadcast receiver -->
<receiver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void updatePreview(final RoomMediaMessage roomMediaMessage) {
mPreviewerImageView.setVisibility(View.GONE);
mPreviewerVideoView.setVisibility(View.VISIBLE);
mPreviewerVideoView.setVideoURI(uri);
mPreviewerVideoView.seekTo(100);
mPreviewerVideoView.seekTo(0);
} else {
mPreviewerImageView.setVisibility(View.VISIBLE);
mPreviewerVideoView.setVisibility(View.GONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ abstract class VectorAppCompatActivity : AppCompatActivity() {
menuInflater.inflate(menuRes, menu)
ThemeUtils.tintMenuIcons(menu, ThemeUtils.getColor(this, getMenuTint()))
return true

}

return super.onCreateOptionsMenu(menu)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public int getMenuRes() {

@Override
public int getMenuTint() {
return R.attr.icon_tint_on_light_action_bar_color;
return R.attr.icon_tint_on_dark_action_bar_color;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,7 @@ public boolean onNavigationItemSelected(MenuItem menuItem) {
if (null != getSupportActionBar()) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(ThemeUtils.INSTANCE.tintDrawable(this,
ContextCompat.getDrawable(this, R.drawable.ic_material_menu_white), R.attr.primary_control_color));
getSupportActionBar().setHomeAsUpIndicator(ContextCompat.getDrawable(this, R.drawable.ic_material_menu_white));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void run() {
final SlidableMediaInfo mediaInfo = mMediasMessagesList.get(position);

if (mediaInfo.mMessageType.equals(Message.MSGTYPE_VIDEO)) {
final VideoView videoView = view.findViewById(R.id.media_slider_videoview);
final VideoView videoView = view.findViewById(R.id.media_slider_video_view);

if (mMediasCache.isMediaCached(mediaInfo.mMediaUrl, mediaInfo.mMimeType)) {
mMediasCache.createTmpDecryptedMediaFile(mediaInfo.mMediaUrl, mediaInfo.mMimeType, mediaInfo.mEncryptedFileInfo,
Expand Down Expand Up @@ -210,9 +210,9 @@ private void downloadVideo(final View view, final int position) {
* @param force true to do not check the auto playmode
*/
private void downloadVideo(final View view, final int position, boolean force) {
final VideoView videoView = view.findViewById(R.id.media_slider_videoview);
final VideoView videoView = view.findViewById(R.id.media_slider_video_view);
final ImageView thumbView = view.findViewById(R.id.media_slider_video_thumbnail);
final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_piechart);
final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_pie_view);
final View downloadFailedView = view.findViewById(R.id.media_download_failed);

final SlidableMediaInfo mediaInfo = mMediasMessagesList.get(position);
Expand Down Expand Up @@ -321,7 +321,7 @@ public void run() {
*/
private void downloadHighResImage(final View view, final int position) {
final WebView webView = view.findViewById(R.id.media_slider_image_webview);
final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_piechart);
final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_pie_view);
final View downloadFailedView = view.findViewById(R.id.media_download_failed);

final SlidableMediaInfo imageInfo = mMediasMessagesList.get(position);
Expand Down Expand Up @@ -412,13 +412,13 @@ public Object instantiateItem(final ViewGroup container, final int position) {
final View view = mLayoutInflater.inflate(R.layout.adapter_vector_medias_viewer, null, false);

// hide the pie chart
final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_piechart);
final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_pie_view);
pieFractionView.setVisibility(View.GONE);

view.findViewById(R.id.media_download_failed).setVisibility(View.GONE);

final WebView imageWebView = view.findViewById(R.id.media_slider_image_webview);
final View videoLayout = view.findViewById(R.id.media_slider_videolayout);
final View videoLayout = view.findViewById(R.id.media_slider_video_layout);
final ImageView thumbView = view.findViewById(R.id.media_slider_video_thumbnail);

imageWebView.getSettings().setDisplayZoomControls(false);
Expand Down Expand Up @@ -468,7 +468,7 @@ public boolean onLongClick(View v) {
int width = -1;
int height = -1;

// is the high picture already downloaded ?
// check if the high resolution picture is already downloaded
if (mMediasCache.isMediaCached(mediaUrl, mimeType)) {
if (mHighResMediaIndex.indexOf(position) < 0) {
mHighResMediaIndex.add(position);
Expand Down Expand Up @@ -553,9 +553,9 @@ public void destroyItem(ViewGroup container, int position, Object object) {
* @param display true to display the video thumbnail, false to display the video player
*/
private void displayVideoThumbnail(final View view, boolean display) {
final VideoView videoView = view.findViewById(R.id.media_slider_videoview);
final VideoView videoView = view.findViewById(R.id.media_slider_video_view);
final ImageView thumbView = view.findViewById(R.id.media_slider_video_thumbnail);
final ImageView playView = view.findViewById(R.id.media_slider_video_playView);
final ImageView playView = view.findViewById(R.id.media_slider_video_play);

videoView.setVisibility(display ? View.GONE : View.VISIBLE);
thumbView.setVisibility(display ? View.VISIBLE : View.GONE);
Expand Down Expand Up @@ -740,9 +740,9 @@ private void loadVideo(final int position,
final String videoUrl,
final String videoMimeType,
final EncryptedFileInfo encryptedFileInfo) {
final VideoView videoView = view.findViewById(R.id.media_slider_videoview);
final VideoView videoView = view.findViewById(R.id.media_slider_video_view);
final ImageView thumbView = view.findViewById(R.id.media_slider_video_thumbnail);
final ImageView playView = view.findViewById(R.id.media_slider_video_playView);
final ImageView playView = view.findViewById(R.id.media_slider_video_play);

displayVideoThumbnail(view, !videoView.isPlaying());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1340,10 +1340,7 @@ private void replaceQuoteSpans(Spannable spannable) {
int end = spannable.getSpanEnd(quoteSpan);
int flags = spannable.getSpanFlags(quoteSpan);
spannable.removeSpan(quoteSpan);
spannable.setSpan(new VectorQuoteSpan(mContext),
start,
end,
flags);
spannable.setSpan(new VectorQuoteSpan(mContext), start, end, flags);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ static void alignSubviewToAvatarView(View subView, View bodyLayoutView, View ava
subViewLinearLayout.gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL;

if (isMergedView) {
bodyLayout.setMargins(avatarLayout.width, bodyLayout.topMargin, 4, bodyLayout.bottomMargin);
bodyLayout.setMargins(avatarLayout.width, bodyLayout.topMargin, bodyLayout.rightMargin, bodyLayout.bottomMargin);
} else {
bodyLayout.setMargins(4, bodyLayout.topMargin, 4, bodyLayout.bottomMargin);
bodyLayout.setMargins(0, bodyLayout.topMargin, bodyLayout.rightMargin, bodyLayout.bottomMargin);
}
subView.setLayoutParams(bodyLayout);

Expand Down
4 changes: 1 addition & 3 deletions vector/src/main/java/im/vector/ui/VectorQuoteSpan.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ import im.vector.R
*
* Inspired from https://medium.com/@459631839/style-blockquotes-in-android-textviews-de8656057c3d
*/
class VectorQuoteSpan(context: Context) :
LeadingMarginSpan,
LineBackgroundSpan {
class VectorQuoteSpan(context: Context) : LeadingMarginSpan, LineBackgroundSpan {

private val backgroundColor = ContextCompat.getColor(context, R.color.quote_background_color)
private val stripeColor = ContextCompat.getColor(context, R.color.quote_strip_color)
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/java/im/vector/util/ThemeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ object ThemeUtils {
when (aTheme) {
THEME_DARK_VALUE -> VectorApp.getInstance().setTheme(R.style.AppTheme_Dark)
THEME_BLACK_VALUE -> VectorApp.getInstance().setTheme(R.style.AppTheme_Black)
else -> VectorApp.getInstance().setTheme(R.style.AppTheme)
else -> VectorApp.getInstance().setTheme(R.style.AppTheme_Light)
}

mColorByAttr.clear()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vector/src/main/res/drawable-xxhdpi/ic_material_play_circle.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_callview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="16"
android:src="@drawable/ic_material_call_end_black" />
android:src="@drawable/ic_material_call_end_grey" />

<!-- for further use: for now we cannot switch from audio to video -->
<ImageView
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_vector_room.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp">

<include layout="@layout/vector_message_action_bar_custo_layout" />
<include layout="@layout/vector_message_action_bar_custom_layout" />

</android.support.v7.widget.Toolbar>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
android:layout_width="@dimen/chat_avatar_size"
android:layout_height="@dimen/chat_avatar_size"
android:layout_alignLeft="@+id/messagesAdapter_image"
android:layout_margin="10dp"
android:src="@drawable/filetype_image" />

<!-- the upload fails -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
android:id="@+id/matrix_only_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/list_header_background_color"
android:paddingLeft="10dp">
android:background="?attr/list_header_background_color">

<CheckBox
android:id="@+id/matrix_only_filter_checkbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/matrix_only_filter"
android:textColor="?attr/riot_primary_text_color"
android:theme="@style/CheckBoxTheme" />
Expand Down
Loading