Loading res/layout-sw600dp/all_in_one.xml +3 −2 Original line number Original line Diff line number Diff line Loading @@ -86,15 +86,16 @@ android:visibility="gone" android:visibility="gone" android:layout_height="@dimen/calendar_controls_height" android:layout_height="@dimen/calendar_controls_height" android:layout_width="match_parent" > android:layout_width="match_parent" > <!-- The width of mini_month is set programmatically in AllInOne --> <FrameLayout <FrameLayout android:id="@+id/mini_month" android:id="@+id/mini_month" android:layout_height="@dimen/calendar_controls_height" android:layout_height="@dimen/calendar_controls_height" android:layout_weight="1" android:layout_width="0dip" /> android:layout_width="0dip" /> <FrameLayout <FrameLayout android:id="@+id/calendar_list" android:id="@+id/calendar_list" android:layout_marginTop="16dip" android:layout_marginTop="16dip" android:layout_height="@dimen/calendar_controls_height" android:layout_height="@dimen/calendar_controls_height" android:layout_width="450dip" /> android:layout_weight="1" android:layout_width="0dip" /> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout> res/values/dimens.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -46,5 +46,7 @@ <dimen name="event_info_desc_margin_right">0dip</dimen> <dimen name="event_info_desc_margin_right">0dip</dimen> <dimen name="event_info_padding">0dip</dimen> <dimen name="event_info_padding">0dip</dimen> <dimen name="calendar_controls_width">280dip</dimen> <dimen name="calendar_controls_width">280dip</dimen> <dimen name="min_portrait_calendar_controls_width">300dip</dimen> <dimen name="max_portrait_calendar_controls_width">350dip</dimen> <dimen name="calendar_controls_height">300dip</dimen> <dimen name="calendar_controls_height">300dip</dimen> </resources> </resources> src/com/android/calendar/AllInOneActivity.java +11 −1 Original line number Original line Diff line number Diff line Loading @@ -369,14 +369,20 @@ public class AllInOneActivity extends Activity implements EventHandler, mShowString = res.getString(R.string.show_controls); mShowString = res.getString(R.string.show_controls); mOrientation = res.getConfiguration().orientation; mOrientation = res.getConfiguration().orientation; if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) { if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) { mControlsAnimateWidth = (int)res.getDimension(R.dimen.calendar_controls_width); if (mControlsParams == null) { if (mControlsParams == null) { mControlsParams = new LayoutParams(mControlsAnimateWidth, 0); mControlsParams = new LayoutParams(mControlsAnimateWidth, 0); } } mControlsParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); mControlsParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); } else { // Make sure width is in between allowed min and max width values mControlsAnimateWidth = Math.max(res.getDisplayMetrics().widthPixels * 45 / 100, (int)res.getDimension(R.dimen.min_portrait_calendar_controls_width)); mControlsAnimateWidth = Math.min(mControlsAnimateWidth, (int)res.getDimension(R.dimen.max_portrait_calendar_controls_width)); } } mControlsAnimateHeight = (int)res.getDimension(R.dimen.calendar_controls_height); mControlsAnimateHeight = (int)res.getDimension(R.dimen.calendar_controls_height); mControlsAnimateWidth = (int)res.getDimension(R.dimen.calendar_controls_width); mIsMultipane = Utils.getConfigBool(this, R.bool.multiple_pane_config); mIsMultipane = Utils.getConfigBool(this, R.bool.multiple_pane_config); mIsTabletConfig = Utils.getConfigBool(this, R.bool.tablet_config); mIsTabletConfig = Utils.getConfigBool(this, R.bool.tablet_config); Loading Loading @@ -408,6 +414,10 @@ public class AllInOneActivity extends Activity implements EventHandler, mHomeTime = (TextView) findViewById(R.id.home_time); mHomeTime = (TextView) findViewById(R.id.home_time); mMiniMonth = findViewById(R.id.mini_month); mMiniMonth = findViewById(R.id.mini_month); if (mOrientation == Configuration.ORIENTATION_PORTRAIT) { mMiniMonth.setLayoutParams(new LinearLayout.LayoutParams(mControlsAnimateWidth, mControlsAnimateHeight)); } mCalendarsList = findViewById(R.id.calendar_list); mCalendarsList = findViewById(R.id.calendar_list); mMiniMonthContainer = findViewById(R.id.mini_month_container); mMiniMonthContainer = findViewById(R.id.mini_month_container); mSecondaryPane = findViewById(R.id.secondary_pane); mSecondaryPane = findViewById(R.id.secondary_pane); Loading Loading
res/layout-sw600dp/all_in_one.xml +3 −2 Original line number Original line Diff line number Diff line Loading @@ -86,15 +86,16 @@ android:visibility="gone" android:visibility="gone" android:layout_height="@dimen/calendar_controls_height" android:layout_height="@dimen/calendar_controls_height" android:layout_width="match_parent" > android:layout_width="match_parent" > <!-- The width of mini_month is set programmatically in AllInOne --> <FrameLayout <FrameLayout android:id="@+id/mini_month" android:id="@+id/mini_month" android:layout_height="@dimen/calendar_controls_height" android:layout_height="@dimen/calendar_controls_height" android:layout_weight="1" android:layout_width="0dip" /> android:layout_width="0dip" /> <FrameLayout <FrameLayout android:id="@+id/calendar_list" android:id="@+id/calendar_list" android:layout_marginTop="16dip" android:layout_marginTop="16dip" android:layout_height="@dimen/calendar_controls_height" android:layout_height="@dimen/calendar_controls_height" android:layout_width="450dip" /> android:layout_weight="1" android:layout_width="0dip" /> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout>
res/values/dimens.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -46,5 +46,7 @@ <dimen name="event_info_desc_margin_right">0dip</dimen> <dimen name="event_info_desc_margin_right">0dip</dimen> <dimen name="event_info_padding">0dip</dimen> <dimen name="event_info_padding">0dip</dimen> <dimen name="calendar_controls_width">280dip</dimen> <dimen name="calendar_controls_width">280dip</dimen> <dimen name="min_portrait_calendar_controls_width">300dip</dimen> <dimen name="max_portrait_calendar_controls_width">350dip</dimen> <dimen name="calendar_controls_height">300dip</dimen> <dimen name="calendar_controls_height">300dip</dimen> </resources> </resources>
src/com/android/calendar/AllInOneActivity.java +11 −1 Original line number Original line Diff line number Diff line Loading @@ -369,14 +369,20 @@ public class AllInOneActivity extends Activity implements EventHandler, mShowString = res.getString(R.string.show_controls); mShowString = res.getString(R.string.show_controls); mOrientation = res.getConfiguration().orientation; mOrientation = res.getConfiguration().orientation; if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) { if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) { mControlsAnimateWidth = (int)res.getDimension(R.dimen.calendar_controls_width); if (mControlsParams == null) { if (mControlsParams == null) { mControlsParams = new LayoutParams(mControlsAnimateWidth, 0); mControlsParams = new LayoutParams(mControlsAnimateWidth, 0); } } mControlsParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); mControlsParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); } else { // Make sure width is in between allowed min and max width values mControlsAnimateWidth = Math.max(res.getDisplayMetrics().widthPixels * 45 / 100, (int)res.getDimension(R.dimen.min_portrait_calendar_controls_width)); mControlsAnimateWidth = Math.min(mControlsAnimateWidth, (int)res.getDimension(R.dimen.max_portrait_calendar_controls_width)); } } mControlsAnimateHeight = (int)res.getDimension(R.dimen.calendar_controls_height); mControlsAnimateHeight = (int)res.getDimension(R.dimen.calendar_controls_height); mControlsAnimateWidth = (int)res.getDimension(R.dimen.calendar_controls_width); mIsMultipane = Utils.getConfigBool(this, R.bool.multiple_pane_config); mIsMultipane = Utils.getConfigBool(this, R.bool.multiple_pane_config); mIsTabletConfig = Utils.getConfigBool(this, R.bool.tablet_config); mIsTabletConfig = Utils.getConfigBool(this, R.bool.tablet_config); Loading Loading @@ -408,6 +414,10 @@ public class AllInOneActivity extends Activity implements EventHandler, mHomeTime = (TextView) findViewById(R.id.home_time); mHomeTime = (TextView) findViewById(R.id.home_time); mMiniMonth = findViewById(R.id.mini_month); mMiniMonth = findViewById(R.id.mini_month); if (mOrientation == Configuration.ORIENTATION_PORTRAIT) { mMiniMonth.setLayoutParams(new LinearLayout.LayoutParams(mControlsAnimateWidth, mControlsAnimateHeight)); } mCalendarsList = findViewById(R.id.calendar_list); mCalendarsList = findViewById(R.id.calendar_list); mMiniMonthContainer = findViewById(R.id.mini_month_container); mMiniMonthContainer = findViewById(R.id.mini_month_container); mSecondaryPane = findViewById(R.id.secondary_pane); mSecondaryPane = findViewById(R.id.secondary_pane); Loading