Skip to content

Commit

Permalink
fix: Make lint happy, fix InvalidSetHasFixedSize
Browse files Browse the repository at this point in the history
  • Loading branch information
aikrq committed Nov 30, 2024
1 parent a0b40ca commit 9123945
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ public void onCreate(Bundle savedInstanceState) {
propertyGroups.add(3);
propertyGroups.add(4);

propertyGroupList.setHasFixedSize(true);
propertyGroupList.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.VERTICAL, false));
propertyGroupList.setAdapter(new ItemAdapter());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,13 @@ public void onCreate(Bundle savedInstanceState) {
categories.put(2, addableComponentEvents);
categories.put(3, addableDrawerViewEvents);
categories.put(4, addableEtcEvents);
event_list.setHasFixedSize(true);
event_list.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.VERTICAL, false));
eventAdapter = new EventAdapter();
event_list.setAdapter(eventAdapter);
category_list.setHasFixedSize(true);
categoryAdapter = new CategoryAdapter();
category_list.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL, false));
category_list.setAdapter(categoryAdapter);
((SimpleItemAnimator) category_list.getItemAnimator()).setSupportsChangeAnimations(false);
events_preview.setHasFixedSize(true);
eventsToAddAdapter = new EventsToAddAdapter();
events_preview.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL, false));
events_preview.setAdapter(eventsToAddAdapter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
tv_samename.setText(xB.b().a(getApplicationContext(), R.string.design_manager_image_title_apply_same_naming));
adapter = new ItemAdapter();
RecyclerView recycler_list = findViewById(R.id.recycler_list);
recycler_list.setHasFixedSize(true);
recycler_list.setAdapter(adapter);
recycler_list.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL, false));
projectImages = getIntent().getParcelableArrayListExtra("project_images");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public void onCreate(Bundle savedInstanceState) {
tv_samename.setText(xB.b().a(getApplicationContext(), R.string.design_manager_sound_title_apply_same_naming));
adapter = new ItemAdapter();
RecyclerView recycler_list = findViewById(R.id.recycler_list);
recycler_list.setHasFixedSize(true);
recycler_list.setAdapter(adapter);
recycler_list.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL, false));
projectSounds = getIntent().getParcelableArrayListExtra("project_sounds");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public void showDialog(Activity activity) {
LinearLayout root = (LinearLayout) wB.a(activity, R.layout.manage_library_popup_project_selector);
LottieAnimationView animationView = root.findViewById(R.id.animation_view);
RecyclerView recyclerView = root.findViewById(R.id.list);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(null));
recyclerView.setItemAnimator(new DefaultItemAnimator());
new Thread(() -> {
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/manage_image_import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_marginEnd="11dp"
android:layout_marginStart="11dp" />
android:layout_marginStart="11dp"
android:layout_weight="1" />

<LinearLayout
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/manage_sound_import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/manage_import_list_item"
tools:orientation="horizontal" />
Expand Down

0 comments on commit 9123945

Please sign in to comment.