Merge branch 'materialize-repository-details' into 'master'
Materialize repository details Modernize the look of repo details. Enabled repo before and after:   Disabled repo before and after:   See merge request !148
This commit is contained in:
commit
fc50fea18c
@ -347,7 +347,7 @@
|
|||||||
</activity>-->
|
</activity>-->
|
||||||
<activity
|
<activity
|
||||||
android:name=".views.RepoDetailsActivity"
|
android:name=".views.RepoDetailsActivity"
|
||||||
android:label="@string/menu_manage"
|
android:label="@string/repo_details"
|
||||||
android:parentActivityName=".views.ManageReposActivity"
|
android:parentActivityName=".views.ManageReposActivity"
|
||||||
android:windowSoftInputMode="stateHidden">
|
android:windowSoftInputMode="stateHidden">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
@ -1,149 +1,113 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:paddingTop="@dimen/padding_top"
|
|
||||||
android:paddingLeft="@dimen/padding_side"
|
|
||||||
android:paddingStart="@dimen/padding_side"
|
|
||||||
android:paddingRight="@dimen/padding_side"
|
|
||||||
android:paddingEnd="@dimen/padding_side">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/repoView"
|
android:id="@+id/repoView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
|
||||||
|
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<!-- URL of this repo -->
|
||||||
android:layout_width="fill_parent"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/input_repo_url"
|
android:layout_height="wrap_content"
|
||||||
android:textStyle="bold"
|
android:text="@string/repo_url"
|
||||||
android:layout_alignParentLeft="true"
|
style="@style/RepoDetailsCaption"/>
|
||||||
android:layout_alignParentStart="true"
|
<TextView
|
||||||
android:layout_alignParentTop="true" />
|
android:id="@+id/input_repo_url"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/RepoDetailsBody"/>
|
||||||
|
|
||||||
<!-- Name of this repo -->
|
<!-- Name of this repo -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/label_repo_name"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/label_repo_name"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/repo_name"
|
android:text="@string/repo_name"
|
||||||
android:layout_below="@id/input_repo_url"
|
style="@style/RepoDetailsCaption"/>
|
||||||
android:layout_alignParentLeft="true"
|
<TextView
|
||||||
android:layout_alignParentStart="true"
|
android:id="@+id/text_repo_name"
|
||||||
android:paddingTop="@dimen/form_label_top"/>
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
style="@style/RepoDetailsBody"/>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:id="@+id/text_repo_name"
|
|
||||||
android:layout_below="@id/label_repo_name" android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<!-- Description - as pulled from the index file during last update... -->
|
<!-- Description - as pulled from the index file during last update... -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/label_description"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/label_description"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/repo_description"
|
android:text="@string/repo_description"
|
||||||
android:layout_below="@id/text_repo_name"
|
style="@style/RepoDetailsCaption"/>
|
||||||
android:layout_alignParentLeft="true"
|
<TextView
|
||||||
android:layout_alignParentStart="true"
|
android:id="@+id/text_description"
|
||||||
android:paddingTop="@dimen/form_label_top"/>
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
style="@style/RepoDetailsBody"/>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:scrollHorizontally="false"
|
|
||||||
android:id="@+id/text_description"
|
|
||||||
android:layout_below="@id/label_description" android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<!-- Number of apps belonging to this repo -->
|
<!-- Number of apps belonging to this repo -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/label_num_apps"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/label_num_apps"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/repo_num_apps"
|
android:text="@string/repo_num_apps"
|
||||||
android:layout_below="@id/text_description"
|
style="@style/RepoDetailsCaption"/>
|
||||||
android:layout_alignParentLeft="true"
|
<TextView
|
||||||
android:layout_alignParentStart="true"
|
android:id="@+id/text_num_apps"
|
||||||
android:paddingTop="@dimen/form_label_top" />
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
style="@style/RepoDetailsBody"/>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/text_num_apps"
|
|
||||||
android:layout_below="@id/label_num_apps" android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<!-- The last time this repo was updated -->
|
<!-- The last time this repo was updated -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/label_last_update"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/label_last_update"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/repo_last_update"
|
android:text="@string/repo_last_update"
|
||||||
android:layout_below="@id/text_num_apps"
|
style="@style/RepoDetailsCaption"/>
|
||||||
android:layout_alignParentLeft="true"
|
<TextView
|
||||||
android:layout_alignParentStart="true"
|
android:id="@+id/text_last_update"
|
||||||
android:paddingTop="@dimen/form_label_top" />
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
style="@style/RepoDetailsBody"/>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/text_last_update"
|
|
||||||
android:layout_below="@id/label_last_update" android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<!-- Signature (or "unsigned" if none) -->
|
<!-- Signature (or "unsigned" if none) -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/label_repo_fingerprint"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/label_repo_fingerprint"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/repo_fingerprint"
|
android:text="@string/repo_fingerprint"
|
||||||
android:layout_below="@id/text_last_update"
|
style="@style/RepoDetailsCaption"/>
|
||||||
android:layout_alignParentLeft="true"
|
<TextView
|
||||||
android:layout_alignParentStart="true"
|
android:id="@+id/text_repo_fingerprint"
|
||||||
android:paddingTop="@dimen/form_label_top" />
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="fill_parent"
|
android:typeface="monospace"
|
||||||
android:layout_height="wrap_content"
|
style="@style/RepoDetailsBody"/>
|
||||||
android:singleLine="false"
|
<TextView
|
||||||
android:scrollHorizontally="false"
|
android:id="@+id/text_repo_fingerprint_description"
|
||||||
android:id="@+id/text_repo_fingerprint"
|
android:layout_width="match_parent"
|
||||||
android:layout_below="@id/label_repo_fingerprint" android:textStyle="bold"/>
|
android:layout_height="wrap_content"
|
||||||
<TextView
|
style="@style/RepoDetailsBody"/>
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:scrollHorizontally="false"
|
|
||||||
android:id="@+id/text_repo_fingerprint_description"
|
|
||||||
android:layout_below="@id/text_repo_fingerprint"/>
|
|
||||||
|
|
||||||
<!-- The last time this repo was updated -->
|
<TextView
|
||||||
<TextView
|
android:id="@+id/text_not_yet_updated"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/text_not_yet_updated"
|
android:text="@string/repo_not_yet_updated"
|
||||||
android:layout_below="@id/input_repo_url"
|
style="@style/RepoDetailsBody"/>
|
||||||
android:text="@string/repo_not_yet_updated"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingTop="@dimen/form_label_top"/>
|
|
||||||
|
|
||||||
<Button
|
<ImageView
|
||||||
android:id="@+id/btn_update"
|
android:id="@+id/qr_code"
|
||||||
android:layout_centerHorizontal="true"
|
android:src="@drawable/swap_qr_example"
|
||||||
android:text="@string/repo_update"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:paddingTop="16dp"/>
|
||||||
android:layout_below="@id/text_not_yet_updated"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/qr_code"
|
|
||||||
android:src="@drawable/swap_qr_example"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/menu_update"
|
|
||||||
android:icon="@drawable/ic_refresh_white"
|
|
||||||
android:title="@string/repo_update"
|
|
||||||
app:showAsAction="always|withText" />
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_delete"
|
android:id="@+id/menu_delete"
|
||||||
android:icon="@drawable/ic_delete_white"
|
android:icon="@drawable/ic_delete_white"
|
||||||
|
8
F-Droid/res/values-v16/styles.xml
Normal file
8
F-Droid/res/values-v16/styles.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<style name="RepoDetailsBody">
|
||||||
|
<item name="android:lineSpacingMultiplier">1.25</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
@ -1,9 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<dimen name="padding_side">8dp</dimen>
|
|
||||||
<dimen name="padding_top">5dp</dimen>
|
|
||||||
<dimen name="form_label_top">5dp</dimen>
|
|
||||||
<dimen name="applist_icon_normal_size">48dp</dimen>
|
<dimen name="applist_icon_normal_size">48dp</dimen>
|
||||||
<dimen name="applist_icon_compact_size">32dp</dimen>
|
<dimen name="applist_icon_compact_size">32dp</dimen>
|
||||||
|
|
||||||
|
@ -188,8 +188,10 @@
|
|||||||
<string name="theme">Theme</string>
|
<string name="theme">Theme</string>
|
||||||
<string name="unsigned">Unsigned</string>
|
<string name="unsigned">Unsigned</string>
|
||||||
<string name="unverified">Unverified</string>
|
<string name="unverified">Unverified</string>
|
||||||
|
<string name="repo_details">Repository</string>
|
||||||
|
<string name="repo_url">Address</string>
|
||||||
<string name="repo_num_apps">Number of apps</string>
|
<string name="repo_num_apps">Number of apps</string>
|
||||||
<string name="repo_fingerprint">Fingerprint of Repo Signing Key (SHA-256)</string>
|
<string name="repo_fingerprint">Fingerprint of the signing key (SHA-256)</string>
|
||||||
<string name="repo_description">Description</string>
|
<string name="repo_description">Description</string>
|
||||||
<string name="repo_last_update">Last update</string>
|
<string name="repo_last_update">Last update</string>
|
||||||
<string name="repo_update">Update</string>
|
<string name="repo_update">Update</string>
|
||||||
@ -198,9 +200,7 @@
|
|||||||
applications could not be verified. You should be careful
|
applications could not be verified. You should be careful
|
||||||
with applications downloaded from unsigned indexes.</string>
|
with applications downloaded from unsigned indexes.</string>
|
||||||
<string name="repo_not_yet_updated">This repository has not been used yet.
|
<string name="repo_not_yet_updated">This repository has not been used yet.
|
||||||
In order to view the apps it provides, you will need to update
|
You need to enable it to view the apps it provides.</string>
|
||||||
it.\n\nOnce updated, the description and other details will
|
|
||||||
become available here.</string>
|
|
||||||
<string name="unknown">Unknown</string>
|
<string name="unknown">Unknown</string>
|
||||||
<string name="repo_confirm_delete_title">Delete Repository?</string>
|
<string name="repo_confirm_delete_title">Delete Repository?</string>
|
||||||
<string name="repo_confirm_delete_body">Deleting a repository means
|
<string name="repo_confirm_delete_body">Deleting a repository means
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
|
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
|
||||||
@ -38,6 +39,15 @@
|
|||||||
<item name="colorAccent">@color/fdroid_green</item>
|
<item name="colorAccent">@color/fdroid_green</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="RepoDetailsCaption">
|
||||||
|
<item name="android:paddingTop">16dp</item>
|
||||||
|
<item name="android:paddingBottom">4dp</item>
|
||||||
|
<item name="android:textSize">12sp</item>
|
||||||
|
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="RepoDetailsBody" />
|
||||||
|
|
||||||
<style name="SwapTheme.Wizard" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="SwapTheme.Wizard" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
<item name="colorButtonNormal">@color/swap_bright_blue</item>
|
<item name="colorButtonNormal">@color/swap_bright_blue</item>
|
||||||
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
||||||
|
@ -2,7 +2,6 @@ package org.fdroid.fdroid.views;
|
|||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.ContentValues;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -21,7 +20,6 @@ import android.text.TextUtils;
|
|||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -50,7 +48,6 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
private static final int[] SHOW_IF_EXISTS = {
|
private static final int[] SHOW_IF_EXISTS = {
|
||||||
R.id.label_repo_name,
|
R.id.label_repo_name,
|
||||||
R.id.text_repo_name,
|
R.id.text_repo_name,
|
||||||
R.id.label_description,
|
|
||||||
R.id.text_description,
|
R.id.text_description,
|
||||||
R.id.label_num_apps,
|
R.id.label_num_apps,
|
||||||
R.id.text_num_apps,
|
R.id.text_num_apps,
|
||||||
@ -66,7 +63,6 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
*/
|
*/
|
||||||
private static final int[] HIDE_IF_EXISTS = {
|
private static final int[] HIDE_IF_EXISTS = {
|
||||||
R.id.text_not_yet_updated,
|
R.id.text_not_yet_updated,
|
||||||
R.id.btn_update
|
|
||||||
};
|
};
|
||||||
private Repo repo;
|
private Repo repo;
|
||||||
private long repoId;
|
private long repoId;
|
||||||
@ -104,19 +100,9 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
};
|
};
|
||||||
repo = RepoProvider.Helper.findById(this, repoId, projection);
|
repo = RepoProvider.Helper.findById(this, repoId, projection);
|
||||||
|
|
||||||
setTitle(repo.name);
|
|
||||||
|
|
||||||
TextView inputUrl = (TextView) findViewById(R.id.input_repo_url);
|
TextView inputUrl = (TextView) findViewById(R.id.input_repo_url);
|
||||||
inputUrl.setText(repo.address);
|
inputUrl.setText(repo.address);
|
||||||
|
|
||||||
Button update = (Button) repoView.findViewById(R.id.btn_update);
|
|
||||||
update.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
performUpdate();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Uri uri = Uri.parse(repo.address);
|
Uri uri = Uri.parse(repo.address);
|
||||||
uri = uri.buildUpon().appendQueryParameter("fingerprint", repo.fingerprint).build();
|
uri = uri.buildUpon().appendQueryParameter("fingerprint", repo.fingerprint).build();
|
||||||
String qrUriString = uri.toString().toUpperCase(Locale.ENGLISH);
|
String qrUriString = uri.toString().toUpperCase(Locale.ENGLISH);
|
||||||
@ -207,9 +193,6 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
case android.R.id.home:
|
case android.R.id.home:
|
||||||
NavUtils.navigateUpFromSameTask(this);
|
NavUtils.navigateUpFromSameTask(this);
|
||||||
return true;
|
return true;
|
||||||
case R.id.menu_update:
|
|
||||||
performUpdate();
|
|
||||||
return true;
|
|
||||||
case R.id.menu_delete:
|
case R.id.menu_delete:
|
||||||
promptForDelete();
|
promptForDelete();
|
||||||
return true;
|
return true;
|
||||||
@ -271,23 +254,20 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
TextView repoFingerprintDescView = (TextView) parent.findViewById(R.id.text_repo_fingerprint_description);
|
TextView repoFingerprintDescView = (TextView) parent.findViewById(R.id.text_repo_fingerprint_description);
|
||||||
|
|
||||||
String repoFingerprint;
|
String repoFingerprint;
|
||||||
int repoFingerprintColor;
|
|
||||||
|
|
||||||
// TODO show the current state of the signature check, not just whether there is a key or not
|
// TODO show the current state of the signature check, not just whether there is a key or not
|
||||||
if (TextUtils.isEmpty(repo.fingerprint) && TextUtils.isEmpty(repo.pubkey)) {
|
if (TextUtils.isEmpty(repo.fingerprint) && TextUtils.isEmpty(repo.pubkey)) {
|
||||||
repoFingerprint = getResources().getString(R.string.unsigned);
|
repoFingerprint = getResources().getString(R.string.unsigned);
|
||||||
repoFingerprintColor = getResources().getColor(R.color.unsigned);
|
repoFingerprintView.setTextColor(getResources().getColor(R.color.unsigned));
|
||||||
repoFingerprintDescView.setVisibility(View.VISIBLE);
|
repoFingerprintDescView.setVisibility(View.VISIBLE);
|
||||||
repoFingerprintDescView.setText(getResources().getString(R.string.unsigned_description));
|
repoFingerprintDescView.setText(getResources().getString(R.string.unsigned_description));
|
||||||
} else {
|
} else {
|
||||||
// this is based on repo.fingerprint always existing, which it should
|
// this is based on repo.fingerprint always existing, which it should
|
||||||
repoFingerprint = Utils.formatFingerprint(this, repo.fingerprint);
|
repoFingerprint = Utils.formatFingerprint(this, repo.fingerprint);
|
||||||
repoFingerprintColor = getResources().getColor(R.color.signed);
|
|
||||||
repoFingerprintDescView.setVisibility(View.GONE);
|
repoFingerprintDescView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
repoFingerprintView.setText(repoFingerprint);
|
repoFingerprintView.setText(repoFingerprint);
|
||||||
repoFingerprintView.setTextColor(repoFingerprintColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateRepoView() {
|
private void updateRepoView() {
|
||||||
@ -328,19 +308,6 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
lastUpdated.setText(lastUpdate);
|
lastUpdated.setText(lastUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* When an update is performed, notify the listener so that the repo
|
|
||||||
* list can be updated. We will perform the update ourselves though.
|
|
||||||
*/
|
|
||||||
private void performUpdate() {
|
|
||||||
// Ensure repo is enabled before updating...
|
|
||||||
ContentValues values = new ContentValues(1);
|
|
||||||
values.put(RepoProvider.DataColumns.IN_USE, 1);
|
|
||||||
RepoProvider.Helper.update(this, repo, values);
|
|
||||||
|
|
||||||
UpdateService.updateRepoNow(repo.address, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void promptForDelete() {
|
private void promptForDelete() {
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setTitle(R.string.repo_confirm_delete_title)
|
.setTitle(R.string.repo_confirm_delete_title)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user