Make some inner classes static
This avoids an implicit this field and can help GC. Found via error-prone.
This commit is contained in:
parent
3b65cd38e7
commit
94c4374bf7
@ -570,7 +570,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
super.onDetachedFromRecyclerView(recyclerView);
|
||||
}
|
||||
|
||||
private abstract class AppDetailsViewHolder extends RecyclerView.ViewHolder {
|
||||
private abstract static class AppDetailsViewHolder extends RecyclerView.ViewHolder {
|
||||
AppDetailsViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
@ -664,7 +664,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
}
|
||||
}
|
||||
|
||||
private abstract class ExpandableLinearLayoutViewHolder extends AppDetailsViewHolder {
|
||||
private abstract static class ExpandableLinearLayoutViewHolder extends AppDetailsViewHolder {
|
||||
final TextView headerView;
|
||||
final LinearLayout contentView;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class ScreenShotsActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private class ScreenShotPagerAdapter extends FragmentStatePagerAdapter {
|
||||
private static class ScreenShotPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private final String[] screenshots;
|
||||
|
||||
@ -133,7 +133,7 @@ public class ScreenShotsActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public class DepthPageTransformer implements ViewPager.PageTransformer {
|
||||
public static class DepthPageTransformer implements ViewPager.PageTransformer {
|
||||
|
||||
public void transformPage(View view, float position) {
|
||||
int pageWidth = view.getWidth();
|
||||
|
@ -112,7 +112,7 @@ public class WhatsNewAdapter extends RecyclerView.Adapter<AppCardController> {
|
||||
* @see org.fdroid.fdroid.R.dimen#whats_new__padding__app_card__horizontal
|
||||
* @see org.fdroid.fdroid.R.dimen#whats_new__padding__app_card__vertical
|
||||
*/
|
||||
private class ItemDecorator extends RecyclerView.ItemDecoration {
|
||||
private static class ItemDecorator extends RecyclerView.ItemDecoration {
|
||||
private final Context context;
|
||||
|
||||
ItemDecorator(Context context) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user