mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2024-12-18 19:43:35 +01:00
improved drawer and compose dialog appearance for bigger screens
This commit is contained in:
parent
cbac9236bc
commit
94fa9f1c72
@ -582,8 +582,7 @@ public class ComposeActivity extends ThemedFragmentActivity implements TextWatch
|
||||
mEditText = (EditText) findViewById(R.id.edit_text);
|
||||
mMediaPreviewGrid = (GridView) findViewById(R.id.media_thumbnail_preview);
|
||||
mMenuBar = (ActionMenuView) findViewById(R.id.menu_bar);
|
||||
final View composeBottomBar = findViewById(R.id.compose_bottombar);
|
||||
mSendView = composeBottomBar.findViewById(R.id.send);
|
||||
mSendView = findViewById(R.id.send);
|
||||
mSendTextCountView = (StatusTextCountView) mSendView.findViewById(R.id.status_text_count);
|
||||
mAccountSelector = (RecyclerView) findViewById(R.id.account_selector);
|
||||
mAccountSelectorContainer = findViewById(R.id.account_selector_container);
|
||||
|
@ -29,6 +29,7 @@ import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.database.ContentObserver;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PorterDuff.Mode;
|
||||
@ -772,13 +773,18 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen
|
||||
|
||||
private void setupSlidingMenu() {
|
||||
if (mSlidingMenu == null) return;
|
||||
final int marginThreshold = getResources().getDimensionPixelSize(R.dimen.default_sliding_menu_margin_threshold);
|
||||
final Resources res = getResources();
|
||||
final int marginThreshold = res.getDimensionPixelSize(R.dimen.default_sliding_menu_margin_threshold);
|
||||
final boolean relativeBehindWidth = res.getBoolean(R.bool.relative_behind_width);
|
||||
mSlidingMenu.setMode(SlidingMenu.LEFT_RIGHT);
|
||||
mSlidingMenu.setShadowWidthRes(R.dimen.default_sliding_menu_shadow_width);
|
||||
mSlidingMenu.setShadowDrawable(R.drawable.shadow_left);
|
||||
mSlidingMenu.setSecondaryShadowDrawable(R.drawable.shadow_right);
|
||||
// mSlidingMenu.setBehindWidthRes(R.dimen.drawer_width_home);
|
||||
mSlidingMenu.setBehindOffsetRes(R.dimen.drawer_offset_home);
|
||||
if (relativeBehindWidth) {
|
||||
mSlidingMenu.setBehindOffsetRes(R.dimen.drawer_offset_home);
|
||||
} else {
|
||||
mSlidingMenu.setBehindWidthRes(R.dimen.drawer_width_home);
|
||||
}
|
||||
mSlidingMenu.setTouchmodeMarginThreshold(marginThreshold);
|
||||
mSlidingMenu.setFadeDegree(0.5f);
|
||||
mSlidingMenu.setMenu(R.layout.drawer_home_accounts);
|
||||
|
@ -21,7 +21,7 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/compose_activity"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/compose_min_width"
|
||||
@ -118,6 +118,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/compose_bottombar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
|
@ -19,7 +19,6 @@
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/compose_bottombar"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
@ -32,7 +31,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
@ -72,9 +71,7 @@
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_toRightOf="@+id/account_selector_button">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.mariotaku.twidere.view.TwidereActionMenuView
|
||||
android:id="@+id/menu_bar"
|
||||
@ -83,7 +80,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"/>
|
||||
</HorizontalScrollView>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/send"
|
||||
|
@ -4,5 +4,6 @@
|
||||
<bool name="default_display_tab_label">true</bool>
|
||||
<bool name="home_display_icon">true</bool>
|
||||
<bool name="shadow_slidable">false</bool>
|
||||
<bool name="relative_behind_width">false</bool>
|
||||
|
||||
</resources>
|
@ -3,5 +3,6 @@
|
||||
|
||||
<bool name="shadow_slidable">false</bool>
|
||||
<bool name="is_large_screen">true</bool>
|
||||
<bool name="relative_behind_width">false</bool>
|
||||
|
||||
</resources>
|
||||
|
@ -7,5 +7,6 @@
|
||||
<bool name="default_shadow_slidable">true</bool>
|
||||
<bool name="shadow_slidable">true</bool>
|
||||
<bool name="has_font_family">false</bool>
|
||||
<bool name="relative_behind_width">true</bool>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user