动画布局以填充屏幕

3

我正在尝试在Google Play Newsstand应用程序中复制此动画:

http://i.imgur.com/UuX1PRO.webm

我有一个布局,看起来像这样:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="8dp"
    android:paddingRight="8dp"
    android:paddingTop="8dp"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/post"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:orientation="vertical">

        ... more layouts ...

    </LinearLayout>

</LinearLayout>

如何将ID为postLinearLayout扩展到屏幕大小?请注意,所有帖子的高度均为250dp。当帖子扩展到屏幕时,我想加载其下方的回复(评论部分)。
如何创建此动画/扩展效果?
4个回答

1
你需要使用材料设计活动转换。
请参见这里
getWindow().setExitTransition(new Explode());

检查 this


0
您可以在Activity.onCreate()中简单地添加以下代码行;
this.requestWindowFeature(Window.FEATURE_NO_TITLE);

0

0

这不是确切的解决方案,但我认为开发者网站上的此页面正是您要寻找的。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接