Skip to content

Commit

Permalink
Share to Syncthing: Fix dark theme (fixes #796) (#797)
Browse files Browse the repository at this point in the history
* Delete item_folder_picker.xml

* Update FolderPickerActivity.java

* Update FolderPickerActivity.java
  • Loading branch information
Catfriend1 authored May 16, 2021
1 parent 5a68743 commit dacd831
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
Expand Down Expand Up @@ -272,7 +273,7 @@ private void invalidateOptions() {
private class FileAdapter extends ArrayAdapter<File> {

public FileAdapter(Context context) {
super(context, R.layout.item_folder_picker);
super(context, android.R.layout.simple_list_item_1);
}

@Override
Expand All @@ -282,11 +283,7 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent) {
TextView title = convertView.findViewById(android.R.id.text1);
File f = getItem(position);
title.setText(f.getName());
int textColor = (f.isDirectory())
? android.R.color.primary_text_light
: android.R.color.tertiary_text_light;
title.setTextColor(ContextCompat.getColor(getContext(), textColor));

title.setTypeface(title.getTypeface(), f.isFile() ? Typeface.ITALIC : Typeface.NORMAL);
return convertView;
}
}
Expand Down
9 changes: 0 additions & 9 deletions app/src/main/res/layout/item_folder_picker.xml

This file was deleted.

0 comments on commit dacd831

Please sign in to comment.