diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java index 47c7bf9f..94717e5a 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java @@ -20,7 +20,9 @@ import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Log; import android.widget.ListAdapter; +import android.widget.ListView; import android.widget.Toast; +import android.view.View; import com.google.common.base.Joiner; import com.google.common.base.Splitter; @@ -277,6 +279,14 @@ public class SettingsActivity extends SyncthingActivity { Log.d(TAG, "Failed to get app version name"); } + // Remove dividers + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { + // For SDK version 21 and below, the code has to be within on CreateView. + View rootView = getView(); + ListView list = (ListView) rootView.findViewById(android.R.id.list); + list.setDivider(null); + } + openSubPrefScreen(screen); }