mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #5175 from nextcloud/rwEnhancements
UI enhancements to rich workspaces
This commit is contained in:
commit
b2a1245c6d
4 changed files with 18 additions and 9 deletions
|
@ -29,7 +29,10 @@ import android.app.Activity;
|
|||
import android.content.ContentValues;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Shader;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
@ -331,6 +334,16 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
|
||||
PreviewTextFragment.setText(headerViewHolder.headerText, text, null, activity, true, true);
|
||||
headerViewHolder.headerView.setOnClickListener(v -> ocFileListFragmentInterface.onHeaderClicked());
|
||||
|
||||
Shader myShader = new LinearGradient(0,
|
||||
400,
|
||||
0,
|
||||
300,
|
||||
Color.WHITE,
|
||||
Color.BLACK,
|
||||
Shader.TileMode.CLAMP);
|
||||
|
||||
headerViewHolder.headerText.getPaint().setShader(myShader);
|
||||
} else {
|
||||
OCFileListGridImageViewHolder gridViewHolder = (OCFileListGridImageViewHolder) holder;
|
||||
|
||||
|
|
|
@ -23,13 +23,11 @@ import android.app.Activity;
|
|||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -195,10 +193,8 @@ public abstract class PreviewTextFragment extends FileFragment implements Search
|
|||
.usePlugin(new AbstractMarkwonPlugin() {
|
||||
@Override
|
||||
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
||||
TextPaint textPaint = new TextPaint();
|
||||
textPaint.setColorFilter(new PorterDuffColorFilter(ThemeUtils.primaryColor(activity),
|
||||
PorterDuff.Mode.SRC_ATOP));
|
||||
builder.linkColor(ThemeUtils.primaryColor(activity, true));
|
||||
builder.headingBreakHeight(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/headerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="none">
|
||||
|
||||
|
@ -30,7 +30,6 @@
|
|||
android:id="@+id/headerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/min_list_item_size"
|
||||
android:padding="@dimen/standard_padding"
|
||||
android:textColor="@color/secondary_text_color" />
|
||||
android:textColor="@color/text_color" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/standard_padding"
|
||||
android:textIsSelectable="true"
|
||||
android:textColor="@color/text_color"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
|
|
Loading…
Reference in a new issue