bug fix, layout fix

This commit is contained in:
nuclearfog 2020-03-27 13:17:53 +01:00
parent 61a9d30218
commit 5d08081f9d
No known key found for this signature in database
GPG Key ID: ED35E22099354A64
5 changed files with 32 additions and 12 deletions

View File

@ -118,6 +118,7 @@ public class AppSettings extends AppCompatActivity implements OnClickListener, O
load_picker.setMaxValue(10);
load_picker.setDisplayedValues(PICKER_SELECT);
load_picker.setWrapSelectorWheel(false);
load_picker.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
load_dialog_selector = new Dialog(this);
load_dialog_selector.setContentView(load_picker);

View File

@ -130,7 +130,7 @@ public class UserProfile extends AppCompatActivity implements OnClickListener,
bioTxt.setMovementMethod(LinkMovementMethod.getInstance());
tab.setSelectedTabIndicatorColor(settings.getHighlightColor());
bioTxt.setLinkTextColor(settings.getHighlightColor());
lnkTxt.setLinkTextColor(settings.getHighlightColor());
lnkTxt.setTextColor(settings.getHighlightColor());
root.setBackgroundColor(settings.getBackgroundColor());
tweetTabTxt.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.home_profile, 0, 0);
favorTabTxt.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.favorite_profile, 0, 0);
@ -495,7 +495,13 @@ public class UserProfile extends AppCompatActivity implements OnClickListener,
txtLocation.setVisibility(GONE);
}
if (!user.getLink().isEmpty()) {
lnkTxt.setText(user.getLink());
String link = user.getLink();
if (link.startsWith("http://"))
lnkTxt.setText(link.substring(7));
else if (link.startsWith("https://"))
lnkTxt.setText(link.substring(8));
else
lnkTxt.setText(link);
lnkTxt.setVisibility(VISIBLE);
} else {
lnkTxt.setVisibility(GONE);

View File

@ -71,7 +71,7 @@ public class Tweet {
replyUserId = status.getInReplyToUserId();
// remove HTML tag
String api = status.getSource();
String api = "" + status.getSource();
int start = api.indexOf('>') + 1;
int end = api.lastIndexOf('<');
if (start > 0 && end > 0)
@ -341,7 +341,7 @@ public class Tweet {
private String getText(Status status) {
URLEntity[] urlEntities = status.getURLEntities();
MediaEntity[] mediaEntities = status.getMediaEntities();
StringBuilder tweet = new StringBuilder(status.getText());
StringBuilder tweet = new StringBuilder("" + status.getText());
for (int i = urlEntities.length - 1; i >= 0; i--) { // expand shorten links
int start = urlEntities[i].getStart();
int end = urlEntities[i].getEnd();

View File

@ -33,11 +33,11 @@ public class TwitterUser {
userID = user.getId();
username = user.getName();
screenname = '@' + user.getScreenName();
profileImg = user.getOriginalProfileImageURLHttps();
profileImg = "" + user.getOriginalProfileImageURLHttps();
bio = getBio(user);
link = user.getURLEntity().getExpandedURL();
location = user.getLocation();
bannerImg = user.getProfileBannerURL();
link = "" + user.getURLEntity().getExpandedURL();
location = "" + user.getLocation();
bannerImg = "" + user.getProfileBannerURL();
isVerified = user.isVerified();
isLocked = user.isProtected();
created = user.getCreatedAt().getTime();
@ -205,7 +205,7 @@ public class TwitterUser {
*/
private String getBio(User user) {
URLEntity[] entities = user.getDescriptionURLEntities();
StringBuilder bio = new StringBuilder(user.getDescription());
StringBuilder bio = new StringBuilder("" + user.getDescription());
for (int i = entities.length - 1; i >= 0; i--) {
URLEntity entity = entities[i];
bio.replace(entity.getStart(), entity.getEnd(), entity.getExpandedURL());

View File

@ -105,10 +105,23 @@
android:layout_height="@dimen/divider"
android:background="?android:attr/listDivider" />
<Spinner
android:id="@+id/spinner_font"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:orientation="horizontal">
<Spinner
android:id="@+id/spinner_font"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
</LinearLayout>
<TextView
android:layout_width="match_parent"