diff --git a/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index 1486849306..7bf1148cc4 100644 --- a/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -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 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; diff --git a/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java b/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java index dd6de898fb..1c6d3d8d31 100644 --- a/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java +++ b/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java @@ -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 diff --git a/src/main/res/layout/list_header.xml b/src/main/res/layout/list_header.xml index bf04533383..bd742d6631 100644 --- a/src/main/res/layout/list_header.xml +++ b/src/main/res/layout/list_header.xml @@ -21,8 +21,8 @@ @@ -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" /> diff --git a/src/main/res/layout/text_file_preview.xml b/src/main/res/layout/text_file_preview.xml index f2def74f97..8c3b046e09 100644 --- a/src/main/res/layout/text_file_preview.xml +++ b/src/main/res/layout/text_file_preview.xml @@ -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" />