Skip to content

Commit 835898e

Browse files
committed
Selected file is not fully painted (BUGFIX)
1 parent cdd218a commit 835898e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

simplefileexplorer/src/main/java/com/example/simplefileexplorer/SimpleFileExplorerAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public void setAdapterListener(AdapterListener adapterListener) {
3939
public SimpleFileExplorerViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
4040
LayoutInflater layoutInflater = LayoutInflater.from(this.context);
4141
View fileExplorerListView = layoutInflater.inflate(R.layout.file_explorer_list, null, false);
42-
42+
RecyclerView.LayoutParams lp = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
43+
fileExplorerListView.setLayoutParams(lp);
4344
return new SimpleFileExplorerViewHolder(fileExplorerListView);
4445
}
4546

simplefileexplorer/src/main/res/layout-sw400dp/file_explorer_list.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
android:layout_marginBottom="8dp"
1818
app:layout_constraintBottom_toBottomOf="parent"
1919
app:layout_constraintStart_toStartOf="parent"
20-
app:layout_constraintTop_toTopOf="parent" />
20+
app:layout_constraintTop_toTopOf="parent"/>
2121

2222
<TextView
2323
android:id="@+id/tv_file_absolute_path"

0 commit comments

Comments
 (0)