layout fix, deep link update

This commit is contained in:
nuclearfog 2020-07-12 10:58:12 +02:00
parent a82a8277e5
commit 6a576b9720
No known key found for this signature in database
GPG Key ID: ED35E22099354A64
6 changed files with 22 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Point;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
@ -71,6 +72,7 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
setContentView(R.layout.page_editprofile);
Toolbar toolbar = findViewById(R.id.editprofile_toolbar);
View root = findViewById(R.id.page_edit);
View header = findViewById(R.id.editprofile_header);
profile_image = findViewById(R.id.edit_pb);
profile_banner = findViewById(R.id.edit_banner);
add_banner_btn = findViewById(R.id.edit_add_banner);
@ -88,6 +90,12 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
GlobalSettings settings = GlobalSettings.getInstance(this);
FontTool.setViewFontAndColor(settings, root);
root.setBackgroundColor(settings.getBackgroundColor());
Point displaySize = new Point();
getWindowManager().getDefaultDisplay().getSize(displaySize);
int layoutHeight = displaySize.x / 3;
int buttonHeight = (int) getResources().getDimension(R.dimen.editprofile_dummy_height);
header.getLayoutParams().height = layoutHeight + buttonHeight;
header.requestLayout();
loadingCircle.requestWindowFeature(FEATURE_NO_TITLE);
loadingCircle.setCanceledOnTouchOutside(false);

View File

@ -2,6 +2,7 @@ package org.nuclearfog.twidda.activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Point;
import android.net.Uri;
import android.os.Bundle;
import android.text.Spanned;
@ -509,7 +510,9 @@ public class UserProfile extends AppCompatActivity implements OnClickListener,
}
if (settings.getImageLoad()) {
if (user.hasBannerImg()) {
int layoutHeight = profile_layer.getMeasuredWidth() / 3;
Point displaySize = new Point();
getWindowManager().getDefaultDisplay().getSize(displaySize);
int layoutHeight = displaySize.x / 3;
int buttonHeight = (int) getResources().getDimension(R.dimen.profile_button_height);
profile_layer.getLayoutParams().height = layoutHeight + buttonHeight;
String bannerLink = user.getBannerLink() + "/600x200";

View File

@ -78,7 +78,13 @@ public class LinkContentLoader extends AsyncTask<Uri, Integer, LinkContentLoader
} else if (path.equals("intent/tweet")) {
if (link.isHierarchical()) {
String tweet = link.getQueryParameter("text");
String url = link.getQueryParameter("url");
String via = link.getQueryParameter("via");
if (tweet != null) {
if (url != null)
tweet += " " + url;
if (via != null)
tweet += " via @" + via;
data.putString(KEY_TWEETPOPUP_TEXT, tweet);
dataHolder = new DataHolder(data, TweetPopup.class);
}

View File

@ -73,6 +73,7 @@ public class UserListLoader extends AsyncTask<Long, Void, UserListHolder> {
return mTwitter.getRetweeter(id, cursor);
case FAVORIT:
// TODO not implemented in Twitter4J
break;
case SEARCH:

View File

@ -23,6 +23,7 @@
android:orientation="vertical">
<FrameLayout
android:id="@+id/editprofile_header"
android:layout_width="match_parent"
android:layout_height="@dimen/editprofile_banner_height"
android:layout_marginBottom="@dimen/editprofile_layout_margin"

View File

@ -57,7 +57,6 @@
<integer name="profile_text_bio_lines">3</integer>
<!--dimens of page_editprofile.xml-->
<dimen name="editprofile_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="editprofile_banner_height">144dp</dimen>
<dimen name="editprofile_image">80dp</dimen>
<dimen name="editprofile_image_margin">10dp</dimen>
@ -70,6 +69,8 @@
<dimen name="editprofile_edittext_padding">5dp</dimen>
<dimen name="editprofile_textsize">18sp</dimen>
<dimen name="editprofile_bio_maxheight">150dp</dimen>
<dimen name="editprofile_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="editprofile_dummy_height">@dimen/profile_button_height</dimen>
<!--dimens of item_tweet.xml-->
<dimen name="tweetitem_profile_small">36sp</dimen>