Improved layout of login GUI

This commit is contained in:
daniel oeh 2013-09-04 17:26:07 +02:00
parent 58f5c61a54
commit 8d94bf9e67
4 changed files with 18 additions and 20 deletions

View File

@ -53,13 +53,15 @@
<TextView
android:id="@+id/txtvError"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/etxtPassword"
android:layout_alignParentLeft="true"
android:layout_alignBottom="@id/butLogin"
android:layout_toLeftOf="@id/butLogin"
android:textColor="@color/download_failed_red"
android:textSize="@dimen/text_size_medium"
android:textSize="@dimen/text_size_small"
android:maxLines="2"
android:ellipsize="end"
android:gravity="center"
android:layout_margin="16dp"/>
@ -67,10 +69,9 @@
android:id="@+id/progBarLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/butLogin"
android:layout_below="@id/etxtPassword"
android:layout_alignBottom="@id/butLogin"
android:visibility="gone"/>
android:visibility="gone"
android:layout_alignTop="@+id/butLogin"
android:layout_toLeftOf="@+id/butLogin"/>
<TextView
android:layout_width="match_parent"

View File

@ -66,11 +66,9 @@
android:id="@+id/progbarCreateDevice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/etxtCaption"
android:layout_alignBottom="@id/butCreateNewDevice"
android:layout_alignTop="@id/butCreateNewDevice"
android:layout_toLeftOf="@id/butCreateNewDevice"
android:textColor="@color/download_failed_red"
android:layout_margin="16dp"
android:textSize="@dimen/text_size_medium"
android:visibility="gone"
/>
@ -87,12 +85,12 @@
<Button
android:id="@+id/butChooseExistingDevice"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/gpodnetauth_device_butChoose"
android:layout_alignTop="@+id/spinnerChooseDevice"
android:layout_alignRight="@+id/txtvChooseExistingDevice"/>
android:layout_below="@+id/spinnerChooseDevice"
android:layout_alignLeft="@+id/butCreateNewDevice"
android:layout_alignRight="@+id/butCreateNewDevice"/>
<Spinner
android:id="@+id/spinnerChooseDevice"
@ -100,8 +98,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtvChooseExistingDevice"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/butChooseExistingDevice"
android:layout_margin="16dp"/>
android:layout_margin="8dp"
android:layout_alignParentRight="true"/>
</RelativeLayout>

View File

@ -187,7 +187,6 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
return true;
}
});
updateGpodnetPreferenceScreen();
buildUpdateIntervalPreference();
buildAutodownloadSelectedNetworsPreference();
setSelectedNetworksEnabled(UserPreferences
@ -244,6 +243,7 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
checkItemVisibility();
setEpisodeCacheSizeText(UserPreferences.getEpisodeCacheSize());
setDataFolderText();
updateGpodnetPreferenceScreen();
}
@SuppressWarnings("deprecation")

View File

@ -616,7 +616,7 @@ public class GpodnetService {
int responseCode = response.getStatusLine().getStatusCode();
if (responseCode != HttpStatus.SC_OK) {
if (responseCode == HttpStatus.SC_UNAUTHORIZED) {
throw new GpodnetServiceAuthenticationException();
throw new GpodnetServiceAuthenticationException("Wrong username or password");
} else {
throw new GpodnetServiceBadStatusCodeException(
"Bad response code: " + responseCode, responseCode);