v.1.8.12 layout fix

This commit is contained in:
nuclearfog 2021-02-14 20:59:07 +01:00
parent 834dec0a5f
commit 17c5d2c8a4
No known key found for this signature in database
GPG Key ID: D5490E4A81F97B14
6 changed files with 27 additions and 26 deletions

View File

@ -9,8 +9,8 @@ android {
applicationId 'org.nuclearfog.twidda'
minSdkVersion 16
targetSdkVersion 30
versionCode 35
versionName '1.8.11'
versionCode 36
versionName '1.8.12'
// limiting language support for smaller APK size
resConfigs 'en', 'de-rDE', 'zh-rCN'
vectorDrawables.useSupportLibrary true

View File

@ -72,7 +72,6 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, OnP
private Dialog loadingCircle, closeDialog;
private AlertDialog errorDialog;
@Nullable
private User user;
private String profileLink, bannerLink;
@ -283,26 +282,24 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, OnP
* Set current user's information
*/
private void setUser() {
if (user != null) {
if (user.hasProfileImage()) {
String pbLink = user.getImageLink();
if (!user.hasDefaultProfileImage())
pbLink += PROFILE_IMG_HIGH_RES;
Picasso.get().load(pbLink).transform(new RoundedCornersTransformation(5, 0)).into(profile_image);
}
if (user.hasBannerImage()) {
String bnLink = user.getBannerLink() + BANNER_IMG_MID_RES;
Picasso.get().load(bnLink).into(profile_banner, this);
addBannerBtn.setVisibility(INVISIBLE);
changeBannerBtn.setVisibility(VISIBLE);
} else {
addBannerBtn.setVisibility(VISIBLE);
changeBannerBtn.setVisibility(INVISIBLE);
}
name.setText(user.getUsername());
link.setText(user.getLink());
loc.setText(user.getLocation());
bio.setText(user.getBio());
if (user.hasProfileImage()) {
String pbLink = user.getImageLink();
if (!user.hasDefaultProfileImage())
pbLink += PROFILE_IMG_HIGH_RES;
Picasso.get().load(pbLink).transform(new RoundedCornersTransformation(5, 0)).into(profile_image);
}
if (user.hasBannerImage()) {
String bnLink = user.getBannerLink() + BANNER_IMG_MID_RES;
Picasso.get().load(bnLink).into(profile_banner, this);
addBannerBtn.setVisibility(INVISIBLE);
changeBannerBtn.setVisibility(VISIBLE);
} else {
addBannerBtn.setVisibility(VISIBLE);
changeBannerBtn.setVisibility(INVISIBLE);
}
name.setText(user.getUsername());
link.setText(user.getLink());
loc.setText(user.getLocation());
bio.setText(user.getBio());
}
}

View File

@ -21,8 +21,8 @@
<Button
android:id="@+id/edit_add_banner"
style="@style/FeedbackButton"
android:layout_width="88dp"
android:layout_height="20dp"
android:layout_width="wrap_content"
android:layout_height="@dimen/editprofile_button_height"
android:paddingLeft="@dimen/editprofile_button_padding"
android:paddingRight="@dimen/editprofile_button_padding"
android:text="@string/editprofile_add_banner"

View File

@ -106,6 +106,7 @@
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding"
android:textSize="@dimen/tweet_textsize_small"
android:minWidth="0dp"
android:visibility="invisible"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintHorizontal_chainStyle="packed"
@ -123,6 +124,7 @@
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding"
android:textSize="@dimen/tweet_textsize_small"
android:minWidth="0dp"
android:visibility="invisible"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/tweet_answer_reference"

View File

@ -116,7 +116,7 @@
<string name="error_connection_failed">Verbindung fehlgeschlagen!</string>
<string name="enter_username">Nutzernamen eingeben</string>
<string name="profile_banner">Profilbanner</string>
<string name="editprofile_add_banner">Profilbanner hinzufügen</string>
<string name="editprofile_add_banner">Banner einfügen</string>
<string name="error_invalid_link">Ungültiger Link!</string>
<string name="settings_app_information">App und Lizenzinformationen unter:</string>
<string name="error_rate_limit">Zu viele Anfragen! Bitte 15 Minuten warten!</string>

View File

@ -56,6 +56,8 @@
<dimen name="editprofile_layout_margin">5dp</dimen>
<dimen name="editprofile_layout_padding">20dp</dimen>
<dimen name="editprofile_button_padding">5dp</dimen>
<dimen name="editprofile_button_height">20sp</dimen>
<dimen name="editprofile_button_width">120sp</dimen>
<dimen name="editprofile_edittext_padding">5dp</dimen>
<dimen name="editprofile_bio_min_height">150dp</dimen>
<dimen name="editprofile_image">@dimen/profile_image_size</dimen>