小编Pav*_* M.的帖子

使用retrolambda进行Android构建会忽略源代码更改

在我们的项目中,我们使用gradle + retrolambda + proguard.Retrolambda增量构建设置为false.

有时构建传递没有错误,但源代码更改不适用于应用程序.为了解决这个问题,我们用它来清理和重建项目

gradlew clean assembleDebug
Run Code Online (Sandbox Code Playgroud)

但在我们的情况下,它需要约2.30米.那太久了.

我们如何解决这个问题?

android proguard retrolambda

10
推荐指数
1
解决办法
470
查看次数

ListView高度内的Android StaggeredGridView

当我在ListView项目中放置StaggeredGridView时,它的高度变为零.我尝试在这个答案中修改onMeasure ,但它没有效果.

修改过的StaggeredGridView:

public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    int expandSpec = MeasureSpec.makeMeasureSpec(MEASURED_SIZE_MASK,
                      MeasureSpec.AT_MOST);
    super.onMeasure(widthMeasureSpec, expandSpec);

    ViewGroup.LayoutParams params = getLayoutParams();
    params.height = getMeasuredHeight();
}
Run Code Online (Sandbox Code Playgroud)

列表项布局:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <com.playday.app.views.InfiniteGridView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/pics"
        android:layout_marginTop="@dimen/small"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:item_margin="2dp"
        app:column_count="4" />
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我解决这个问题吗?

android listview staggered-gridview

5
推荐指数
0
解决办法
335
查看次数