
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.
38 lines
1.4 KiB
XML
38 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:ems="20"
|
|
android:layout_height="wrap_content" android:text="@string/repo_add_url"/>
|
|
|
|
<EditText
|
|
android:id="@+id/edit_uri"
|
|
android:maxLines="1"
|
|
android:layout_width="wrap_content"
|
|
android:ems="20"
|
|
android:layout_height="wrap_content"
|
|
android:text="https://"/>
|
|
</LinearLayout>
|
|
<!--
|
|
* Copyright (C) 2009 Roberto Jacinto
|
|
* roberto.jacinto@caixamagica.pt
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
-->
|