
SwitchCompat will return a Switch or a ToggleButton depending on the platform (doesn't matter, both are CompoundButtons) and this will be added to the repo_item view programatically. I'm using some pretty specific listeners to communicate between the details fragment and the repo list activity. I've also split the functionality (e.g. for deleting) between the repo list and the details view. In the future, when we have content providers for repos, it will be easier to take care of everything from the details screen, and automatically notify the repo list of changes. Refactored update service. Now has a static update method that can be called which will setup the required intent to begin the update. It also deals with progress listeners and dialogs for the user, so all of this is moved out of FDroid. This was so that RepoDetailsFragment can now invoke the same functionality.
15 lines
402 B
XML
15 lines
402 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<item
|
|
android:id="@+id/edit_repo"
|
|
android:title="@string/edit"
|
|
android:icon="@android:drawable/ic_menu_edit" />
|
|
|
|
<item
|
|
android:id="@+id/delete_repo"
|
|
android:title="@string/delete"
|
|
android:icon="@android:drawable/ic_menu_delete" />
|
|
|
|
</menu> |