renamed view

This commit is contained in:
nuclearfog 2021-02-12 19:19:44 +01:00
parent 8305a3b25a
commit 51da68dc27
No known key found for this signature in database
GPG Key ID: D5490E4A81F97B14
2 changed files with 39 additions and 45 deletions

View File

@ -120,19 +120,19 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
toolbar = findViewById(R.id.tweet_toolbar);
ansButton = findViewById(R.id.tweet_answer);
rtwButton = findViewById(R.id.tweet_retweet);
favButton = findViewById(R.id.tweet_favorit);
usrName = findViewById(R.id.usernamedetail);
scrName = findViewById(R.id.scrnamedetail);
profile_img = findViewById(R.id.profileimage_detail);
replyName = findViewById(R.id.answer_reference_detail);
favButton = findViewById(R.id.tweet_favorite);
usrName = findViewById(R.id.tweet_username);
scrName = findViewById(R.id.tweet_screenname);
profile_img = findViewById(R.id.tweet_profile);
replyName = findViewById(R.id.tweet_answer_reference);
tweetText = findViewById(R.id.tweet_detailed);
tweetDate = findViewById(R.id.timedetail);
tweet_api = findViewById(R.id.used_api);
tweetDate = findViewById(R.id.tweet_date);
tweet_api = findViewById(R.id.tweet_api);
tweetLocName = findViewById(R.id.tweet_location_name);
tweetLocGPS = findViewById(R.id.tweet_location_coordinate);
mediaButton = findViewById(R.id.tweet_media_attach);
sensitive_media = findViewById(R.id.tweet_sensitive);
retweeter = findViewById(R.id.tweet_retweeter);
retweeter = findViewById(R.id.tweet_retweeter_reference);
Object data = getIntent().getSerializableExtra(KEY_TWEET_DATA);
long tweetId;
@ -305,13 +305,13 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
startActivity(userList);
}
// open profile of the tweet author
else if (v.getId() == R.id.profileimage_detail) {
else if (v.getId() == R.id.tweet_profile) {
Intent profile = new Intent(getApplicationContext(), UserProfile.class);
profile.putExtra(UserProfile.KEY_PROFILE_DATA, clickedTweet.getUser());
startActivity(profile);
}
// open replied tweet
else if (v.getId() == R.id.answer_reference_detail) {
else if (v.getId() == R.id.tweet_answer_reference) {
Intent answerIntent = new Intent(getApplicationContext(), TweetActivity.class);
answerIntent.putExtra(KEY_TWEET_ID, clickedTweet.getReplyId());
answerIntent.putExtra(KEY_TWEET_NAME, clickedTweet.getReplyName());
@ -347,7 +347,7 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
startActivity(mediaIntent);
}
// go to user retweeting this tweet
else if (v.getId() == R.id.tweet_retweeter) {
else if (v.getId() == R.id.tweet_retweeter_reference) {
Intent profile = new Intent(getApplicationContext(), UserProfile.class);
profile.putExtra(UserProfile.KEY_PROFILE_DATA, tweet.getUser());
startActivity(profile);
@ -370,7 +370,7 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
return true;
}
// favorite the tweet
else if (v.getId() == R.id.tweet_favorit) {
else if (v.getId() == R.id.tweet_favorite) {
if (tweet.favored())
statusAsync.execute(Action.UNFAVORITE);
else

View File

@ -1,7 +1,6 @@
<?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"
@ -15,8 +14,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
@ -33,7 +31,7 @@
android:layout_height="wrap_content">
<ImageView
android:id="@+id/profileimage_detail"
android:id="@+id/tweet_profile"
android:layout_width="@dimen/tweet_profile"
android:layout_height="@dimen/tweet_profile"
android:layout_marginStart="@dimen/tweet_profileimage_margin"
@ -44,7 +42,7 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/usernamedetail"
android:id="@+id/tweet_username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
@ -53,14 +51,14 @@
android:layout_marginRight="@dimen/tweet_textview_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true"
app:layout_constraintBottom_toTopOf="@+id/scrnamedetail"
app:layout_constraintBottom_toTopOf="@+id/tweet_screenname"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profileimage_detail"
app:layout_constraintTop_toTopOf="@+id/profileimage_detail"
app:layout_constraintStart_toEndOf="@+id/tweet_profile"
app:layout_constraintTop_toTopOf="@+id/tweet_profile"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/scrnamedetail"
android:id="@+id/tweet_screenname"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
@ -69,14 +67,14 @@
android:layout_marginRight="@dimen/tweet_textview_margin"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:singleLine="true"
app:layout_constraintBottom_toTopOf="@+id/timedetail"
app:layout_constraintBottom_toTopOf="@+id/tweet_date"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profileimage_detail"
app:layout_constraintTop_toBottomOf="@+id/usernamedetail"
app:layout_constraintStart_toEndOf="@+id/tweet_profile"
app:layout_constraintTop_toBottomOf="@+id/tweet_username"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/timedetail"
android:id="@+id/tweet_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
@ -85,10 +83,10 @@
android:layout_marginRight="@dimen/tweet_textview_margin"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_small"
app:layout_constraintBottom_toBottomOf="@+id/profileimage_detail"
app:layout_constraintBottom_toBottomOf="@+id/tweet_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profileimage_detail"
app:layout_constraintTop_toBottomOf="@+id/scrnamedetail"
app:layout_constraintStart_toEndOf="@+id/tweet_profile"
app:layout_constraintTop_toBottomOf="@+id/tweet_screenname"
app:layout_constraintVertical_chainStyle="packed" />
<androidx.constraintlayout.widget.Barrier
@ -96,11 +94,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="profileimage_detail, timedetail"
tools:layout_editor_absoluteY="219dp" />
app:constraint_referenced_ids="tweet_profile, tweet_date" />
<Button
android:id="@+id/answer_reference_detail"
android:id="@+id/tweet_answer_reference"
style="@style/FeedbackButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/tweet_button_height"
@ -116,10 +113,10 @@
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tweet_profile_barrier"
app:layout_constraintEnd_toStartOf="@id/tweet_retweeter" />
app:layout_constraintEnd_toStartOf="@id/tweet_retweeter_reference" />
<Button
android:id="@+id/tweet_retweeter"
android:id="@+id/tweet_retweeter_reference"
style="@style/FeedbackButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/tweet_button_height"
@ -132,7 +129,7 @@
android:textSize="@dimen/tweet_textsize_small"
android:visibility="invisible"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/answer_reference_detail"
app:layout_constraintStart_toEndOf="@id/tweet_answer_reference"
app:layout_constraintTop_toBottomOf="@+id/tweet_profile_barrier"
app:layout_constraintEnd_toEndOf="parent" />
@ -141,7 +138,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="tweet_retweeter, answer_reference_detail" />
app:constraint_referenced_ids="tweet_retweeter_reference, tweet_answer_reference" />
<TextView
android:id="@+id/tweet_detailed"
@ -168,8 +165,8 @@
android:layout_marginTop="@dimen/tweet_button_margin"
android:contentDescription="@string/image_preview"
android:visibility="invisible"
app:layout_constraintEnd_toEndOf="@+id/used_api"
app:layout_constraintStart_toStartOf="@+id/used_api"
app:layout_constraintEnd_toEndOf="@+id/tweet_api"
app:layout_constraintStart_toStartOf="@+id/tweet_api"
app:layout_constraintTop_toBottomOf="@+id/tweet_detailed" />
<TextView
@ -232,11 +229,10 @@
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" />
app:constraint_referenced_ids="tweet_location_coordinate, tweet_location_name" />
<TextView
android:id="@+id/used_api"
android:id="@+id/tweet_api"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tweet_textview_margin"
@ -293,14 +289,14 @@
android:paddingLeft="@dimen/tweet_button_margin"
android:paddingRight="@dimen/tweet_button_margin"
android:visibility="invisible"
app:layout_constraintEnd_toStartOf="@+id/tweet_favorit"
app:layout_constraintEnd_toStartOf="@+id/tweet_favorite"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/tweet_answer"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tweet_pager" />
<Button
android:id="@+id/tweet_favorit"
android:id="@+id/tweet_favorite"
style="@style/FeedbackButton"
android:layout_width="0dp"
android:layout_height="@dimen/tweet_button_height"
@ -322,9 +318,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tweet_favorit">
</androidx.viewpager.widget.ViewPager>
app:layout_constraintTop_toBottomOf="@+id/tweet_favorite" />
</androidx.constraintlayout.widget.ConstraintLayout>