tweet layout improvement, added tweet indicators, removed unused resources, bug fix
This commit is contained in:
parent
9599158af4
commit
f204537e8b
|
@ -1,12 +1,9 @@
|
|||
package org.nuclearfog.twidda.adapter;
|
||||
|
||||
import static android.graphics.PorterDuff.Mode.SRC_IN;
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static androidx.recyclerview.widget.RecyclerView.NO_ID;
|
||||
import static androidx.recyclerview.widget.RecyclerView.NO_POSITION;
|
||||
import static org.nuclearfog.twidda.backend.utils.StringTools.formatCreationTime;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
@ -27,6 +24,7 @@ import org.nuclearfog.twidda.R;
|
|||
import org.nuclearfog.twidda.adapter.holder.Footer;
|
||||
import org.nuclearfog.twidda.adapter.holder.TweetHolder;
|
||||
import org.nuclearfog.twidda.backend.utils.PicassoBuilder;
|
||||
import org.nuclearfog.twidda.backend.utils.StringTools;
|
||||
import org.nuclearfog.twidda.database.GlobalSettings;
|
||||
import org.nuclearfog.twidda.model.Tweet;
|
||||
import org.nuclearfog.twidda.model.User;
|
||||
|
@ -278,32 +276,36 @@ public class TweetAdapter extends Adapter<ViewHolder> {
|
|||
TweetHolder tweetItem = (TweetHolder) holder;
|
||||
User user = tweet.getAuthor();
|
||||
if (tweet.getEmbeddedTweet() != null) {
|
||||
tweetItem.textViews[5].setText(user.getScreenname());
|
||||
tweetItem.textViews[5].setVisibility(VISIBLE);
|
||||
tweetItem.retweeter.setText(user.getScreenname());
|
||||
tweetItem.retweeter.setVisibility(VISIBLE);
|
||||
tweetItem.rtUser.setVisibility(VISIBLE);
|
||||
tweet = tweet.getEmbeddedTweet();
|
||||
user = tweet.getAuthor();
|
||||
} else {
|
||||
tweetItem.textViews[5].setVisibility(INVISIBLE);
|
||||
tweetItem.rtUser.setVisibility(INVISIBLE);
|
||||
tweetItem.retweeter.setVisibility(GONE);
|
||||
tweetItem.rtUser.setVisibility(GONE);
|
||||
}
|
||||
Spanned text = Tagger.makeTextWithLinks(tweet.getText(), settings.getHighlightColor());
|
||||
tweetItem.textViews[2].setText(text);
|
||||
tweetItem.textViews[0].setText(user.getUsername());
|
||||
tweetItem.textViews[1].setText(user.getScreenname());
|
||||
tweetItem.textViews[3].setText(NUM_FORMAT.format(tweet.getRetweetCount()));
|
||||
tweetItem.textViews[4].setText(NUM_FORMAT.format(tweet.getFavoriteCount()));
|
||||
tweetItem.textViews[6].setText(formatCreationTime(resources, tweet.getTimestamp()));
|
||||
|
||||
if (tweet.isRetweeted()) {
|
||||
tweetItem.rtIcon.setColorFilter(settings.getRetweetIconColor(), SRC_IN);
|
||||
tweetItem.username.setText(user.getUsername());
|
||||
tweetItem.screenname.setText(user.getScreenname());
|
||||
tweetItem.retweet.setText(NUM_FORMAT.format(tweet.getRetweetCount()));
|
||||
tweetItem.favorite.setText(NUM_FORMAT.format(tweet.getFavoriteCount()));
|
||||
tweetItem.created.setText(StringTools.formatCreationTime(resources, tweet.getTimestamp()));
|
||||
if (!tweet.getText().isEmpty()) {
|
||||
Spanned text = Tagger.makeTextWithLinks(tweet.getText(), settings.getHighlightColor());
|
||||
tweetItem.tweettext.setText(text);
|
||||
tweetItem.tweettext.setVisibility(VISIBLE);
|
||||
} else {
|
||||
tweetItem.rtIcon.setColorFilter(settings.getIconColor(), SRC_IN);
|
||||
tweetItem.tweettext.setVisibility(GONE);
|
||||
}
|
||||
if (tweet.isRetweeted()) {
|
||||
tweetItem.rtIcon.setColorFilter(settings.getRetweetIconColor());
|
||||
} else {
|
||||
tweetItem.rtIcon.setColorFilter(settings.getIconColor());
|
||||
}
|
||||
if (tweet.isFavorited()) {
|
||||
tweetItem.favIcon.setColorFilter(settings.getFavoriteIconColor(), SRC_IN);
|
||||
tweetItem.favIcon.setColorFilter(settings.getFavoriteIconColor());
|
||||
} else {
|
||||
tweetItem.favIcon.setColorFilter(settings.getIconColor(), SRC_IN);
|
||||
tweetItem.favIcon.setColorFilter(settings.getIconColor());
|
||||
}
|
||||
if (user.isVerified()) {
|
||||
tweetItem.verifiedIcon.setVisibility(VISIBLE);
|
||||
|
@ -324,6 +326,32 @@ public class TweetAdapter extends Adapter<ViewHolder> {
|
|||
} else {
|
||||
tweetItem.profile.setImageResource(0);
|
||||
}
|
||||
if (tweet.getLocationName() != null && !tweet.getLocationName().isEmpty()) {
|
||||
tweetItem.location.setVisibility(VISIBLE);
|
||||
} else {
|
||||
tweetItem.location.setVisibility(GONE);
|
||||
}
|
||||
if (tweet.getRepliedTweetId() > 0) {
|
||||
tweetItem.reply.setVisibility(VISIBLE);
|
||||
tweetItem.replyname.setVisibility(VISIBLE);
|
||||
tweetItem.replyname.setText(tweet.getReplyName());
|
||||
} else {
|
||||
tweetItem.reply.setVisibility(GONE);
|
||||
tweetItem.replyname.setVisibility(GONE);
|
||||
}
|
||||
if (tweet.getMediaType() != Tweet.MEDIA_NONE) {
|
||||
if (tweet.getMediaType() == Tweet.MEDIA_PHOTO) {
|
||||
tweetItem.media.setImageResource(R.drawable.image);
|
||||
} else if (tweet.getMediaType() == Tweet.MEDIA_VIDEO) {
|
||||
tweetItem.media.setImageResource(R.drawable.video);
|
||||
} else if (tweet.getMediaType() == Tweet.MEDIA_GIF) {
|
||||
tweetItem.media.setImageResource(R.drawable.gif);
|
||||
}
|
||||
tweetItem.media.setColorFilter(settings.getIconColor());
|
||||
tweetItem.media.setVisibility(VISIBLE);
|
||||
} else {
|
||||
tweetItem.media.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
} else if (holder instanceof Footer) {
|
||||
Footer footer = (Footer) holder;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.nuclearfog.twidda.adapter.holder;
|
||||
|
||||
import static android.graphics.PorterDuff.Mode.SRC_IN;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
@ -11,50 +9,52 @@ import androidx.cardview.widget.CardView;
|
|||
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
|
||||
|
||||
import org.nuclearfog.twidda.R;
|
||||
import org.nuclearfog.twidda.backend.utils.AppStyles;
|
||||
import org.nuclearfog.twidda.database.GlobalSettings;
|
||||
|
||||
/**
|
||||
* Holder class for the tweet view
|
||||
* Holder class for the tweet item view
|
||||
*
|
||||
* @author nuclearfog
|
||||
* @see org.nuclearfog.twidda.adapter.TweetAdapter
|
||||
*/
|
||||
public class TweetHolder extends ViewHolder {
|
||||
|
||||
public final TextView[] textViews = new TextView[7];
|
||||
public final ImageView profile, rtUser, verifiedIcon, lockedIcon, rtIcon, favIcon;
|
||||
public final ImageView profile, rtUser, verifiedIcon, lockedIcon, rtIcon, favIcon, media, location, reply;
|
||||
public final TextView username, screenname, tweettext, retweet, favorite, retweeter, created, replyname;
|
||||
|
||||
/**
|
||||
* @param parent Parent view from adapter
|
||||
* @param parent Parent view from adapter
|
||||
* @param settings app settings to set theme
|
||||
*/
|
||||
public TweetHolder(ViewGroup parent, GlobalSettings settings) {
|
||||
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_tweet, parent, false));
|
||||
// get views
|
||||
CardView background = (CardView) itemView;
|
||||
profile = itemView.findViewById(R.id.tweetPb);
|
||||
verifiedIcon = itemView.findViewById(R.id.verified_icon);
|
||||
lockedIcon = itemView.findViewById(R.id.locked_icon);
|
||||
rtUser = itemView.findViewById(R.id.rt_user_icon);
|
||||
rtIcon = itemView.findViewById(R.id.rt_icon);
|
||||
favIcon = itemView.findViewById(R.id.fav_icon);
|
||||
textViews[0] = itemView.findViewById(R.id.username);
|
||||
textViews[1] = itemView.findViewById(R.id.screenname);
|
||||
textViews[2] = itemView.findViewById(R.id.tweettext);
|
||||
textViews[3] = itemView.findViewById(R.id.retweet_number);
|
||||
textViews[4] = itemView.findViewById(R.id.favorite_number);
|
||||
textViews[5] = itemView.findViewById(R.id.retweeter);
|
||||
textViews[6] = itemView.findViewById(R.id.time);
|
||||
// replace icon
|
||||
if (settings.likeEnabled())
|
||||
CardView cardLayout = (CardView) itemView;
|
||||
ViewGroup container = itemView.findViewById(R.id.item_tweet_container);
|
||||
profile = itemView.findViewById(R.id.item_tweet_profile_image);
|
||||
verifiedIcon = itemView.findViewById(R.id.item_tweet_verified_icon);
|
||||
lockedIcon = itemView.findViewById(R.id.item_tweet_locked_icon);
|
||||
rtUser = itemView.findViewById(R.id.item_tweet_retweeter_icon);
|
||||
rtIcon = itemView.findViewById(R.id.item_tweet_retweet_icon);
|
||||
favIcon = itemView.findViewById(R.id.item_tweet_favorite_icon);
|
||||
media = itemView.findViewById(R.id.item_tweet_media);
|
||||
location = itemView.findViewById(R.id.item_tweet_location);
|
||||
reply = itemView.findViewById(R.id.item_tweet_reply);
|
||||
username = itemView.findViewById(R.id.item_tweet_author_username);
|
||||
screenname = itemView.findViewById(R.id.item_tweet_author_screenname);
|
||||
tweettext = itemView.findViewById(R.id.item_tweet_text);
|
||||
retweet = itemView.findViewById(R.id.item_tweet_retweet_count);
|
||||
favorite = itemView.findViewById(R.id.item_tweet_favorite_count);
|
||||
retweeter = itemView.findViewById(R.id.item_tweet_retweeter_name);
|
||||
created = itemView.findViewById(R.id.item_tweet_created_at);
|
||||
replyname = itemView.findViewById(R.id.item_tweet_reply_name);
|
||||
|
||||
if (settings.likeEnabled()) {
|
||||
favIcon.setImageResource(R.drawable.like);
|
||||
// theme views
|
||||
verifiedIcon.setColorFilter(settings.getIconColor(), SRC_IN);
|
||||
lockedIcon.setColorFilter(settings.getIconColor(), SRC_IN);
|
||||
rtUser.setColorFilter(settings.getIconColor(), SRC_IN);
|
||||
background.setCardBackgroundColor(settings.getCardColor());
|
||||
for (TextView tv : textViews) {
|
||||
tv.setTextColor(settings.getFontColor());
|
||||
tv.setTypeface(settings.getTypeFace());
|
||||
} else {
|
||||
favIcon.setImageResource(R.drawable.favorite);
|
||||
}
|
||||
AppStyles.setTheme(container, 0);
|
||||
cardLayout.setCardBackgroundColor(settings.getCardColor());
|
||||
}
|
||||
}
|
|
@ -65,9 +65,9 @@ public class TweetV1 implements Tweet {
|
|||
|
||||
private long replyUserId = -1L;
|
||||
private long replyTweetId = -1L;
|
||||
private int mediaType = MEDIA_NONE;
|
||||
private String location = "";
|
||||
private String replyName = "";
|
||||
private String mediaType = MEDIA_NONE;
|
||||
|
||||
/**
|
||||
* @param json JSON object of a single tweet
|
||||
|
@ -75,6 +75,15 @@ public class TweetV1 implements Tweet {
|
|||
* @throws JSONException if values are missing
|
||||
*/
|
||||
public TweetV1(JSONObject json, long twitterId) throws JSONException {
|
||||
JSONObject locationJson = json.optJSONObject("place");
|
||||
JSONObject currentUserJson = json.optJSONObject("current_user_retweet");
|
||||
JSONObject embeddedTweetJson = json.optJSONObject("retweeted_status");
|
||||
String tweetIdStr = json.optString("id_str");
|
||||
String replyName = json.optString("in_reply_to_screen_name");
|
||||
String replyTweetIdStr = json.optString("in_reply_to_status_id_str");
|
||||
String replyUsrIdStr = json.optString("in_reply_to_user_id_str");
|
||||
String text = createText(json);
|
||||
|
||||
author = new UserV1(json.getJSONObject("user"), twitterId);
|
||||
retweetCount = json.optInt("retweet_count");
|
||||
favoriteCount = json.optInt("favorite_count");
|
||||
|
@ -85,21 +94,12 @@ public class TweetV1 implements Tweet {
|
|||
source = StringTools.getSource(json.optString("source"));
|
||||
coordinates = getLocation(json);
|
||||
mediaLinks = addMedia(json);
|
||||
text = createText(json);
|
||||
userMentions = StringTools.getUserMentions(text, author.getScreenname());
|
||||
|
||||
String idStr = json.optString("id_str");
|
||||
String replyName = json.optString("in_reply_to_screen_name");
|
||||
String replyTweetIdStr = json.optString("in_reply_to_status_id_str");
|
||||
String replyUsrIdStr = json.optString("in_reply_to_user_id_str");
|
||||
JSONObject locationJson = json.optJSONObject("place");
|
||||
JSONObject user_retweet = json.optJSONObject("current_user_retweet");
|
||||
JSONObject embedded_tweet = json.optJSONObject("retweeted_status");
|
||||
|
||||
if (ID_PATTERN.matcher(idStr).matches()) {
|
||||
id = Long.parseLong(idStr);
|
||||
if (ID_PATTERN.matcher(tweetIdStr).matches()) {
|
||||
id = Long.parseLong(tweetIdStr);
|
||||
} else {
|
||||
throw new JSONException("bad ID: " + idStr);
|
||||
throw new JSONException("bad ID: " + tweetIdStr);
|
||||
}
|
||||
if (!replyName.isEmpty() && !replyName.equals("null")) {
|
||||
this.replyName = '@' + replyName;
|
||||
|
@ -113,19 +113,21 @@ public class TweetV1 implements Tweet {
|
|||
if (locationJson != null) {
|
||||
location = locationJson.optString("full_name");
|
||||
}
|
||||
if (user_retweet != null) {
|
||||
String retweetIdStr = user_retweet.optString("id_str");
|
||||
if (currentUserJson != null) {
|
||||
String retweetIdStr = currentUserJson.optString("id_str");
|
||||
if (ID_PATTERN.matcher(retweetIdStr).matches()) {
|
||||
retweetId = Long.parseLong(retweetIdStr);
|
||||
}
|
||||
}
|
||||
if (embedded_tweet != null) {
|
||||
embeddedTweet = new TweetV1(embedded_tweet, twitterId);
|
||||
if (embeddedTweetJson != null) {
|
||||
embeddedTweet = new TweetV1(embeddedTweetJson, twitterId);
|
||||
}
|
||||
// remove short media link
|
||||
int linkPos = text.lastIndexOf("https://t.co/");
|
||||
if (linkPos >= 0) {
|
||||
text = text.substring(0, linkPos);
|
||||
this.text = text.substring(0, linkPos);
|
||||
} else {
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,7 +207,7 @@ public class TweetV1 implements Tweet {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getMediaType() {
|
||||
public int getMediaType() {
|
||||
return mediaType;
|
||||
}
|
||||
|
||||
|
@ -293,9 +295,6 @@ public class TweetV1 implements Tweet {
|
|||
*/
|
||||
public void setEmbeddedTweet(Tweet tweet) {
|
||||
this.embeddedTweet = tweet;
|
||||
// todo clone information of the retweet to this tweet
|
||||
// API bug: information of the retweet differs from this tweet
|
||||
// so we have to adjust them
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -311,7 +310,7 @@ public class TweetV1 implements Tweet {
|
|||
String[] links = new String[media.length()];
|
||||
String mime = mediaItem.getString("type");
|
||||
switch (mime) {
|
||||
case MEDIA_PHOTO:
|
||||
case "photo":
|
||||
mediaType = MEDIA_PHOTO;
|
||||
// get media URLs
|
||||
for (int pos = 0; pos < links.length; pos++) {
|
||||
|
@ -322,7 +321,7 @@ public class TweetV1 implements Tweet {
|
|||
}
|
||||
return links;
|
||||
|
||||
case MEDIA_VIDEO:
|
||||
case "video":
|
||||
mediaType = MEDIA_VIDEO;
|
||||
JSONObject video = mediaItem.getJSONObject("video_info");
|
||||
JSONArray videoVariants = video.getJSONArray("variants");
|
||||
|
@ -335,7 +334,7 @@ public class TweetV1 implements Tweet {
|
|||
}
|
||||
return links;
|
||||
|
||||
case MEDIA_GIF:
|
||||
case "animated_gif":
|
||||
mediaType = MEDIA_GIF;
|
||||
JSONObject gif = mediaItem.getJSONObject("video_info");
|
||||
JSONObject gifVariant = gif.getJSONArray("variants").getJSONObject(0);
|
||||
|
|
|
@ -131,7 +131,8 @@ public class TweetAction extends AsyncTask<Long, Tweet, Void> {
|
|||
publishProgress(newTweet);
|
||||
db.updateTweet(newTweet);
|
||||
// removing retweet reference to this tweet
|
||||
db.removeTweet(ids[1]);
|
||||
if (ids.length == 2)
|
||||
db.removeTweet(ids[1]);
|
||||
break;
|
||||
|
||||
case FAVORITE:
|
||||
|
|
|
@ -790,11 +790,11 @@ public class AppDatabase {
|
|||
} else {
|
||||
tweetFlags &= ~MEDIA_SENS_MASK;
|
||||
}
|
||||
if (Tweet.MEDIA_PHOTO.equals(tweet.getMediaType())) {
|
||||
if (tweet.getMediaType() == Tweet.MEDIA_PHOTO) {
|
||||
tweetFlags |= MEDIA_IMAGE_MASK;
|
||||
} else if (Tweet.MEDIA_VIDEO.equals(tweet.getMediaType())) {
|
||||
} else if (tweet.getMediaType() == Tweet.MEDIA_VIDEO) {
|
||||
tweetFlags |= MEDIA_VIDEO_MASK;
|
||||
} else if (Tweet.MEDIA_GIF.equals(tweet.getMediaType())) {
|
||||
} else if (tweet.getMediaType() == Tweet.MEDIA_GIF) {
|
||||
tweetFlags |= MEDIA_ANGIF_MASK;
|
||||
}
|
||||
ContentValues tweetUpdate = new ContentValues(16);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class TweetImpl implements Tweet {
|
|||
private User author;
|
||||
private int retweetCount;
|
||||
private int favoriteCount;
|
||||
private String mediaType;
|
||||
private int mediaType;
|
||||
private String locationName;
|
||||
private String locationCoordinates;
|
||||
private String replyName;
|
||||
|
@ -169,7 +169,7 @@ public class TweetImpl implements Tweet {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getMediaType() {
|
||||
public int getMediaType() {
|
||||
return mediaType;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,25 +14,25 @@ import java.io.Serializable;
|
|||
*/
|
||||
public interface Tweet extends Serializable {
|
||||
|
||||
/**
|
||||
* returned when the tweet doesn't contain any media
|
||||
*/
|
||||
int MEDIA_NONE = -1;
|
||||
|
||||
/**
|
||||
* returned when the tweet contains one or more images
|
||||
*/
|
||||
String MEDIA_PHOTO = "photo";
|
||||
int MEDIA_PHOTO = 800;
|
||||
|
||||
/**
|
||||
* returned when the tweet contains a video
|
||||
*/
|
||||
String MEDIA_VIDEO = "video";
|
||||
int MEDIA_VIDEO = 801;
|
||||
|
||||
/**
|
||||
* returned when the tweet contains an animated gif
|
||||
*/
|
||||
String MEDIA_GIF = "animated_gif";
|
||||
|
||||
/**
|
||||
* returned when the tweet doesn't contain any media
|
||||
*/
|
||||
String MEDIA_NONE = "*/*";
|
||||
int MEDIA_GIF = 802;
|
||||
|
||||
/**
|
||||
* @return tweet ID
|
||||
|
@ -109,7 +109,7 @@ public interface Tweet extends Serializable {
|
|||
/**
|
||||
* @return MIME type of media attached to the tweet
|
||||
*/
|
||||
String getMediaType();
|
||||
int getMediaType();
|
||||
|
||||
/**
|
||||
* @return true if tweet contains sensitive media
|
||||
|
|
|
@ -461,14 +461,14 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
|
|||
// open tweet media
|
||||
else if (v.getId() == R.id.tweet_media_attach) {
|
||||
// open embedded image links
|
||||
if (clickedTweet.getMediaType().equals(Tweet.MEDIA_PHOTO)) {
|
||||
if (clickedTweet.getMediaType() == Tweet.MEDIA_PHOTO) {
|
||||
Intent mediaIntent = new Intent(this, ImageViewer.class);
|
||||
mediaIntent.putExtra(ImageViewer.IMAGE_URIS, clickedTweet.getMediaUris());
|
||||
mediaIntent.putExtra(ImageViewer.IMAGE_DOWNLOAD, true);
|
||||
startActivity(mediaIntent);
|
||||
}
|
||||
// open embedded video link
|
||||
else if (clickedTweet.getMediaType().equals(Tweet.MEDIA_VIDEO)) {
|
||||
else if (clickedTweet.getMediaType() == Tweet.MEDIA_VIDEO) {
|
||||
if (!settings.isProxyEnabled() || (settings.isProxyEnabled() && settings.ignoreProxyWarning())) {
|
||||
Uri link = clickedTweet.getMediaUris()[0];
|
||||
Intent mediaIntent = new Intent(this, VideoViewer.class);
|
||||
|
@ -480,7 +480,7 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
|
|||
}
|
||||
}
|
||||
// open embedded gif link
|
||||
else if (clickedTweet.getMediaType().equals(Tweet.MEDIA_GIF)) {
|
||||
else if (clickedTweet.getMediaType() == Tweet.MEDIA_GIF) {
|
||||
Uri link = clickedTweet.getMediaUris()[0];
|
||||
Intent mediaIntent = new Intent(this, VideoViewer.class);
|
||||
mediaIntent.putExtra(VideoViewer.VIDEO_URI, link);
|
||||
|
@ -508,7 +508,11 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
|
|||
} else {
|
||||
statusAsync = new TweetAction(this, TweetAction.RETWEET);
|
||||
}
|
||||
statusAsync.execute(tweet.getId(), tweet.getRetweetId());
|
||||
|
||||
if (tweet.getEmbeddedTweet() != null)
|
||||
statusAsync.execute(tweet.getId(), tweet.getEmbeddedTweet().getRetweetId());
|
||||
else
|
||||
statusAsync.execute(tweet.getId());
|
||||
Toast.makeText(this, R.string.info_loading, LENGTH_SHORT).show();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#1fffFFFF" />
|
||||
<solid android:color="#1FFFFFFF" />
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#1FFFFFFF" />
|
||||
<size android:width="20dp" android:height="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
|
@ -12,10 +12,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/confirm_text_margin"
|
||||
android:layout_marginLeft="@dimen/confirm_text_margin"
|
||||
android:layout_marginTop="@dimen/confirm_text_margin"
|
||||
android:layout_marginEnd="@dimen/confirm_text_margin"
|
||||
android:layout_marginRight="@dimen/confirm_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/confirm_title_fontsize"
|
||||
app:layout_constraintBottom_toTopOf="@id/confirm_message"
|
||||
|
|
|
@ -70,9 +70,7 @@
|
|||
android:id="@+id/dm_screenname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dmitem_text_margin"
|
||||
android:layout_marginStart="@dimen/dmitem_text_margin"
|
||||
android:layout_marginRight="@dimen/dmitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/dmitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dmitem_textsize_name"
|
||||
|
@ -151,10 +149,8 @@
|
|||
android:id="@+id/dm_answer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dmitem_button_height"
|
||||
android:layout_marginLeft="@dimen/dmitem_button_margin"
|
||||
android:layout_marginStart="@dimen/dmitem_button_margin"
|
||||
android:layout_marginTop="@dimen/dmitem_button_margin"
|
||||
android:layout_marginRight="@dimen/dmitem_button_margin"
|
||||
android:layout_marginEnd="@dimen/dmitem_button_margin"
|
||||
android:singleLine="true"
|
||||
android:text="@string/dm_answer"
|
||||
|
|
|
@ -134,9 +134,7 @@
|
|||
android:id="@+id/list_follow_icon"
|
||||
android:layout_width="@dimen/listitem_icon_size_big"
|
||||
android:layout_height="@dimen/listitem_icon_size_big"
|
||||
android:layout_marginLeft="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginStart="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginRight="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginEnd="@dimen/listitem_padding_drawable"
|
||||
android:src="@drawable/back"
|
||||
app:layout_constraintStart_toEndOf="@id/list_title"
|
||||
|
@ -183,9 +181,7 @@
|
|||
android:id="@+id/list_member_icon"
|
||||
android:layout_width="@dimen/listitem_icon_size"
|
||||
android:layout_height="@dimen/listitem_icon_size"
|
||||
android:layout_marginLeft="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginStart="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginRight="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginEnd="@dimen/listitem_padding_drawable"
|
||||
android:src="@drawable/user"
|
||||
app:layout_constraintStart_toEndOf="@id/listitem_placeholder"
|
||||
|
@ -209,9 +205,7 @@
|
|||
android:id="@+id/list_subscriber_icon"
|
||||
android:layout_width="@dimen/listitem_icon_size"
|
||||
android:layout_height="@dimen/listitem_icon_size"
|
||||
android:layout_marginLeft="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginStart="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginRight="@dimen/listitem_padding_drawable"
|
||||
android:layout_marginEnd="@dimen/listitem_padding_drawable"
|
||||
android:src="@drawable/subscriber"
|
||||
app:layout_constraintStart_toEndOf="@id/list_member"
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
style="@style/CardViewStyle">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/item_tweet_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/tweetitem_layout_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tweetPb"
|
||||
android:id="@+id/item_tweet_profile_image"
|
||||
android:layout_width="@dimen/tweetitem_profile_size"
|
||||
android:layout_height="@dimen/tweetitem_profile_size"
|
||||
android:contentDescription="@string/profile_image"
|
||||
|
@ -20,155 +21,223 @@
|
|||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/verified_icon"
|
||||
android:id="@+id/item_tweet_verified_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:layout_marginStart="@dimen/tweetitem_padding_drawable"
|
||||
android:layout_marginStart="@dimen/tweetitem_drawable_margin"
|
||||
android:src="@drawable/verify"
|
||||
app:layout_constraintStart_toEndOf="@id/tweetPb"
|
||||
app:layout_constraintTop_toTopOf="@id/username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/username"
|
||||
app:layout_constraintEnd_toStartOf="@id/username"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_profile_image"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_author_username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_author_username"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_author_username"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
android:id="@+id/item_tweet_author_username"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintStart_toEndOf="@id/verified_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/tweetPb"
|
||||
app:layout_constraintBottom_toTopOf="@id/screenname"
|
||||
app:layout_constraintEnd_toStartOf="@id/time" />
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_verified_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_profile_image"
|
||||
app:layout_constraintBottom_toTopOf="@id/item_tweet_author_screenname"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_created_at" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:id="@+id/item_tweet_created_at"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_date"
|
||||
app:layout_constraintStart_toEndOf="@id/username"
|
||||
app:layout_constraintTop_toTopOf="@id/username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/username"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_author_username"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_author_username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_author_username"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/locked_icon"
|
||||
android:id="@+id/item_tweet_locked_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:layout_marginStart="@dimen/tweetitem_padding_drawable"
|
||||
android:layout_marginStart="@dimen/tweetitem_drawable_margin"
|
||||
android:src="@drawable/lock"
|
||||
app:layout_constraintStart_toEndOf="@id/tweetPb"
|
||||
app:layout_constraintTop_toTopOf="@id/screenname"
|
||||
app:layout_constraintBottom_toBottomOf="@id/screenname"
|
||||
app:layout_constraintEnd_toStartOf="@id/screenname"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_profile_image"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_author_screenname"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_author_screenname"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_author_screenname"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/screenname"
|
||||
android:id="@+id/item_tweet_author_screenname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintStart_toEndOf="@id/locked_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tweetPb"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_locked_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_author_username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_profile_image"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/tweet_text_barrier"
|
||||
android:id="@+id/item_tweet_user_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="screenname, tweetPb" />
|
||||
app:constraint_referenced_ids="item_tweet_author_screenname, item_tweet_profile_image" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_tweet_reply"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:src="@drawable/back"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_reply_name"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_reply_name"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_reply_name"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tweettext"
|
||||
android:id="@+id/item_tweet_reply_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_reply"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_user_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_retweeter_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_tweet_retweeter_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:src="@drawable/retweet"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_reply_name"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_retweeter_name"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_retweeter_name"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_retweeter_name"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_retweeter_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_retweeter_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_user_barrier" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/item_tweet_text_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="item_tweet_reply,item_tweet_reply_name,item_tweet_retweeter_icon,item_tweet_retweeter_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tweet_text_barrier"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_text_barrier"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rt_user_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:src="@drawable/retweet"
|
||||
<ImageButton
|
||||
android:id="@+id/item_tweet_media"
|
||||
android:layout_width="@dimen/tweetitem_indicator_size"
|
||||
android:layout_height="@dimen/tweetitem_indicator_size"
|
||||
android:background="@drawable/round"
|
||||
android:src="@drawable/image"
|
||||
android:layout_margin="@dimen/tweetitem_indicator_margin"
|
||||
android:padding="@dimen/tweetitem_indicator_padding"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tweettext"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/retweeter"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_text"
|
||||
app:layout_constraintBottom_toTopOf="@id/item_tweet_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_location"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/retweeter"
|
||||
android:layout_width="0dp"
|
||||
<ImageButton
|
||||
android:id="@+id/item_tweet_location"
|
||||
android:layout_width="@dimen/tweetitem_indicator_size"
|
||||
android:layout_height="@dimen/tweetitem_indicator_size"
|
||||
android:background="@drawable/round"
|
||||
android:src="@drawable/location"
|
||||
android:layout_margin="@dimen/tweetitem_indicator_margin"
|
||||
android:padding="@dimen/tweetitem_indicator_padding"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_media"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_text"
|
||||
app:layout_constraintBottom_toTopOf="@id/item_tweet_icon_barrier"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/item_tweet_icon_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginRight="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/rt_user_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/rt_user_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/rt_user_icon"
|
||||
app:layout_constraintEnd_toStartOf="@id/rt_icon" />
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="item_tweet_media,item_tweet_location" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_tweet_indicator_placeholder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_retweet_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rt_icon"
|
||||
android:id="@+id/item_tweet_retweet_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:src="@drawable/retweet"
|
||||
app:layout_constraintStart_toEndOf="@id/retweeter"
|
||||
app:layout_constraintTop_toBottomOf="@id/tweettext"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/retweet_number"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_indicator_placeholder"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_retweet_count"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/retweet_number"
|
||||
android:id="@+id/item_tweet_retweet_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginRight="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/rt_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/rt_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/rt_icon"
|
||||
app:layout_constraintEnd_toStartOf="@id/fav_icon" />
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_retweet_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_retweet_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_tweet_retweet_icon"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_favorite_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fav_icon"
|
||||
android:id="@+id/item_tweet_favorite_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:src="@drawable/favorite"
|
||||
app:layout_constraintStart_toEndOf="@id/retweet_number"
|
||||
app:layout_constraintTop_toBottomOf="@id/tweettext"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/favorite_number"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_retweet_count"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_tweet_favorite_count"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/favorite_number"
|
||||
android:id="@+id/item_tweet_favorite_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginRight="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/fav_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/fav_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fav_icon"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_favorite_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_favorite_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -38,9 +38,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginLeft="@dimen/useritem_textview_padding"
|
||||
android:layout_marginStart="@dimen/useritem_textview_padding"
|
||||
android:layout_marginRight="@dimen/useritem_textview_padding"
|
||||
android:layout_marginEnd="@dimen/useritem_textview_padding"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintStart_toEndOf="@id/useritem_verified"
|
||||
|
@ -65,9 +63,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginLeft="@dimen/useritem_textview_padding"
|
||||
android:layout_marginStart="@dimen/useritem_textview_padding"
|
||||
android:layout_marginRight="@dimen/useritem_textview_padding"
|
||||
android:layout_marginEnd="@dimen/useritem_textview_padding"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintStart_toEndOf="@id/useritem_locked"
|
||||
|
@ -78,9 +74,7 @@
|
|||
android:id="@+id/following_icon"
|
||||
android:layout_width="@dimen/useritem_icon_size"
|
||||
android:layout_height="@dimen/useritem_icon_size"
|
||||
android:layout_marginLeft="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginStart="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginRight="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginEnd="@dimen/useritem_drawable_margin"
|
||||
android:src="@drawable/following"
|
||||
app:layout_constraintStart_toEndOf="@id/user_profileimg"
|
||||
|
@ -105,9 +99,7 @@
|
|||
android:id="@+id/follower_icon"
|
||||
android:layout_width="@dimen/useritem_icon_size"
|
||||
android:layout_height="@dimen/useritem_icon_size"
|
||||
android:layout_marginLeft="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginStart="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginRight="@dimen/useritem_drawable_margin"
|
||||
android:layout_marginEnd="@dimen/useritem_drawable_margin"
|
||||
android:src="@drawable/follower"
|
||||
app:layout_constraintStart_toEndOf="@id/item_user_friends"
|
||||
|
|
|
@ -99,8 +99,8 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/editprofile_layout_padding"
|
||||
android:layout_marginRight="@dimen/editprofile_layout_padding">
|
||||
android:layout_marginStart="@dimen/editprofile_layout_padding"
|
||||
android:layout_marginEnd="@dimen/editprofile_layout_padding">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -69,9 +69,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/profile_tv_background_padding"
|
||||
android:drawablePadding="@dimen/profile_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/profile_username_margin"
|
||||
android:layout_marginStart="@dimen/profile_username_margin"
|
||||
android:layout_marginRight="@dimen/profile_username_margin"
|
||||
android:layout_marginEnd="@dimen/profile_username_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/profile_textsize_big"
|
||||
|
@ -87,9 +85,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/profile_tv_background_padding"
|
||||
android:drawablePadding="@dimen/profile_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/profile_username_margin"
|
||||
android:layout_marginStart="@dimen/profile_username_margin"
|
||||
android:layout_marginRight="@dimen/profile_username_margin"
|
||||
android:layout_marginEnd="@dimen/profile_username_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/profile_textsize_big"
|
||||
|
@ -124,9 +120,7 @@
|
|||
android:visibility="invisible"
|
||||
android:paddingLeft="@dimen/profile_button_background_padding"
|
||||
android:paddingRight="@dimen/profile_button_background_padding"
|
||||
android:layout_marginLeft="@dimen/profile_button_margin"
|
||||
android:layout_marginStart="@dimen/profile_button_margin"
|
||||
android:layout_marginRight="@dimen/profile_button_margin"
|
||||
android:layout_marginEnd="@dimen/profile_button_margin"
|
||||
android:textSize="@dimen/profile_textsize_big"
|
||||
app:layout_constraintStart_toEndOf="@id/profile_img"
|
||||
|
@ -142,9 +136,7 @@
|
|||
android:visibility="invisible"
|
||||
android:paddingLeft="@dimen/profile_button_background_padding"
|
||||
android:paddingRight="@dimen/profile_button_background_padding"
|
||||
android:layout_marginLeft="@dimen/profile_button_margin"
|
||||
android:layout_marginStart="@dimen/profile_button_margin"
|
||||
android:layout_marginRight="@dimen/profile_button_margin"
|
||||
android:layout_marginEnd="@dimen/profile_button_margin"
|
||||
android:textSize="@dimen/profile_textsize_big"
|
||||
app:layout_constraintStart_toEndOf="@id/following"
|
||||
|
@ -164,10 +156,8 @@
|
|||
android:id="@+id/bio"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/profile_tv_margin"
|
||||
android:layout_marginStart="@dimen/profile_tv_margin"
|
||||
android:layout_marginTop="@dimen/profile_tv_margin"
|
||||
android:layout_marginRight="@dimen/profile_tv_margin"
|
||||
android:layout_marginEnd="@dimen/profile_tv_margin"
|
||||
android:fadeScrollbars="false"
|
||||
android:linksClickable="true"
|
||||
|
@ -184,9 +174,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:drawablePadding="@dimen/profile_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/profile_tv_margin"
|
||||
android:layout_marginStart="@dimen/profile_tv_margin"
|
||||
android:layout_marginRight="@dimen/profile_tv_margin"
|
||||
android:layout_marginEnd="@dimen/profile_tv_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/profile_textsize_small"
|
||||
|
@ -201,9 +189,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:drawablePadding="@dimen/profile_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/profile_tv_margin"
|
||||
android:layout_marginStart="@dimen/profile_tv_margin"
|
||||
android:layout_marginRight="@dimen/profile_tv_margin"
|
||||
android:layout_marginEnd="@dimen/profile_tv_margin"
|
||||
android:linksClickable="true"
|
||||
android:singleLine="true"
|
||||
|
@ -226,9 +212,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:drawablePadding="@dimen/profile_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/profile_tv_margin"
|
||||
android:layout_marginStart="@dimen/profile_tv_margin"
|
||||
android:layout_marginRight="@dimen/profile_tv_margin"
|
||||
android:layout_marginEnd="@dimen/profile_tv_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/profile_textsize_small"
|
||||
|
|
|
@ -47,9 +47,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/tweet_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/tweet_textview_margin"
|
||||
android:layout_marginStart="@dimen/tweet_textview_margin"
|
||||
android:layout_marginRight="@dimen/tweet_textview_margin"
|
||||
android:layout_marginEnd="@dimen/tweet_textview_margin"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintStart_toEndOf="@id/tweet_profile"
|
||||
|
@ -63,9 +61,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/tweet_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/tweet_textview_margin"
|
||||
android:layout_marginStart="@dimen/tweet_textview_margin"
|
||||
android:layout_marginRight="@dimen/tweet_textview_margin"
|
||||
android:layout_marginEnd="@dimen/tweet_textview_margin"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintStart_toEndOf="@id/tweet_profile"
|
||||
|
@ -78,9 +74,7 @@
|
|||
android:id="@+id/tweet_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/tweet_textview_margin"
|
||||
android:layout_marginStart="@dimen/tweet_textview_margin"
|
||||
android:layout_marginRight="@dimen/tweet_textview_margin"
|
||||
android:layout_marginEnd="@dimen/tweet_textview_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweet_textsize_small"
|
||||
|
@ -143,10 +137,8 @@
|
|||
android:id="@+id/tweet_detailed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/tweet_textview_margin"
|
||||
android:layout_marginStart="@dimen/tweet_textview_margin"
|
||||
android:layout_marginTop="@dimen/tweet_textview_margin"
|
||||
android:layout_marginRight="@dimen/tweet_textview_margin"
|
||||
android:layout_marginEnd="@dimen/tweet_textview_margin"
|
||||
android:fadeScrollbars="false"
|
||||
android:linksClickable="true"
|
||||
|
@ -164,6 +156,8 @@
|
|||
android:visibility="invisible"
|
||||
android:layout_marginTop="@dimen/tweet_button_margin"
|
||||
android:contentDescription="@string/image_preview"
|
||||
android:scaleType="fitCenter"
|
||||
android:padding="@dimen/tweet_button_drawable_padding"
|
||||
app:layout_constraintStart_toStartOf="@id/tweet_api"
|
||||
app:layout_constraintTop_toBottomOf="@id/tweet_detailed"
|
||||
app:layout_constraintEnd_toEndOf="@id/tweet_api"
|
||||
|
@ -175,10 +169,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:drawablePadding="@dimen/tweet_padding_drawable"
|
||||
android:layout_marginLeft="@dimen/tweet_textview_margin"
|
||||
android:layout_marginStart="@dimen/tweet_textview_margin"
|
||||
android:layout_marginTop="@dimen/tweet_textview_margin"
|
||||
android:layout_marginRight="@dimen/tweet_textview_margin"
|
||||
android:layout_marginEnd="@dimen/tweet_textview_margin"
|
||||
android:singleLine="true"
|
||||
android:text="@string/tweet_sensitive_media"
|
||||
|
@ -231,9 +223,7 @@
|
|||
android:id="@+id/tweet_api"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/tweet_textview_margin"
|
||||
android:layout_marginStart="@dimen/tweet_textview_margin"
|
||||
android:layout_marginRight="@dimen/tweet_textview_margin"
|
||||
android:layout_marginEnd="@dimen/tweet_textview_margin"
|
||||
android:linksClickable="false"
|
||||
android:singleLine="true"
|
||||
|
|
|
@ -43,10 +43,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="@dimen/dmpopup_button_padding"
|
||||
android:layout_marginLeft="@dimen/dmpopup_button_margin"
|
||||
android:layout_marginStart="@dimen/dmpopup_button_margin"
|
||||
android:layout_marginTop="@dimen/dmpopup_margin_background"
|
||||
android:layout_marginRight="@dimen/dmpopup_button_margin"
|
||||
android:layout_marginEnd="@dimen/dmpopup_button_margin"
|
||||
android:contentDescription="@string/tweet_add_image"
|
||||
android:scaleType="fitCenter"
|
||||
|
@ -108,11 +106,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginLeft="@dimen/dmpopup_margin_background"
|
||||
android:layout_marginStart="@dimen/dmpopup_margin_background"
|
||||
android:layout_marginTop="@dimen/dmpopup_text_margin"
|
||||
android:layout_marginBottom="@dimen/dmpopup_margin_background"
|
||||
android:layout_marginRight="@dimen/dmpopup_margin_background"
|
||||
android:layout_marginEnd="@dimen/dmpopup_margin_background"
|
||||
android:gravity="start"
|
||||
android:hint="@string/dm_message"
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginLeft="@dimen/tweetpopup_margin_layout"
|
||||
android:layout_marginStart="@dimen/tweetpopup_margin_layout"
|
||||
android:layout_marginTop="@dimen/tweetpopup_margin_layout"
|
||||
android:layout_marginRight="@dimen/tweetpopup_margin_layout"
|
||||
android:layout_marginEnd="@dimen/tweetpopup_margin_layout"
|
||||
android:gravity="top"
|
||||
android:hint="@string/popup_tweet_hint"
|
||||
|
|
|
@ -24,10 +24,8 @@
|
|||
android:id="@+id/popup_list_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginStart="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginTop="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginRight="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginEnd="@dimen/popup_userlist_background_margin"
|
||||
android:singleLine="true"
|
||||
android:text="@string/userlist_create_new_list"
|
||||
|
@ -41,10 +39,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginLeft="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginStart="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginTop="@dimen/popup_userlist_text_margin"
|
||||
android:layout_marginRight="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginEnd="@dimen/popup_userlist_background_margin"
|
||||
android:autofillHints="@string/userlist_enter_title"
|
||||
android:ems="10"
|
||||
|
@ -61,11 +57,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginLeft="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginStart="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginTop="@dimen/popup_userlist_text_margin"
|
||||
android:layout_marginBottom="@dimen/popup_userlist_text_margin"
|
||||
android:layout_marginRight="@dimen/popup_userlist_background_margin"
|
||||
android:layout_marginEnd="@dimen/popup_userlist_background_margin"
|
||||
android:gravity="top"
|
||||
android:autofillHints="@string/userlist_enter_description"
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorAccent">@android:color/white</item>
|
||||
<item name="android:colorBackground">@color/background</item>
|
||||
<item name="android:navigationBarColor">@android:color/black</item>
|
||||
<item name="android:windowAnimationStyle">@style/TransactionPending</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -32,11 +32,12 @@
|
|||
<dimen name="tweet_button_padding">5dp</dimen>
|
||||
<dimen name="tweet_button_height">20sp</dimen>
|
||||
<dimen name="tweet_padding_drawable">5dp</dimen>
|
||||
<dimen name="tweet_button_media_width">64dp</dimen>
|
||||
<dimen name="tweet_button_media_height">40dp</dimen>
|
||||
<dimen name="tweet_button_media_width">58dp</dimen>
|
||||
<dimen name="tweet_button_media_height">36dp</dimen>
|
||||
<dimen name="tweet_textsize_small">12sp</dimen>
|
||||
<dimen name="tweet_textsize">18sp</dimen>
|
||||
<dimen name="tweet_textsize_locale">12sp</dimen>
|
||||
<dimen name="tweet_button_drawable_padding">5dp</dimen>
|
||||
<integer name="tweet_text_max_lines">5</integer>
|
||||
|
||||
<!--dimens of page_profile.xml-->
|
||||
|
@ -71,11 +72,15 @@
|
|||
<!--dimens of item_tweet.xml-->
|
||||
<dimen name="tweetitem_profile_size">36sp</dimen>
|
||||
<dimen name="tweetitem_layout_padding">5dp</dimen>
|
||||
<dimen name="tweetitem_layout_margin">5dp</dimen>
|
||||
<dimen name="tweetitem_text_margin">5dp</dimen>
|
||||
<dimen name="tweetitem_padding_drawable">5dp</dimen>
|
||||
<dimen name="tweetitem_drawable_margin">5dp</dimen>
|
||||
<dimen name="tweetitem_textsize_button">12sp</dimen>
|
||||
<dimen name="tweetitem_textsize_date">12sp</dimen>
|
||||
<dimen name="tweetitem_icon_size">14sp</dimen>
|
||||
<dimen name="tweetitem_indicator_size">24sp</dimen>
|
||||
<dimen name="tweetitem_indicator_margin">3dp</dimen>
|
||||
<dimen name="tweetitem_indicator_padding">5dp</dimen>
|
||||
|
||||
<!--dimens of item_trend.xml-->
|
||||
<dimen name="trenditem_layout_padding">5dp</dimen>
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorAccent">@android:color/white</item>
|
||||
<item name="android:colorBackground">@color/background</item>
|
||||
<item name="android:navigationBarColor">@android:color/black</item>
|
||||
<item name="android:windowAnimationStyle">@style/TransactionPending</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue