converted Tweet page to ConstraintLayout, dependency update, bug fix

This commit is contained in:
nuclearfog 2021-01-23 17:09:27 +01:00
parent 7c1dedac4e
commit 230b0af8e9
No known key found for this signature in database
GPG Key ID: D5490E4A81F97B14
9 changed files with 307 additions and 234 deletions

View File

@ -37,10 +37,11 @@ android {
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'org.twitter4j:twitter4j-core:4.0.7'
@ -50,6 +51,5 @@ dependencies {
implementation 'com.github.QuadFlask:colorpicker:0.0.15'
implementation 'com.github.nuclearfog:ZoomView:1.0.2'
implementation 'com.github.nuclearfog:Tagger:2.2'
implementation 'com.github.nuclearfog:LinkAndScrollMovement:1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.github.nuclearfog:LinkAndScrollMovement:1.4'
}

View File

@ -96,10 +96,9 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
*/
public static final Pattern LINK_PATTERN = Pattern.compile("https://twitter.com/\\w+/status/\\d+");
private TextView tweet_api, tweetDate, tweetText, scrName, usrName, tweetLocName, retweeter, sensitive_media;
private Button rtwButton, favButton, replyName, tweetLocGPS;
private TextView tweet_api, tweetDate, tweetText, scrName, usrName, tweetLocName, sensitive_media;
private Button ansButton, rtwButton, favButton, replyName, tweetLocGPS, retweeter;
private ImageView profile_img, mediaButton;
private View header, footer;
private Dialog deleteDialog;
private GlobalSettings settings;
@ -115,10 +114,8 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
setContentView(R.layout.page_tweet);
Toolbar tool = findViewById(R.id.tweet_toolbar);
View root = findViewById(R.id.tweet_layout);
Button ansButton = findViewById(R.id.tweet_answer);
ViewPager pager = findViewById(R.id.tweet_pager);
header = findViewById(R.id.tweet_head);
footer = findViewById(R.id.tweet_foot);
ansButton = findViewById(R.id.tweet_answer);
rtwButton = findViewById(R.id.tweet_retweet);
favButton = findViewById(R.id.tweet_favorit);
usrName = findViewById(R.id.usernamedetail);
@ -162,6 +159,7 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
favButton.setCompoundDrawablesWithIntrinsicBounds(R.drawable.favorite, 0, 0, 0);
tweetLocGPS.setCompoundDrawablesWithIntrinsicBounds(R.drawable.userlocation, 0, 0, 0);
sensitive_media.setCompoundDrawablesWithIntrinsicBounds(R.drawable.sensitive, 0, 0, 0);
replyName.setCompoundDrawablesWithIntrinsicBounds(R.drawable.followback, 0, 0, 0);
retweeter.setCompoundDrawablesWithIntrinsicBounds(R.drawable.retweet, 0, 0, 0);
tweetText.setMovementMethod(LinkAndScrollMovement.getInstance());
tweetText.setLinkTextColor(settings.getHighlightColor());
@ -170,6 +168,7 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
setSupportActionBar(tool);
AppStyles.setTheme(settings, root);
retweeter.setOnClickListener(this);
replyName.setOnClickListener(this);
ansButton.setOnClickListener(this);
rtwButton.setOnClickListener(this);
@ -343,6 +342,12 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
}
startActivity(mediaIntent);
}
// go to user retweeting this tweet
else if (v.getId() == R.id.tweet_retweeter) {
Intent profile = new Intent(getApplicationContext(), UserProfile.class);
profile.putExtra(UserProfile.KEY_PROFILE_DATA, tweet.getUser());
startActivity(profile);
}
}
}
@ -441,6 +446,8 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
tweetUpdate = tweetUpdate.getEmbeddedTweet();
retweeter.setText(tweet.getUser().getScreenname());
retweeter.setVisibility(VISIBLE);
} else {
retweeter.setVisibility(GONE);
}
User author = tweetUpdate.getUser();
invalidateOptionsMenu();
@ -476,23 +483,23 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
tweet_api.setText(R.string.tweet_sent_from);
tweet_api.append(" " + tweetUpdate.getSource());
if (header.getVisibility() != VISIBLE) {
header.setVisibility(VISIBLE);
footer.setVisibility(VISIBLE);
}
if (!tweetUpdate.getTweet().trim().isEmpty()) {
if (tweetUpdate.containsTweetText()) {
Spannable sTweet = Tagger.makeTextWithLinks(tweetUpdate.getTweet(), settings.getHighlightColor(), this);
tweetText.setVisibility(VISIBLE);
tweetText.setText(sTweet);
} else {
tweetText.setVisibility(GONE);
}
if (tweetUpdate.getReplyId() > 0) {
replyName.setText(R.string.tweet_answering);
replyName.append(tweetUpdate.getReplyName());
replyName.setText(tweetUpdate.getReplyName());
replyName.setVisibility(VISIBLE);
} else {
replyName.setVisibility(GONE);
}
if (tweetUpdate.containsSensitiveMedia()) {
sensitive_media.setVisibility(VISIBLE);
} else {
sensitive_media.setVisibility(GONE);
}
if (tweetUpdate.getMediaType() == Tweet.MediaType.NONE) {
mediaButton.setVisibility(GONE);
@ -522,11 +529,20 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
if (placeName != null && !placeName.isEmpty()) {
tweetLocName.setVisibility(VISIBLE);
tweetLocName.setText(placeName);
} else {
tweetLocName.setVisibility(GONE);
}
String location = tweetUpdate.getLocationCoordinates();
if (location != null && !location.isEmpty()) {
tweetLocGPS.setVisibility(VISIBLE);
tweetLocGPS.setText(location);
} else {
tweetLocGPS.setVisibility(GONE);
}
if (rtwButton.getVisibility() != VISIBLE) {
rtwButton.setVisibility(VISIBLE);
favButton.setVisibility(VISIBLE);
ansButton.setVisibility(VISIBLE);
}
}

View File

@ -136,7 +136,6 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
private TextView txtLocation, txtCreated, lnkTxt, bioTxt, follow_back, txtUser, txtScrName;
private ImageView profileImage, bannerImage, toolbarBackground;
private Button following, follower;
private View profile_head;
private ViewPager pager;
private TabLayout tabLayout;
private Dialog unfollowConfirm, blockConfirm, muteConfirm;
@ -164,7 +163,6 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
txtUser = findViewById(R.id.profile_username);
txtScrName = findViewById(R.id.profile_screenname);
txtLocation = findViewById(R.id.location);
profile_head = findViewById(R.id.profile_header);
txtCreated = findViewById(R.id.profile_date);
follow_back = findViewById(R.id.follow_back);
pager = findViewById(R.id.profile_pager);
@ -563,8 +561,7 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
txtUser.setText(user.getUsername());
txtScrName.setText(user.getScreenname());
if (profile_head.getVisibility() != VISIBLE) {
profile_head.setVisibility(VISIBLE);
if (txtCreated.length() == 0) {
String date = SimpleDateFormat.getDateTimeInstance().format(user.getCreatedAt());
txtCreated.setText(date);
}
@ -620,6 +617,10 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
profileImage.setImageResource(0);
}
}
if (following.getVisibility() != VISIBLE) {
following.setVisibility(VISIBLE);
follower.setVisibility(VISIBLE);
}
}
/**

View File

@ -281,6 +281,15 @@ public class Tweet implements Serializable {
return mediaType;
}
/**
* check if tweet contains text
*
* @return true if text is set
*/
public boolean containsTweetText() {
return !tweet.trim().isEmpty();
}
/**
* check if tweet contains sensitive media
*

View File

@ -18,10 +18,8 @@
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/profile_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible">
android:layout_height="match_parent">
<ImageView
android:id="@+id/profile_banner"
@ -63,39 +61,37 @@
<TextView
android:id="@+id/profile_username"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/profile_username_margin"
android:layout_marginLeft="@dimen/profile_username_margin"
android:layout_marginEnd="@dimen/profile_tv_margin"
android:layout_marginRight="@dimen/profile_tv_margin"
android:layout_marginEnd="@dimen/profile_username_margin"
android:layout_marginRight="@dimen/profile_username_margin"
android:drawablePadding="@dimen/profile_padding_drawable"
android:padding="@dimen/profile_tv_padding"
android:padding="@dimen/profile_tv_background_padding"
android:singleLine="true"
android:textSize="@dimen/profile_textsize_big"
app:layout_constrainedWidth="true"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/profile_img"
app:layout_constraintBottom_toBottomOf="@+id/profile_banner"
app:layout_constraintStart_toEndOf="@+id/profile_img"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/profile_screenname"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/profile_username_margin"
android:layout_marginLeft="@dimen/profile_username_margin"
android:layout_marginEnd="@dimen/profile_tv_margin"
android:layout_marginRight="@dimen/profile_tv_margin"
android:layout_marginEnd="@dimen/profile_username_margin"
android:layout_marginRight="@dimen/profile_username_margin"
android:drawablePadding="@dimen/profile_padding_drawable"
android:padding="@dimen/profile_tv_padding"
android:padding="@dimen/profile_tv_background_padding"
android:singleLine="true"
android:textSize="@dimen/profile_textsize_big"
app:layout_constrainedWidth="true"
app:layout_constraintStart_toEndOf="@+id/profile_img"
app:layout_constraintTop_toBottomOf="@+id/profile_username" />
<TextView
android:id="@+id/follow_back"
android:layout_width="wrap_content"
@ -103,16 +99,16 @@
android:layout_marginStart="@dimen/profile_tv_margin"
android:layout_marginLeft="@dimen/profile_tv_margin"
android:drawablePadding="@dimen/profile_padding_drawable"
android:padding="@dimen/profile_tv_padding"
android:padding="@dimen/profile_tv_background_padding"
android:singleLine="true"
android:text="@string/follows_you"
android:textSize="@dimen/profile_textsize_big"
android:visibility="invisible"
app:layout_constrainedWidth="true"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/profile_screenname"
app:layout_constraintTop_toBottomOf="@+id/profile_username"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/profile_username" />
<Button
android:id="@+id/following"
@ -123,12 +119,13 @@
android:layout_marginLeft="@dimen/profile_button_margin"
android:layout_marginEnd="@dimen/profile_button_margin"
android:layout_marginRight="@dimen/profile_button_margin"
android:paddingLeft="@dimen/profile_button_padding"
android:paddingRight="@dimen/profile_button_padding"
android:paddingLeft="@dimen/profile_button_background_padding"
android:paddingRight="@dimen/profile_button_background_padding"
android:visibility="invisible"
app:layout_constraintEnd_toStartOf="@+id/follower"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/profile_img"
app:layout_constraintTop_toBottomOf="@+id/follow_back"
app:layout_constraintEnd_toStartOf="@+id/follower" />
app:layout_constraintTop_toBottomOf="@+id/profile_screenname" />
<Button
android:id="@+id/follower"
@ -139,12 +136,13 @@
android:layout_marginLeft="@dimen/profile_button_margin"
android:layout_marginEnd="@dimen/profile_button_margin"
android:layout_marginRight="@dimen/profile_button_margin"
android:paddingLeft="@dimen/profile_button_padding"
android:paddingRight="@dimen/profile_button_padding"
android:paddingLeft="@dimen/profile_button_background_padding"
android:paddingRight="@dimen/profile_button_background_padding"
android:visibility="invisible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/following"
app:layout_constraintTop_toTopOf="@+id/following"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toTopOf="@+id/following" />
<TextView
android:id="@+id/bio"
@ -158,9 +156,9 @@
android:linksClickable="true"
android:maxLines="@integer/profile_text_bio_lines"
android:scrollbars="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/following"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/following" />
<TextView
@ -174,10 +172,10 @@
android:drawablePadding="@dimen/profile_padding_drawable"
android:singleLine="true"
android:textSize="@dimen/profile_textsize_small"
app:layout_constraintEnd_toStartOf="@+id/links"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bio"
app:layout_constraintEnd_toStartOf="@+id/links" />
app:layout_constraintTop_toBottomOf="@+id/bio" />
<TextView
android:id="@+id/links"
@ -191,11 +189,17 @@
android:linksClickable="true"
android:singleLine="true"
android:textSize="@dimen/profile_textsize_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/location"
app:layout_constraintTop_toBottomOf="@+id/bio"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/bio" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/profile_date_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="links, location" />
<TextView
android:id="@+id/profile_date"
@ -210,7 +214,7 @@
android:textSize="@dimen/profile_textsize_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/location" />
app:layout_constraintTop_toBottomOf="@+id/profile_date_barrier" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tweet_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -27,158 +28,204 @@
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<LinearLayout
android:id="@+id/tweet_head"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/tweet_layout_margin"
android:paddingRight="@dimen/tweet_layout_margin"
android:visibility="invisible">
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/answer_reference_detail"
app:layout_constraintTop_toTopOf="@+id/answer_reference_detail">
<LinearLayout
android:layout_width="match_parent"
<ImageView
android:id="@+id/profileimage_detail"
android:layout_width="@dimen/tweet_profile"
android:layout_height="@dimen/tweet_profile"
android:layout_marginStart="@dimen/tweet_profileimage_margin"
android:layout_marginLeft="@dimen/tweet_profileimage_margin"
android:layout_marginTop="@dimen/tweet_profileimage_margin"
android:contentDescription="@string/profile_image"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/usernamedetail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginEnd="@dimen/tweet_textview_margin"
android:layout_marginRight="@dimen/tweet_textview_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/scrnamedetail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profileimage_detail"
app:layout_constraintTop_toTopOf="@+id/profileimage_detail" />
<ImageView
android:id="@+id/profileimage_detail"
android:layout_width="@dimen/tweet_profile"
android:layout_height="@dimen/tweet_profile"
android:contentDescription="@string/profile_image" />
<TextView
android:id="@+id/scrnamedetail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginEnd="@dimen/tweet_textview_margin"
android:layout_marginRight="@dimen/tweet_textview_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profileimage_detail"
app:layout_constraintTop_toBottomOf="@+id/usernamedetail" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_layout_margin"
android:layout_marginLeft="@dimen/tweet_layout_margin"
android:layout_marginBottom="@dimen/tweet_layout_margin"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/usernamedetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true" />
<TextView
android:id="@+id/scrnamedetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true" />
<TextView
android:id="@+id/timedetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_date" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/timedetail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginEnd="@dimen/tweet_textview_margin"
android:layout_marginRight="@dimen/tweet_textview_margin"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_small"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profileimage_detail"
app:layout_constraintTop_toBottomOf="@+id/scrnamedetail" />
<Button
android:id="@+id/answer_reference_detail"
style="@style/FeedbackButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/tweet_button_answer_height"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding"
android:layout_height="@dimen/tweet_button_height"
android:layout_marginStart="@dimen/tweet_button_margin"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:layout_marginTop="@dimen/tweet_button_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:textSize="@dimen/tweet_textsize_small"
android:visibility="gone"
style="@style/FeedbackButton" />
android:visibility="invisible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/profileimage_detail" />
<Button
android:id="@+id/tweet_retweeter"
style="@style/FeedbackButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/tweet_button_height"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginTop="@dimen/tweet_button_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:textSize="@dimen/tweet_textsize_small"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@id/answer_reference_detail"
app:layout_constraintTop_toBottomOf="@+id/profileimage_detail" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/tweet_text_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="tweet_retweeter, answer_reference_detail" />
<TextView
android:id="@+id/tweet_detailed"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/tweet_layout_margin"
android:layout_marginBottom="@dimen/tweet_layout_margin"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginEnd="@dimen/tweet_textview_margin"
android:layout_marginRight="@dimen/tweet_textview_margin"
android:fadeScrollbars="false"
android:linksClickable="true"
android:maxLines="@integer/tweet_test_max_lines"
android:scrollbars="vertical"
android:textSize="@dimen/tweet_textsize"
android:visibility="gone" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tweet_text_barrier" />
<ImageButton
android:id="@+id/tweet_media_attach"
style="@style/RoundButton"
android:layout_width="@dimen/tweet_button_media_width"
android:layout_height="@dimen/tweet_button_media_height"
android:layout_gravity="center"
android:layout_margin="@dimen/tweet_media_button_margin"
android:layout_marginTop="@dimen/tweet_button_margin"
android:contentDescription="@string/image_preview"
android:visibility="gone"
style="@style/RoundButton" />
android:visibility="invisible"
app:layout_constraintEnd_toEndOf="@+id/used_api"
app:layout_constraintStart_toStartOf="@+id/used_api"
app:layout_constraintTop_toBottomOf="@+id/tweet_detailed" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/tweet_retweeter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:textSize="@dimen/tweet_textsize_small"
android:visibility="gone" />
<TextView
android:id="@+id/tweet_sensitive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding"
android:singleLine="true"
android:text="@string/tweet_sensitive_media"
android:textSize="@dimen/tweet_textsize_small"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
<TextView
android:id="@+id/tweet_sensitive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_marginTop="@dimen/tweet_textview_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:singleLine="true"
android:text="@string/tweet_sensitive_media"
android:textSize="@dimen/tweet_textsize_small"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@+id/tweet_retweeter"
app:layout_constraintTop_toBottomOf="@+id/tweet_media_attach" />
<TextView
android:id="@+id/tweet_location_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_locale"
android:visibility="gone" />
<TextView
android:id="@+id/tweet_location_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginTop="@dimen/tweet_textview_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_locale"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tweet_sensitive" />
<Button
android:id="@+id/tweet_location_coordinate"
android:layout_width="wrap_content"
android:layout_height="@dimen/tweet_button_location"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:layout_marginRight="@dimen/tweet_button_margin"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding"
android:textSize="@dimen/tweet_textsize_locale"
android:visibility="gone"
style="@style/FeedbackButton" />
<Button
android:id="@+id/tweet_location_coordinate"
style="@style/FeedbackButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/tweet_button_height"
android:layout_marginStart="@dimen/tweet_button_margin"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_locale"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@+id/tweet_location_name"
app:layout_constraintTop_toTopOf="@+id/tweet_location_name" />
</LinearLayout>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/tweet_api_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="tweet_location_coordinate, tweet_location_name"
tools:layout_editor_absoluteY="206dp" />
<TextView
android:id="@+id/used_api"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginEnd="@dimen/tweet_textview_margin"
android:layout_marginRight="@dimen/tweet_textview_margin"
android:linksClickable="false"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_small" />
android:textSize="@dimen/tweet_textsize_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tweet_api_barrier" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
@ -190,64 +237,67 @@
android:fillViewport="true"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/tweet_foot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:addStatesFromChildren="false"
android:orientation="horizontal"
android:padding="@dimen/tweet_layout_padding"
android:visibility="invisible">
<Button
android:id="@+id/tweet_answer"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
android:layout_margin="@dimen/tweet_button_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:visibility="invisible"
app:layout_constraintEnd_toStartOf="@+id/tweet_retweet"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/tweet_answer"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:layout_marginRight="@dimen/tweet_button_margin"
android:layout_weight="1"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding" />
<Button
android:id="@+id/tweet_retweet"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
android:layout_margin="@dimen/tweet_button_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:visibility="invisible"
app:layout_constraintEnd_toStartOf="@+id/tweet_favorit"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/tweet_answer"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/tweet_retweet"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:layout_marginRight="@dimen/tweet_button_margin"
android:layout_weight="1"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding" />
<Button
android:id="@+id/tweet_favorit"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:layout_marginRight="@dimen/tweet_button_margin"
android:layout_weight="1"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding" />
</LinearLayout>
<Button
android:id="@+id/tweet_favorit"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
android:layout_margin="@dimen/tweet_button_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:visibility="invisible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/tweet_retweet"
app:layout_constraintTop_toTopOf="parent" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/tweet_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tweet_favorit"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
</LinearLayout>
</androidx.viewpager.widget.ViewPager>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -31,7 +31,6 @@
<string name="info_user_blocked">geblockt!</string>
<string name="info_user_unblocked">entblockt!</string>
<string name="info_tweet_removed">Tweet gelöscht!</string>
<string name="tweet_answering">"an "</string>
<string name="tweet_sent_from">"gesendet von: "</string>
<string name="menu_mute_user">stummschalten</string>
<string name="menu_unmute_user">Stummschaltung aufheben</string>

View File

@ -24,35 +24,30 @@
<!--dimens of page_tweet.xml-->
<dimen name="tweet_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="tweet_profile">56sp</dimen>
<dimen name="tweet_textsize_small">12sp</dimen>
<dimen name="tweet_media_button_margin">5dp</dimen>
<dimen name="tweet_button_location">16dp</dimen>
<dimen name="tweet_layout_margin">5dp</dimen>
<dimen name="tweet_profileimage_margin">10dp</dimen>
<dimen name="tweet_textview_margin">5dp</dimen>
<dimen name="tweet_button_margin">5dp</dimen>
<dimen name="tweet_button_height">20sp</dimen>
<dimen name="tweet_button_media_height">36dp</dimen>
<dimen name="tweet_button_media_width">64dp</dimen>
<dimen name="tweet_button_padding">5dp</dimen>
<dimen name="tweet_padding_drawable">5dp</dimen>
<dimen name="tweet_textsize_locale">12sp</dimen>
<dimen name="tweet_button_answer_height">20sp</dimen>
<dimen name="tweet_button_media_width">64dp</dimen>
<dimen name="tweet_button_media_height">40dp</dimen>
<dimen name="tweet_textsize_small">12sp</dimen>
<dimen name="tweet_textsize">18sp</dimen>
<dimen name="tweet_textsize_date">12sp</dimen>
<dimen name="tweet_layout_padding">6sp</dimen>
<dimen name="tweet_textsize_locale">12sp</dimen>
<integer name="tweet_test_max_lines">9</integer>
<!--dimens of page_profile.xml-->
<dimen name="profile_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="profile_toolbar_height">48dp</dimen>
<dimen name="profile_image_size">86sp</dimen>
<dimen name="profile_image_overlap_banner">-43sp</dimen>
<dimen name="profile_image_padding_left">10dp</dimen>
<dimen name="profile_tv_background_padding">2dp</dimen>
<dimen name="profile_tv_margin">5dp</dimen>
<dimen name="profile_tv_padding">2dp</dimen>
<dimen name="profile_username_margin">12dp</dimen>
<dimen name="profile_padding_drawable">5dp</dimen>
<dimen name="profile_button_height">20sp</dimen>
<dimen name="profile_button_margin">5dp</dimen>
<dimen name="profile_button_padding">5dp</dimen>
<dimen name="profile_button_background_padding">5dp</dimen>
<dimen name="profile_textsize_big">14sp</dimen>
<dimen name="profile_textsize_small">12sp</dimen>
<integer name="profile_text_bio_lines">3</integer>
@ -64,7 +59,7 @@
<dimen name="editprofile_edittext_padding">5dp</dimen>
<dimen name="editprofile_bio_min_height">150dp</dimen>
<dimen name="editprofile_image">@dimen/profile_image_size</dimen>
<dimen name="editprofile_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="editprofile_toolbar_height">@dimen/profile_toolbar_height</dimen>
<dimen name="editprofile_image_overlap_banner">@dimen/profile_image_overlap_banner</dimen>
<dimen name="editprofile_add_btn_size">40dp</dimen>
<dimen name="editprofile_profile_image_left_margin">10dp</dimen>

View File

@ -25,7 +25,6 @@
<string name="settings_clear_data">clear app data</string>
<string name="confirm_delete_tweet">delete tweet?</string>
<string name="confirm_delete_database">clear app data?</string>
<string name="tweet_answering">"to "</string>
<string name="tweet_sent_from">"sent from: "</string>
<string name="directmessage">Directmessage</string>
<string name="username">Username</string>