Change Markdown text style. Reduce the sensitivity of sliding right to go back from ViewPostDetailActivity to prevent go back when sliding tables.

This commit is contained in:
Alex Ning 2019-12-27 14:44:16 +08:00
parent 5bf1d342f6
commit aefc828036
3 changed files with 7 additions and 11 deletions

View File

@ -37,6 +37,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.livefront.bridge.Bridge; import com.livefront.bridge.Bridge;
import com.r0adkll.slidr.Slidr; import com.r0adkll.slidr.Slidr;
import com.r0adkll.slidr.model.SlidrConfig;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
@ -192,7 +193,8 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) {
Slidr.attach(this); SlidrConfig config = new SlidrConfig.Builder().sensitivity(0.1f).build();
Slidr.attach(this, config);
} }
Resources resources = getResources(); Resources resources = getResources();

View File

@ -1,15 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/text" android:id="@+id/text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="16dip" android:layout_marginLeft="16dp"
android:layout_marginRight="16dip" android:layout_marginRight="16dp"
android:lineSpacingExtra="2dip" android:textSize="?attr/content_font_default" />
android:paddingTop="8dip"
android:paddingBottom="8dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000"
android:textSize="16sp"
tools:text="Hello" />

View File

@ -85,6 +85,7 @@
android:id="@+id/content_markdown_view_item_post_detail" android:id="@+id/content_markdown_view_item_post_detail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:visibility="gone" /> android:visibility="gone" />
<com.nex3z.flowlayout.FlowLayout <com.nex3z.flowlayout.FlowLayout