
If the device supports API level 16 (Android 4.1) then add a menu item on the repository management screen to "Find Local Repos". Activating this menu item will initiate NSD service discovery with the NsdHelper class looking for 'fdroidrepo' and 'fdroidrepos' service types on the local network. When one is found, the service is resolved and the name & IP are populated into a list of discovered repositories. Clicking an NSD discovered repo will prompt the user to add the repo.
43 lines
1.4 KiB
XML
43 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" >
|
|
|
|
<LinearLayout
|
|
android:id="@+id/reposcanprogresslayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="50dp"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_centerHorizontal="true"
|
|
android:paddingTop="8sp" >
|
|
|
|
<ProgressBar
|
|
android:id="@+id/reposcaningspinner"
|
|
style="?android:attr/progressBarStyle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginRight="5dp"
|
|
android:indeterminate="true" />
|
|
|
|
<TextView
|
|
android:id="@+id/reposcaninglabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:padding="8sp"
|
|
android:text="@string/local_repos_scanning"
|
|
android:textSize="15sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ListView
|
|
android:id="@+id/reposcanlist"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@+id/reposcanprogresslayout"
|
|
android:padding="8sp"
|
|
/>
|
|
|
|
</RelativeLayout> |