Merge "Fix jittery action bar during transitions" into nyc-dev

This commit is contained in:
Adrian Roos
2016-06-14 19:31:24 +00:00
committed by Android (Google) Code Review
8 changed files with 55 additions and 38 deletions

View File

@@ -3405,6 +3405,8 @@ public class Notification implements Parcelable
big.setTextViewText(R.id.notification_material_reply_text_2, null); big.setTextViewText(R.id.notification_material_reply_text_2, null);
big.setViewVisibility(R.id.notification_material_reply_text_3, View.GONE); big.setViewVisibility(R.id.notification_material_reply_text_3, View.GONE);
big.setTextViewText(R.id.notification_material_reply_text_3, null); big.setTextViewText(R.id.notification_material_reply_text_3, null);
big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target, 0);
} }
private RemoteViews applyStandardTemplateWithActions(int layoutId) { private RemoteViews applyStandardTemplateWithActions(int layoutId) {
@@ -3427,6 +3429,8 @@ public class Notification implements Parcelable
if (N > 0) { if (N > 0) {
big.setViewVisibility(R.id.actions_container, View.VISIBLE); big.setViewVisibility(R.id.actions_container, View.VISIBLE);
big.setViewVisibility(R.id.actions, View.VISIBLE); big.setViewVisibility(R.id.actions, View.VISIBLE);
big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target,
R.dimen.notification_action_list_height);
if (N>MAX_ACTION_BUTTONS) N=MAX_ACTION_BUTTONS; if (N>MAX_ACTION_BUTTONS) N=MAX_ACTION_BUTTONS;
for (int i=0; i<N; i++) { for (int i=0; i<N; i++) {
Action action = mActions.get(i); Action action = mActions.get(i);

View File

@@ -17,7 +17,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actions_container" android:id="@+id/actions_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_gravity="bottom">
<com.android.internal.widget.NotificationActionListLayout <com.android.internal.widget.NotificationActionListLayout
android:id="@+id/actions" android:id="@+id/actions"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -14,7 +14,7 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License ~ limitations under the License
--> -->
<LinearLayout <FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content" android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -22,43 +22,49 @@
android:orientation="vertical" android:orientation="vertical"
android:tag="big" android:tag="big"
> >
<FrameLayout <LinearLayout
android:id="@+id/status_bar_latest_event_content" android:id="@+id/notification_action_list_margin_target"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:tag="base"
>
<include layout="@layout/notification_template_header" />
<LinearLayout
android:id="@+id/notification_main_column"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_gravity="top" android:layout_marginBottom="@dimen/notification_action_list_height"
android:layout_marginStart="@dimen/notification_content_margin_start"
android:layout_marginEnd="@dimen/notification_content_margin_end"
android:layout_marginTop="@dimen/notification_content_margin_top"
android:layout_marginBottom="@dimen/notification_content_margin_bottom"
android:orientation="vertical" android:orientation="vertical"
> >
<include layout="@layout/notification_template_part_line1" />
<include layout="@layout/notification_template_text" />
</LinearLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="top"
android:layout_marginStart="@dimen/notification_content_margin_start" >
android:layout_marginBottom="15dp" <include layout="@layout/notification_template_header" />
android:layout_marginEnd="@dimen/notification_content_margin_end"> <LinearLayout
<include layout="@layout/notification_template_progress" /> android:id="@+id/notification_main_column"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top"
android:layout_marginStart="@dimen/notification_content_margin_start"
android:layout_marginEnd="@dimen/notification_content_margin_end"
android:layout_marginTop="@dimen/notification_content_margin_top"
android:layout_marginBottom="@dimen/notification_content_margin_bottom"
android:orientation="vertical"
>
<include layout="@layout/notification_template_part_line1" />
<include layout="@layout/notification_template_text" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="@dimen/notification_content_margin_start"
android:layout_marginBottom="15dp"
android:layout_marginEnd="@dimen/notification_content_margin_end">
<include layout="@layout/notification_template_progress" />
</FrameLayout>
<include layout="@layout/notification_template_right_icon" />
</FrameLayout> </FrameLayout>
<include layout="@layout/notification_template_right_icon" /> <ViewStub android:layout="@layout/notification_material_reply_text"
</FrameLayout> android:id="@+id/notification_material_reply_container"
<ViewStub android:layout="@layout/notification_material_reply_text" android:layout_width="match_parent"
android:id="@+id/notification_material_reply_container" android:layout_height="wrap_content"
android:layout_width="match_parent" />
android:layout_height="wrap_content" </LinearLayout>
/>
<include layout="@layout/notification_material_action_list" /> <include layout="@layout/notification_material_action_list" />
</LinearLayout> </FrameLayout>

View File

@@ -30,6 +30,7 @@
android:layout_marginTop="@dimen/notification_content_margin_top" android:layout_marginTop="@dimen/notification_content_margin_top"
android:clipToPadding="false" android:clipToPadding="false"
android:orientation="vertical" android:orientation="vertical"
android:id="@+id/notification_action_list_margin_target"
> >
<LinearLayout <LinearLayout
android:id="@+id/notification_main_column" android:id="@+id/notification_main_column"
@@ -60,6 +61,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<include layout="@layout/notification_material_action_list" />
</LinearLayout> </LinearLayout>
<include layout="@layout/notification_material_action_list" />
</FrameLayout> </FrameLayout>

View File

@@ -24,10 +24,12 @@
<include layout="@layout/notification_template_header" /> <include layout="@layout/notification_template_header" />
<LinearLayout <LinearLayout
android:id="@+id/notification_action_list_margin_target"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="top" android:layout_gravity="top"
android:layout_marginTop="@dimen/notification_content_margin_top" android:layout_marginTop="@dimen/notification_content_margin_top"
android:layout_marginBottom="@dimen/notification_action_list_height"
android:clipToPadding="false" android:clipToPadding="false"
android:orientation="vertical"> android:orientation="vertical">
@@ -61,7 +63,7 @@
android:id="@+id/notification_material_reply_container" android:id="@+id/notification_material_reply_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<include layout="@layout/notification_material_action_list" />
</LinearLayout> </LinearLayout>
<include layout="@layout/notification_material_action_list" />
<include layout="@layout/notification_template_right_icon" /> <include layout="@layout/notification_template_right_icon" />
</FrameLayout> </FrameLayout>

View File

@@ -23,6 +23,7 @@
> >
<include layout="@layout/notification_template_header" /> <include layout="@layout/notification_template_header" />
<LinearLayout <LinearLayout
android:id="@+id/notification_action_list_margin_target"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="top" android:layout_gravity="top"
@@ -117,7 +118,7 @@
android:id="@+id/notification_material_reply_container" android:id="@+id/notification_material_reply_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<include layout="@layout/notification_material_action_list" />
</LinearLayout> </LinearLayout>
<include layout="@layout/notification_material_action_list" />
<include layout="@layout/notification_template_right_icon" /> <include layout="@layout/notification_template_right_icon" />
</FrameLayout> </FrameLayout>

View File

@@ -22,6 +22,7 @@
> >
<include layout="@layout/notification_template_header" /> <include layout="@layout/notification_template_header" />
<LinearLayout <LinearLayout
android:id="@+id/notification_action_list_margin_target"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="top" android:layout_gravity="top"
@@ -74,7 +75,7 @@
/> />
</com.android.internal.widget.MessagingLinearLayout> </com.android.internal.widget.MessagingLinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/notification_material_action_list" />
</LinearLayout> </LinearLayout>
<include layout="@layout/notification_material_action_list" />
<include layout="@layout/notification_template_right_icon" /> <include layout="@layout/notification_template_right_icon" />
</FrameLayout> </FrameLayout>

View File

@@ -2603,6 +2603,7 @@
<java-symbol type="bool" name="config_supportPreRebootSecurityLogs" /> <java-symbol type="bool" name="config_supportPreRebootSecurityLogs" />
<java-symbol type="dimen" name="notification_content_plus_picture_margin_end" /> <java-symbol type="dimen" name="notification_content_plus_picture_margin_end" />
<java-symbol type="id" name="notification_action_list_margin_target" />
<!-- Pinner Service --> <!-- Pinner Service -->
<java-symbol type="array" name="config_defaultPinnerServiceFiles" /> <java-symbol type="array" name="config_defaultPinnerServiceFiles" />