mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-06 22:13:21 +01:00
renamed variables and ids
This commit is contained in:
parent
50689e5a9b
commit
3f21798e62
@ -10,7 +10,7 @@ import static org.nuclearfog.twidda.ui.fragments.StatusFragment.STATUS_FRAGMENT_
|
||||
import static org.nuclearfog.twidda.ui.fragments.StatusFragment.STATUS_FRAGMENT_SEARCH;
|
||||
import static org.nuclearfog.twidda.ui.fragments.StatusFragment.STATUS_FRAGMENT_USER;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_DEL_USER;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_USER_ID_ALL;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_USER_ID;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_USER_MODE;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_USER_SEARCH;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_BLOCKED_USERS;
|
||||
@ -22,7 +22,7 @@ import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_FOLLOW_O
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_LIST_MEMBERS;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_LIST_SUBSCRIBER;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_MUTED_USERS;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_RETWEET;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_REPOST;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_SEARCH;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserListFragment.KEY_FRAG_LIST_LIST_TYPE;
|
||||
import static org.nuclearfog.twidda.ui.fragments.UserListFragment.KEY_FRAG_LIST_OWNER_ID;
|
||||
@ -108,42 +108,42 @@ public class FragmentAdapter extends FragmentStatePagerAdapter {
|
||||
}
|
||||
|
||||
/**
|
||||
* setup adapter for viewing user tweets and favorites
|
||||
* setup adapter for viewing user timeline and favorites
|
||||
*
|
||||
* @param userId ID of the user
|
||||
*/
|
||||
public void setupProfilePage(long userId) {
|
||||
Bundle paramTweet = new Bundle();
|
||||
Bundle paramTimeline = new Bundle();
|
||||
Bundle paramFavorite = new Bundle();
|
||||
paramTweet.putLong(KEY_STATUS_FRAGMENT_ID, userId);
|
||||
paramTimeline.putLong(KEY_STATUS_FRAGMENT_ID, userId);
|
||||
paramFavorite.putLong(KEY_STATUS_FRAGMENT_ID, userId);
|
||||
paramTweet.putInt(KEY_STATUS_FRAGMENT_MODE, STATUS_FRAGMENT_USER);
|
||||
paramTimeline.putInt(KEY_STATUS_FRAGMENT_MODE, STATUS_FRAGMENT_USER);
|
||||
paramFavorite.putInt(KEY_STATUS_FRAGMENT_MODE, STATUS_FRAGMENT_FAVORIT);
|
||||
fragments = new ListFragment[2];
|
||||
fragments[0] = new StatusFragment();
|
||||
fragments[1] = new StatusFragment();
|
||||
fragments[0].setArguments(paramTweet);
|
||||
fragments[0].setArguments(paramTimeline);
|
||||
fragments[1].setArguments(paramFavorite);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* setup adapter for search for tweet and user search
|
||||
* setup adapter for search for status and user search
|
||||
*
|
||||
* @param search Search string
|
||||
*/
|
||||
public void setupSearchPage(String search) {
|
||||
Bundle paramTweetSearch = new Bundle();
|
||||
Bundle paramUserSearch = new Bundle();
|
||||
paramTweetSearch.putString(KEY_STATUS_FRAGMENT_SEARCH, search);
|
||||
paramUserSearch.putString(KEY_FRAG_USER_SEARCH, search);
|
||||
paramTweetSearch.putInt(KEY_STATUS_FRAGMENT_MODE, STATUS_FRAGMENT_SEARCH);
|
||||
paramUserSearch.putInt(KEY_FRAG_USER_MODE, USER_FRAG_SEARCH);
|
||||
Bundle paramStatuses = new Bundle();
|
||||
Bundle paramUsers = new Bundle();
|
||||
paramStatuses.putString(KEY_STATUS_FRAGMENT_SEARCH, search);
|
||||
paramUsers.putString(KEY_FRAG_USER_SEARCH, search);
|
||||
paramStatuses.putInt(KEY_STATUS_FRAGMENT_MODE, STATUS_FRAGMENT_SEARCH);
|
||||
paramUsers.putInt(KEY_FRAG_USER_MODE, USER_FRAG_SEARCH);
|
||||
fragments = new ListFragment[2];
|
||||
fragments[0] = new StatusFragment();
|
||||
fragments[1] = new UserFragment();
|
||||
fragments[0].setArguments(paramTweetSearch);
|
||||
fragments[1].setArguments(paramUserSearch);
|
||||
fragments[0].setArguments(paramStatuses);
|
||||
fragments[1].setArguments(paramUsers);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ public class FragmentAdapter extends FragmentStatePagerAdapter {
|
||||
}
|
||||
|
||||
/**
|
||||
* setup adapter for a page of tweets and users in an user list
|
||||
* setup adapter for a page of statuses and users in an user list
|
||||
*
|
||||
* @param listId ID of an user list
|
||||
* @param ownerOfList true if current user owns this list
|
||||
@ -187,8 +187,8 @@ public class FragmentAdapter extends FragmentStatePagerAdapter {
|
||||
paramUserlistTl.putInt(KEY_STATUS_FRAGMENT_MODE, STATUS_FRAGMENT_USERLIST);
|
||||
paramUserlistMember.putInt(KEY_FRAG_USER_MODE, USER_FRAG_LIST_MEMBERS);
|
||||
paramUserlistMember.putBoolean(KEY_FRAG_DEL_USER, ownerOfList);
|
||||
paramUserlistMember.putLong(KEY_FRAG_USER_ID_ALL, listId);
|
||||
paramUserlistSubscriber.putLong(KEY_FRAG_USER_ID_ALL, listId);
|
||||
paramUserlistMember.putLong(KEY_FRAG_USER_ID, listId);
|
||||
paramUserlistSubscriber.putLong(KEY_FRAG_USER_ID, listId);
|
||||
paramUserlistSubscriber.putInt(KEY_FRAG_USER_MODE, USER_FRAG_LIST_SUBSCRIBER);
|
||||
fragments = new ListFragment[3];
|
||||
fragments[0] = new StatusFragment();
|
||||
@ -239,7 +239,7 @@ public class FragmentAdapter extends FragmentStatePagerAdapter {
|
||||
*/
|
||||
public void setupFollowingPage(long userId) {
|
||||
Bundle paramFollowing = new Bundle();
|
||||
paramFollowing.putLong(KEY_FRAG_USER_ID_ALL, userId);
|
||||
paramFollowing.putLong(KEY_FRAG_USER_ID, userId);
|
||||
paramFollowing.putInt(KEY_FRAG_USER_MODE, USER_FRAG_FOLLOWING);
|
||||
fragments = new ListFragment[1];
|
||||
fragments[0] = new UserFragment();
|
||||
@ -254,7 +254,7 @@ public class FragmentAdapter extends FragmentStatePagerAdapter {
|
||||
*/
|
||||
public void setupFollowerPage(long userId) {
|
||||
Bundle paramFollower = new Bundle();
|
||||
paramFollower.putLong(KEY_FRAG_USER_ID_ALL, userId);
|
||||
paramFollower.putLong(KEY_FRAG_USER_ID, userId);
|
||||
paramFollower.putInt(KEY_FRAG_USER_MODE, USER_FRAG_FOLLOWER);
|
||||
fragments = new ListFragment[1];
|
||||
fragments[0] = new UserFragment();
|
||||
@ -263,29 +263,29 @@ public class FragmentAdapter extends FragmentStatePagerAdapter {
|
||||
}
|
||||
|
||||
/**
|
||||
* setup adapter to show users retweeting a tweet
|
||||
* setup adapter to show users reposting a status
|
||||
*
|
||||
* @param tweetId ID of the tweet
|
||||
* @param id ID of the status
|
||||
*/
|
||||
public void setupReposterPage(long tweetId) {
|
||||
Bundle paramRetweeter = new Bundle();
|
||||
paramRetweeter.putLong(KEY_FRAG_USER_ID_ALL, tweetId);
|
||||
paramRetweeter.putInt(KEY_FRAG_USER_MODE, USER_FRAG_RETWEET);
|
||||
public void setupReposterPage(long id) {
|
||||
Bundle paramReposter = new Bundle();
|
||||
paramReposter.putLong(KEY_FRAG_USER_ID, id);
|
||||
paramReposter.putInt(KEY_FRAG_USER_MODE, USER_FRAG_REPOST);
|
||||
fragments = new ListFragment[1];
|
||||
fragments[0] = new UserFragment();
|
||||
fragments[0].setArguments(paramRetweeter);
|
||||
fragments[0].setArguments(paramReposter);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* setup adapter to show users liking a tweet
|
||||
* setup adapter to show users liking a status
|
||||
*
|
||||
* @param tweetId ID of the tweet
|
||||
* @param id ID of the status
|
||||
*/
|
||||
public void setFavoriterPage(long tweetId) {
|
||||
public void setFavoriterPage(long id) {
|
||||
Bundle paramFavoriter = new Bundle();
|
||||
paramFavoriter.putInt(KEY_FRAG_USER_MODE, USER_FRAG_FAVORIT);
|
||||
paramFavoriter.putLong(KEY_FRAG_USER_ID_ALL, tweetId);
|
||||
paramFavoriter.putLong(KEY_FRAG_USER_ID, id);
|
||||
fragments = new ListFragment[1];
|
||||
fragments[0] = new UserFragment();
|
||||
fragments[0].setArguments(paramFavoriter);
|
||||
|
@ -31,24 +31,24 @@ public class StatusHolder extends ViewHolder {
|
||||
public StatusHolder(ViewGroup parent, GlobalSettings settings) {
|
||||
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_status, parent, false));
|
||||
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);
|
||||
rpUser = 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);
|
||||
replyIcon = 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);
|
||||
text = itemView.findViewById(R.id.item_tweet_text);
|
||||
repost = itemView.findViewById(R.id.item_tweet_retweet_count);
|
||||
favorite = itemView.findViewById(R.id.item_tweet_favorite_count);
|
||||
reposter = 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);
|
||||
ViewGroup container = itemView.findViewById(R.id.item_status_container);
|
||||
profile = itemView.findViewById(R.id.item_status_profile_image);
|
||||
verifiedIcon = itemView.findViewById(R.id.item_status_verified_icon);
|
||||
lockedIcon = itemView.findViewById(R.id.item_status_locked_icon);
|
||||
rpUser = itemView.findViewById(R.id.item_status_reposter_icon);
|
||||
rtIcon = itemView.findViewById(R.id.item_status_repost_icon);
|
||||
favIcon = itemView.findViewById(R.id.item_status_favorite_icon);
|
||||
media = itemView.findViewById(R.id.item_status_media);
|
||||
location = itemView.findViewById(R.id.item_status_location);
|
||||
replyIcon = itemView.findViewById(R.id.item_status_reply);
|
||||
username = itemView.findViewById(R.id.item_status_author_username);
|
||||
screenname = itemView.findViewById(R.id.item_status_author_screenname);
|
||||
text = itemView.findViewById(R.id.item_status_text);
|
||||
repost = itemView.findViewById(R.id.item_status_repost_count);
|
||||
favorite = itemView.findViewById(R.id.item_status_favorite_count);
|
||||
reposter = itemView.findViewById(R.id.item_status_reposter_name);
|
||||
created = itemView.findViewById(R.id.item_status_created_at);
|
||||
replyname = itemView.findViewById(R.id.item_status_reply_name);
|
||||
|
||||
if (settings.likeEnabled()) {
|
||||
favIcon.setImageResource(R.drawable.like);
|
||||
|
@ -33,12 +33,12 @@ public class UserLoader extends AsyncTask<Long, Void, Users> {
|
||||
public static final int FRIENDS = 2;
|
||||
|
||||
/**
|
||||
* load users retweeting a tweet
|
||||
* load users reposting a status
|
||||
*/
|
||||
public static final int RETWEET = 3;
|
||||
public static final int REPOST = 3;
|
||||
|
||||
/**
|
||||
* load users favoriting a tweet
|
||||
* load users favoriting a status
|
||||
*/
|
||||
public static final int FAVORIT = 4;
|
||||
|
||||
@ -89,7 +89,7 @@ public class UserLoader extends AsyncTask<Long, Void, Users> {
|
||||
/**
|
||||
* @param fragment reference to {@link UserFragment}
|
||||
* @param type type of list to load
|
||||
* @param id ID depending on what list to load (user ID, tweet ID, list ID)
|
||||
* @param id ID depending on what list to load (user ID, status ID, list ID)
|
||||
* @param search search string if type is {@link #SEARCH} or empty
|
||||
*/
|
||||
public UserLoader(UserFragment fragment, int type, long id, String search) {
|
||||
@ -114,7 +114,7 @@ public class UserLoader extends AsyncTask<Long, Void, Users> {
|
||||
case FRIENDS:
|
||||
return connection.getFollowing(id, cursor);
|
||||
|
||||
case RETWEET:
|
||||
case REPOST:
|
||||
return connection.getRepostingUsers(id);
|
||||
|
||||
case FAVORIT:
|
||||
|
@ -8,7 +8,7 @@ package org.nuclearfog.twidda.model;
|
||||
public interface Metrics {
|
||||
|
||||
/**
|
||||
* get view count of the tweet
|
||||
* get view count of the status
|
||||
*
|
||||
* @return view count
|
||||
*/
|
||||
|
@ -179,7 +179,7 @@ public class MainActivity extends AppCompatActivity implements OnTabSelectedList
|
||||
public boolean onCreateOptionsMenu(@NonNull Menu m) {
|
||||
getMenuInflater().inflate(R.menu.home, m);
|
||||
AppStyles.setMenuIconColor(m, settings.getIconColor());
|
||||
MenuItem search = m.findItem(R.id.action_search);
|
||||
MenuItem search = m.findItem(R.id.menu_search);
|
||||
SearchView searchView = (SearchView) search.getActionView();
|
||||
searchView.setOnQueryTextListener(this);
|
||||
return super.onCreateOptionsMenu(m);
|
||||
@ -188,17 +188,17 @@ public class MainActivity extends AppCompatActivity implements OnTabSelectedList
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu m) {
|
||||
MenuItem profile = m.findItem(R.id.action_profile);
|
||||
MenuItem tweet = m.findItem(R.id.action_tweet);
|
||||
MenuItem search = m.findItem(R.id.action_search);
|
||||
MenuItem setting = m.findItem(R.id.action_settings);
|
||||
MenuItem account = m.findItem(R.id.action_account);
|
||||
MenuItem profile = m.findItem(R.id.menu_profile);
|
||||
MenuItem status = m.findItem(R.id.menu_post);
|
||||
MenuItem search = m.findItem(R.id.menu_search);
|
||||
MenuItem setting = m.findItem(R.id.menu_settings);
|
||||
MenuItem account = m.findItem(R.id.menu_account);
|
||||
|
||||
switch (tabLayout.getSelectedTabPosition()) {
|
||||
case 0:
|
||||
profile.setVisible(true);
|
||||
search.setVisible(false);
|
||||
tweet.setVisible(true);
|
||||
status.setVisible(true);
|
||||
setting.setVisible(false);
|
||||
account.setVisible(false);
|
||||
search.collapseActionView();
|
||||
@ -207,7 +207,7 @@ public class MainActivity extends AppCompatActivity implements OnTabSelectedList
|
||||
case 1:
|
||||
profile.setVisible(false);
|
||||
search.setVisible(true);
|
||||
tweet.setVisible(false);
|
||||
status.setVisible(false);
|
||||
setting.setVisible(true);
|
||||
account.setVisible(false);
|
||||
break;
|
||||
@ -215,7 +215,7 @@ public class MainActivity extends AppCompatActivity implements OnTabSelectedList
|
||||
case 2:
|
||||
profile.setVisible(false);
|
||||
search.setVisible(false);
|
||||
tweet.setVisible(false);
|
||||
status.setVisible(false);
|
||||
setting.setVisible(true);
|
||||
account.setVisible(true);
|
||||
search.collapseActionView();
|
||||
@ -228,28 +228,28 @@ public class MainActivity extends AppCompatActivity implements OnTabSelectedList
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
// open home profile
|
||||
if (item.getItemId() == R.id.action_profile) {
|
||||
if (item.getItemId() == R.id.menu_profile) {
|
||||
Intent user = new Intent(this, ProfileActivity.class);
|
||||
user.putExtra(KEY_PROFILE_ID, settings.getCurrentUserId());
|
||||
startActivity(user);
|
||||
}
|
||||
// open tweet editor
|
||||
else if (item.getItemId() == R.id.action_tweet) {
|
||||
Intent tweet = new Intent(this, StatusEditor.class);
|
||||
startActivity(tweet);
|
||||
// open status editor
|
||||
else if (item.getItemId() == R.id.menu_post) {
|
||||
Intent intent = new Intent(this, StatusEditor.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
// open app settings
|
||||
else if (item.getItemId() == R.id.action_settings) {
|
||||
else if (item.getItemId() == R.id.menu_settings) {
|
||||
Intent settings = new Intent(this, SettingsActivity.class);
|
||||
startActivityForResult(settings, REQUEST_APP_SETTINGS);
|
||||
}
|
||||
// theme expanded search view
|
||||
else if (item.getItemId() == R.id.action_search) {
|
||||
else if (item.getItemId() == R.id.menu_search) {
|
||||
SearchView searchView = (SearchView) item.getActionView();
|
||||
AppStyles.setTheme(searchView, Color.TRANSPARENT);
|
||||
}
|
||||
// open account manager
|
||||
else if (item.getItemId() == R.id.action_account) {
|
||||
else if (item.getItemId() == R.id.menu_account) {
|
||||
Intent accountManager = new Intent(this, AccountActivity.class);
|
||||
startActivityForResult(accountManager, REQUEST_ACCOUNT_CHANGE);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class MessageActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
if (item.getItemId() == R.id.message) {
|
||||
if (item.getItemId() == R.id.menu_message) {
|
||||
Intent sendDm = new Intent(this, MessageEditor.class);
|
||||
startActivity(sendDm);
|
||||
}
|
||||
|
@ -49,17 +49,17 @@ import java.util.List;
|
||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
|
||||
|
||||
/**
|
||||
* This activity shows metrics of a tweet (views, link clicks, etc.)
|
||||
* This activity shows metrics of a status (views, link clicks, etc.)
|
||||
*
|
||||
* @author nuclearfog
|
||||
*/
|
||||
public class MetricsActivity extends AppCompatActivity implements OnClickListener, OnTagClickListener, OnRefreshListener, RefreshCallback {
|
||||
|
||||
/**
|
||||
* key used for tweet information
|
||||
* key used for status information
|
||||
* value type is {@link Status}
|
||||
*/
|
||||
public static final String KEY_METRICS_STATUS = "metrics_tweet";
|
||||
public static final String KEY_METRICS_STATUS = "metrics_status";
|
||||
|
||||
/**
|
||||
* delay to enable SwipeRefreshLayout
|
||||
@ -74,13 +74,13 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
private TextView impressionCount;
|
||||
private TextView linkClicks;
|
||||
private TextView profileClicks;
|
||||
private TextView retweetCount;
|
||||
private TextView repostCount;
|
||||
private TextView favoriteCount;
|
||||
private TextView replycount;
|
||||
private TextView quoteCount;
|
||||
private TextView videoViews;
|
||||
@Nullable
|
||||
private Status tweet;
|
||||
private Status status;
|
||||
|
||||
private boolean isRefreshing = false;
|
||||
|
||||
@ -94,12 +94,12 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
ImageView profile = findViewById(R.id.metrics_profile);
|
||||
TextView username = findViewById(R.id.metrics_username);
|
||||
TextView screenname = findViewById(R.id.metrics_screenname);
|
||||
TextView tweetText = findViewById(R.id.metrics_tweet);
|
||||
TextView statusText = findViewById(R.id.metrics_tweet);
|
||||
TextView created = findViewById(R.id.metrics_created);
|
||||
impressionCount = findViewById(R.id.metrics_impression);
|
||||
linkClicks = findViewById(R.id.metrics_link_count);
|
||||
profileClicks = findViewById(R.id.metrics_profile_count);
|
||||
retweetCount = findViewById(R.id.metrics_retweets);
|
||||
repostCount = findViewById(R.id.metrics_retweets);
|
||||
favoriteCount = findViewById(R.id.metrics_favorits);
|
||||
replycount = findViewById(R.id.metrics_replies);
|
||||
quoteCount = findViewById(R.id.metrics_quotes);
|
||||
@ -112,7 +112,7 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
impressionCount.setCompoundDrawablesWithIntrinsicBounds(R.drawable.views, 0, 0, 0);
|
||||
linkClicks.setCompoundDrawablesWithIntrinsicBounds(R.drawable.link, 0, 0, 0);
|
||||
profileClicks.setCompoundDrawablesWithIntrinsicBounds(R.drawable.user, 0, 0, 0);
|
||||
retweetCount.setCompoundDrawablesWithIntrinsicBounds(R.drawable.retweet, 0, 0, 0);
|
||||
repostCount.setCompoundDrawablesWithIntrinsicBounds(R.drawable.retweet, 0, 0, 0);
|
||||
replycount.setCompoundDrawablesWithIntrinsicBounds(R.drawable.answer, 0, 0, 0);
|
||||
quoteCount.setCompoundDrawablesWithIntrinsicBounds(R.drawable.quote, 0, 0, 0);
|
||||
videoViews.setCompoundDrawablesWithIntrinsicBounds(R.drawable.play, 0, 0, 0);
|
||||
@ -123,13 +123,13 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
}
|
||||
AppStyles.setTheme(root, settings.getBackgroundColor());
|
||||
AppStyles.setSwipeRefreshColor(reload, settings);
|
||||
tweetText.setMovementMethod(LinkAndScrollMovement.getInstance());
|
||||
statusText.setMovementMethod(LinkAndScrollMovement.getInstance());
|
||||
toolbar.setTitle(R.string.title_metrics);
|
||||
|
||||
Serializable data = getIntent().getSerializableExtra(KEY_METRICS_STATUS);
|
||||
if (data instanceof Status) {
|
||||
tweet = (Status) data;
|
||||
User author = tweet.getAuthor();
|
||||
status = (Status) data;
|
||||
User author = status.getAuthor();
|
||||
if (settings.imagesEnabled() && !author.getImageUrl().isEmpty()) {
|
||||
String profileImageUrl = author.getImageUrl();
|
||||
if (!author.hasDefaultProfileImage())
|
||||
@ -149,8 +149,8 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
}
|
||||
username.setText(author.getUsername());
|
||||
screenname.setText(author.getScreenname());
|
||||
tweetText.setText(Tagger.makeTextWithLinks(tweet.getText(), settings.getHighlightColor(), this));
|
||||
created.setText(SimpleDateFormat.getDateTimeInstance().format(tweet.getTimestamp()));
|
||||
statusText.setText(Tagger.makeTextWithLinks(status.getText(), settings.getHighlightColor(), this));
|
||||
created.setText(SimpleDateFormat.getDateTimeInstance().format(status.getTimestamp()));
|
||||
}
|
||||
profile.setOnClickListener(this);
|
||||
reload.setOnRefreshListener(this);
|
||||
@ -160,9 +160,9 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
if (metricsAsync == null && tweet != null) {
|
||||
if (metricsAsync == null && status != null) {
|
||||
metricsAsync = new MetricsLoader(this);
|
||||
metricsAsync.execute(tweet.getId());
|
||||
metricsAsync.execute(status.getId());
|
||||
setRefresh(true);
|
||||
}
|
||||
}
|
||||
@ -171,9 +171,9 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.metrics_profile) {
|
||||
if (tweet != null) {
|
||||
if (status != null) {
|
||||
Intent profile = new Intent(getApplicationContext(), ProfileActivity.class);
|
||||
profile.putExtra(ProfileActivity.KEY_PROFILE_DATA, tweet.getAuthor());
|
||||
profile.putExtra(ProfileActivity.KEY_PROFILE_DATA, status.getAuthor());
|
||||
startActivity(profile);
|
||||
}
|
||||
}
|
||||
@ -182,9 +182,9 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
if (tweet != null) {
|
||||
if (status != null) {
|
||||
metricsAsync = new MetricsLoader(this);
|
||||
metricsAsync.execute(tweet.getId());
|
||||
metricsAsync.execute(status.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
@Override
|
||||
public void onLinkClick(String tag) {
|
||||
Uri link = Uri.parse(tag);
|
||||
// open tweet link
|
||||
// open status link
|
||||
if (LINK_PATTERN.matcher(link.getScheme() + "://" + link.getHost() + link.getPath()).matches()) {
|
||||
List<String> segments = link.getPathSegments();
|
||||
Intent intent = new Intent(this, StatusActivity.class);
|
||||
@ -232,7 +232,7 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
/**
|
||||
* called from {@link MetricsLoader} if metrics was loaded sucessfully
|
||||
*
|
||||
* @param metrics of a specific tweet
|
||||
* @param metrics of a specific status
|
||||
*/
|
||||
public void onSuccess(Metrics metrics) {
|
||||
impressionCount.setText(NUM_FORMAT.format(metrics.getViews()));
|
||||
@ -246,8 +246,8 @@ public class MetricsActivity extends AppCompatActivity implements OnClickListene
|
||||
profileClicks.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (metrics.getReposts() > 0) {
|
||||
retweetCount.setText(NUM_FORMAT.format(metrics.getReposts()));
|
||||
retweetCount.setVisibility(View.VISIBLE);
|
||||
repostCount.setText(NUM_FORMAT.format(metrics.getReposts()));
|
||||
repostCount.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (metrics.getFavorits() > 0) {
|
||||
favoriteCount.setText(NUM_FORMAT.format(metrics.getFavorits()));
|
||||
|
@ -347,7 +347,7 @@ public class ProfileActivity extends AppCompatActivity implements OnClickListene
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
if (user != null) {
|
||||
// write tweet
|
||||
if (item.getItemId() == R.id.profile_tweet) {
|
||||
if (item.getItemId() == R.id.profile_post) {
|
||||
Intent tweet = new Intent(this, StatusEditor.class);
|
||||
if (!user.isCurrentUser()) {
|
||||
// add username to tweet
|
||||
|
@ -112,7 +112,7 @@ public class SearchActivity extends AppCompatActivity implements OnTabSelectedLi
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
// create new status
|
||||
if (item.getItemId() == R.id.search_tweet) {
|
||||
if (item.getItemId() == R.id.search_status) {
|
||||
Intent intent = new Intent(this, StatusEditor.class);
|
||||
if (search.startsWith("#"))
|
||||
intent.putExtra(KEY_STATUS_EDITOR_TEXT, search + " ");
|
||||
|
@ -283,7 +283,7 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(@NonNull Menu m) {
|
||||
getMenuInflater().inflate(R.menu.tweet, m);
|
||||
getMenuInflater().inflate(R.menu.status, m);
|
||||
AppStyles.setOverflowIcon(toolbar, settings.getIconColor());
|
||||
return super.onCreateOptionsMenu(m);
|
||||
}
|
||||
@ -294,10 +294,10 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
if (status == null)
|
||||
return super.onPrepareOptionsMenu(m);
|
||||
|
||||
MenuItem optDelete = m.findItem(R.id.menu_tweet_delete);
|
||||
MenuItem optHide = m.findItem(R.id.menu_tweet_hide);
|
||||
MenuItem optCopy = m.findItem(R.id.menu_tweet_copy);
|
||||
MenuItem optMetrics = m.findItem(R.id.menu_tweet_metrics);
|
||||
MenuItem optDelete = m.findItem(R.id.menu_status_delete);
|
||||
MenuItem optHide = m.findItem(R.id.menu_status_hide);
|
||||
MenuItem optCopy = m.findItem(R.id.menu_status_copy);
|
||||
MenuItem optMetrics = m.findItem(R.id.menu_status_metrics);
|
||||
SubMenu copyMenu = optCopy.getSubMenu();
|
||||
|
||||
Status status = this.status;
|
||||
@ -343,11 +343,11 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
status = status.getEmbeddedStatus();
|
||||
User author = status.getAuthor();
|
||||
// Delete status option
|
||||
if (item.getItemId() == R.id.menu_tweet_delete) {
|
||||
if (item.getItemId() == R.id.menu_status_delete) {
|
||||
confirmDialog.show(ConfirmDialog.DELETE_STATUS);
|
||||
}
|
||||
// hide status
|
||||
else if (item.getItemId() == R.id.menu_tweet_hide) {
|
||||
else if (item.getItemId() == R.id.menu_status_hide) {
|
||||
if (hidden) {
|
||||
statusAsync = new StatusAction(this, StatusAction.UNHIDE);
|
||||
} else {
|
||||
@ -356,7 +356,7 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
statusAsync.execute(this.status.getId());
|
||||
}
|
||||
// get status link
|
||||
else if (item.getItemId() == R.id.menu_tweet_browser) {
|
||||
else if (item.getItemId() == R.id.menu_status_browser) {
|
||||
String username = author.getScreenname().substring(1);
|
||||
String link = settings.getTwitterHostname() + username + "/status/" + status.getId();
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(link));
|
||||
@ -367,7 +367,7 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
}
|
||||
}
|
||||
// copy status link to clipboard
|
||||
else if (item.getItemId() == R.id.menu_tweet_copy_text) {
|
||||
else if (item.getItemId() == R.id.menu_status_copy_text) {
|
||||
if (clip != null) {
|
||||
ClipData linkClip = ClipData.newPlainText("status text", status.getText());
|
||||
clip.setPrimaryClip(linkClip);
|
||||
@ -375,7 +375,7 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
}
|
||||
}
|
||||
// copy status link to clipboard
|
||||
else if (item.getItemId() == R.id.menu_tweet_copy_tweetlink) {
|
||||
else if (item.getItemId() == R.id.menu_status_copy_link) {
|
||||
String username = author.getScreenname().substring(1);
|
||||
String link = settings.getTwitterHostname() + username + "/status/" + status.getId();
|
||||
if (clip != null) {
|
||||
@ -385,7 +385,7 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
|
||||
}
|
||||
}
|
||||
// open status metrics page
|
||||
else if (item.getItemId() == R.id.menu_tweet_metrics) {
|
||||
else if (item.getItemId() == R.id.menu_status_metrics) {
|
||||
Intent metricsIntent = new Intent(getApplicationContext(), MetricsActivity.class);
|
||||
metricsIntent.putExtra(MetricsActivity.KEY_METRICS_STATUS, status);
|
||||
startActivity(metricsIntent);
|
||||
|
@ -55,32 +55,32 @@ public class ConfirmDialog extends Dialog implements OnClickListener {
|
||||
public static final int VIDEO_ERROR = 606;
|
||||
|
||||
/**
|
||||
* show "delete Tweet?" dialog
|
||||
* show dialog to delete status
|
||||
*/
|
||||
public static final int DELETE_STATUS = 607;
|
||||
|
||||
/**
|
||||
* show "discard tweet" dialog
|
||||
* show dialog to discard edited status
|
||||
*/
|
||||
public static final int STATUS_EDITOR_LEAVE = 608;
|
||||
|
||||
/**
|
||||
* show "Tweet create error" dialog
|
||||
* show dialog if an error occurs while editin status
|
||||
*/
|
||||
public static final int STATUS_EDITOR_ERROR = 609;
|
||||
|
||||
/**
|
||||
* show "delete directmessage" dialog
|
||||
* show dialog to delete message
|
||||
*/
|
||||
public static final int MESSAGE_DELETE = 610;
|
||||
|
||||
/**
|
||||
* show "discard directmessage" dialog
|
||||
* show dialog to discard message
|
||||
*/
|
||||
public static final int MESSAGE_EDITOR_LEAVE = 611;
|
||||
|
||||
/**
|
||||
* show "directmessage upload" error
|
||||
* show dialog if an error occurs while uploading a message
|
||||
*/
|
||||
public static final int MESSAGE_EDITOR_ERROR = 612;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
|
||||
/**
|
||||
* key to set the type of user list to show
|
||||
* possible value types are
|
||||
* {@link #USER_FRAG_FOLLOWER,#USER_FRAG_FOLLOWING,#USER_FRAG_RETWEET,#USER_FRAG_FAVORIT},
|
||||
* {@link #USER_FRAG_FOLLOWER,#USER_FRAG_FOLLOWING,#USER_FRAG_REPOST ,#USER_FRAG_FAVORIT},
|
||||
* {@link #USER_FRAG_SEARCH,#USER_FRAG_LIST_SUBSCRIBER,#USER_FRAG_LIST_MEMBERS,#USER_FRAG_BLOCKED_USERS},
|
||||
* {@link #USER_FRAG_MUTED_USERS,#USER_FRAG_FOLLOW_INCOMING,#USER_FRAG_FOLLOW_OUTGOING}
|
||||
*/
|
||||
@ -49,10 +49,10 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
|
||||
public static final String KEY_FRAG_USER_SEARCH = "user_search";
|
||||
|
||||
/**
|
||||
* key to define user, tweet or list ID
|
||||
* key to define user, status or list ID
|
||||
* value type is long
|
||||
*/
|
||||
public static final String KEY_FRAG_USER_ID_ALL = "user_id_all";
|
||||
public static final String KEY_FRAG_USER_ID = "user_id";
|
||||
|
||||
/**
|
||||
* key enable function to remove users from list
|
||||
@ -75,14 +75,14 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
|
||||
public static final int USER_FRAG_FOLLOWING = 0x64D432EB;
|
||||
|
||||
/**
|
||||
* value to configure to show users retweeting a tweet
|
||||
* value to configure to show users reposting a status
|
||||
*
|
||||
* @see #KEY_FRAG_USER_MODE
|
||||
*/
|
||||
public static final int USER_FRAG_RETWEET = 0x2AC31E6B;
|
||||
public static final int USER_FRAG_REPOST = 0x2AC31E6B;
|
||||
|
||||
/**
|
||||
* value to configure to show users favoring a tweet
|
||||
* value to configure to show users favoring a status
|
||||
*
|
||||
* @see #KEY_FRAG_USER_MODE
|
||||
*/
|
||||
@ -161,7 +161,7 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
|
||||
Bundle param = getArguments();
|
||||
if (param != null) {
|
||||
mode = param.getInt(KEY_FRAG_USER_MODE, 0);
|
||||
id = param.getLong(KEY_FRAG_USER_ID_ALL, 0);
|
||||
id = param.getLong(KEY_FRAG_USER_ID, 0);
|
||||
search = param.getString(KEY_FRAG_USER_SEARCH, "");
|
||||
delUser = param.getBoolean(KEY_FRAG_DEL_USER, false);
|
||||
}
|
||||
@ -311,8 +311,8 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
|
||||
userTask.execute(cursor);
|
||||
break;
|
||||
|
||||
case USER_FRAG_RETWEET:
|
||||
userTask = new UserLoader(this, UserLoader.RETWEET, id, search);
|
||||
case USER_FRAG_REPOST:
|
||||
userTask = new UserLoader(this, UserLoader.REPOST, id, search);
|
||||
userTask.execute(cursor);
|
||||
break;
|
||||
|
||||
|
@ -7,237 +7,237 @@
|
||||
style="@style/CardViewStyle">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/item_tweet_container"
|
||||
android:id="@+id/item_status_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/tweetitem_layout_padding">
|
||||
android:padding="@dimen/item_status_layout_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_tweet_profile_image"
|
||||
android:layout_width="@dimen/tweetitem_profile_size"
|
||||
android:layout_height="@dimen/tweetitem_profile_size"
|
||||
android:id="@+id/item_status_profile_image"
|
||||
android:layout_width="@dimen/item_status_profile_size"
|
||||
android:layout_height="@dimen/item_status_profile_size"
|
||||
android:contentDescription="@string/profile_image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
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_drawable_margin"
|
||||
android:id="@+id/item_status_verified_icon"
|
||||
android:layout_width="@dimen/item_status_icon_size"
|
||||
android:layout_height="@dimen/item_status_icon_size"
|
||||
android:layout_marginStart="@dimen/item_status_drawable_margin"
|
||||
android:src="@drawable/verify"
|
||||
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"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_profile_image"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_author_username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_author_username"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_author_username"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_author_username"
|
||||
android:id="@+id/item_status_author_username"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:singleLine="true"
|
||||
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" />
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_verified_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_profile_image"
|
||||
app:layout_constraintBottom_toTopOf="@id/item_status_author_screenname"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_created_at" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_created_at"
|
||||
android:id="@+id/item_status_created_at"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_date"
|
||||
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"
|
||||
android:textSize="@dimen/item_status_textsize_date"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_author_username"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_author_username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_author_username"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageView
|
||||
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_drawable_margin"
|
||||
android:id="@+id/item_status_locked_icon"
|
||||
android:layout_width="@dimen/item_status_icon_size"
|
||||
android:layout_height="@dimen/item_status_icon_size"
|
||||
android:layout_marginStart="@dimen/item_status_drawable_margin"
|
||||
android:src="@drawable/lock"
|
||||
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"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_profile_image"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_author_screenname"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_author_screenname"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_author_screenname"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_author_screenname"
|
||||
android:id="@+id/item_status_author_screenname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:singleLine="true"
|
||||
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_constraintStart_toEndOf="@id/item_status_locked_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_author_username"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_profile_image"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/item_tweet_user_barrier"
|
||||
android:id="@+id/item_status_user_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="item_tweet_author_screenname, item_tweet_profile_image" />
|
||||
app:constraint_referenced_ids="item_status_author_screenname, item_status_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:id="@+id/item_status_reply"
|
||||
android:layout_width="@dimen/item_status_icon_size"
|
||||
android:layout_height="@dimen/item_status_icon_size"
|
||||
android:layout_marginStart="@dimen/item_status_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"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_reply_name"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_reply_name"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_reply_name"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_reply_name"
|
||||
android:id="@+id/item_status_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:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:layout_marginEnd="@dimen/item_status_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" />
|
||||
android:textSize="@dimen/item_status_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_reply"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_user_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_reposter_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_tweet_retweeter_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:id="@+id/item_status_reposter_icon"
|
||||
android:layout_width="@dimen/item_status_icon_size"
|
||||
android:layout_height="@dimen/item_status_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"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_reply_name"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_reposter_name"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_reposter_name"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_reposter_name"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_retweeter_name"
|
||||
android:id="@+id/item_status_reposter_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:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:layout_marginEnd="@dimen/item_status_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" />
|
||||
android:textSize="@dimen/item_status_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_reposter_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_user_barrier" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/item_tweet_text_barrier"
|
||||
android:id="@+id/item_status_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" />
|
||||
app:constraint_referenced_ids="item_status_reply,item_status_reply_name,item_status_reposter_icon,item_status_reposter_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_text"
|
||||
android:id="@+id/item_status_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_tweet_text_barrier"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_text_barrier"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/item_tweet_media"
|
||||
android:layout_width="@dimen/tweetitem_indicator_size"
|
||||
android:layout_height="@dimen/tweetitem_indicator_size"
|
||||
android:id="@+id/item_status_media"
|
||||
android:layout_width="@dimen/item_status_indicator_size"
|
||||
android:layout_height="@dimen/item_status_indicator_size"
|
||||
android:background="@drawable/round"
|
||||
android:src="@drawable/image"
|
||||
android:layout_margin="@dimen/tweetitem_indicator_margin"
|
||||
android:padding="@dimen/tweetitem_indicator_padding"
|
||||
android:layout_margin="@dimen/item_status_indicator_margin"
|
||||
android:padding="@dimen/item_status_indicator_padding"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
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_constraintTop_toBottomOf="@id/item_status_text"
|
||||
app:layout_constraintBottom_toTopOf="@id/item_status_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_location"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/item_tweet_location"
|
||||
android:layout_width="@dimen/tweetitem_indicator_size"
|
||||
android:layout_height="@dimen/tweetitem_indicator_size"
|
||||
android:id="@+id/item_status_location"
|
||||
android:layout_width="@dimen/item_status_indicator_size"
|
||||
android:layout_height="@dimen/item_status_indicator_size"
|
||||
android:background="@drawable/round"
|
||||
android:src="@drawable/location"
|
||||
android:layout_margin="@dimen/tweetitem_indicator_margin"
|
||||
android:padding="@dimen/tweetitem_indicator_padding"
|
||||
android:layout_margin="@dimen/item_status_indicator_margin"
|
||||
android:padding="@dimen/item_status_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_constraintStart_toEndOf="@id/item_status_media"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_text"
|
||||
app:layout_constraintBottom_toTopOf="@id/item_status_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:id="@+id/item_status_icon_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="item_tweet_media,item_tweet_location" />
|
||||
app:constraint_referenced_ids="item_status_media,item_status_location" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_tweet_indicator_placeholder"
|
||||
android:id="@+id/item_status_indicator_placeholder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/item_status_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" />
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_reposter_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_tweet_retweet_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:id="@+id/item_status_repost_icon"
|
||||
android:layout_width="@dimen/item_status_icon_size"
|
||||
android:layout_height="@dimen/item_status_icon_size"
|
||||
android:src="@drawable/retweet"
|
||||
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"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_indicator_placeholder"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_repost_count"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_retweet_count"
|
||||
android:id="@+id/item_status_repost_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:layout_marginEnd="@dimen/item_status_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
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" />
|
||||
android:textSize="@dimen/item_status_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_repost_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_repost_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/item_status_repost_icon"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_favorite_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_tweet_favorite_icon"
|
||||
android:layout_width="@dimen/tweetitem_icon_size"
|
||||
android:layout_height="@dimen/tweetitem_icon_size"
|
||||
android:id="@+id/item_status_favorite_icon"
|
||||
android:layout_width="@dimen/item_status_icon_size"
|
||||
android:layout_height="@dimen/item_status_icon_size"
|
||||
android:src="@drawable/favorite"
|
||||
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"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_repost_count"
|
||||
app:layout_constraintTop_toBottomOf="@id/item_status_icon_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/item_status_favorite_count"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_tweet_favorite_count"
|
||||
android:id="@+id/item_status_favorite_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginEnd="@dimen/tweetitem_text_margin"
|
||||
android:layout_marginStart="@dimen/item_status_text_margin"
|
||||
android:layout_marginEnd="@dimen/item_status_text_margin"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/tweetitem_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_tweet_favorite_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_tweet_favorite_icon"
|
||||
android:textSize="@dimen/item_status_textsize_button"
|
||||
app:layout_constraintStart_toEndOf="@id/item_status_favorite_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/item_status_favorite_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -3,20 +3,20 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_tweet"
|
||||
android:id="@+id/menu_post"
|
||||
android:icon="@drawable/tweet"
|
||||
android:title="@string/menu_tweet"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_profile"
|
||||
android:id="@+id/menu_profile"
|
||||
android:icon="@drawable/user"
|
||||
android:title="@string/menu_open_home_profile"
|
||||
android:visible="true"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:id="@+id/menu_search"
|
||||
android:icon="@drawable/search"
|
||||
android:title="@string/menu_open_twitter_search"
|
||||
android:visible="false"
|
||||
@ -24,14 +24,14 @@
|
||||
app:showAsAction="ifRoom|collapseActionView" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_account"
|
||||
android:id="@+id/menu_account"
|
||||
android:icon="@drawable/switch_account"
|
||||
android:title="@string/menu_select_account"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:id="@+id/menu_settings"
|
||||
android:icon="@drawable/setting"
|
||||
android:title="@string/menu_open_settings"
|
||||
android:visible="false"
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/message"
|
||||
android:id="@+id/menu_message"
|
||||
android:icon="@drawable/message"
|
||||
android:title="@string/menu_write_message"
|
||||
app:showAsAction="always" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/profile_tweet"
|
||||
android:id="@+id/profile_post"
|
||||
android:icon="@drawable/tweet"
|
||||
android:title="@string/menu_tweet"
|
||||
app:showAsAction="always" />
|
||||
|
@ -10,7 +10,7 @@
|
||||
app:showAsAction="always|collapseActionView" />
|
||||
|
||||
<item
|
||||
android:id="@+id/search_tweet"
|
||||
android:id="@+id/search_status"
|
||||
android:icon="@drawable/tweet"
|
||||
android:title="@string/menu_tweet"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
@ -2,39 +2,37 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_browser"
|
||||
android:id="@+id/menu_status_browser"
|
||||
android:title="@string/menu_tweet_open_browser" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_copy"
|
||||
android:id="@+id/menu_status_copy"
|
||||
android:title="@android:string/copy">
|
||||
|
||||
<menu>
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_copy_text"
|
||||
android:id="@+id/menu_status_copy_text"
|
||||
android:title="@string/menu_tweet_copy_text" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_copy_tweetlink"
|
||||
android:id="@+id/menu_status_copy_link"
|
||||
android:title="@string/menu_tweet_copy_link" />
|
||||
|
||||
</menu>
|
||||
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_metrics"
|
||||
android:id="@+id/menu_status_metrics"
|
||||
android:title="@string/menu_tweet_metrics"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_hide"
|
||||
android:id="@+id/menu_status_hide"
|
||||
android:title="@string/menu_tweet_hide"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_tweet_delete"
|
||||
android:id="@+id/menu_status_delete"
|
||||
android:title="@string/menu_tweet_delete"
|
||||
android:visible="false" />
|
||||
</menu>
|
@ -69,17 +69,17 @@
|
||||
<dimen name="editprofile_scrollview_margin">10dp</dimen>
|
||||
<integer name="editprofile_username_max_length">50</integer>
|
||||
|
||||
<!--dimens of item_tweet.xml-->
|
||||
<dimen name="tweetitem_profile_size">36sp</dimen>
|
||||
<dimen name="tweetitem_layout_padding">5dp</dimen>
|
||||
<dimen name="tweetitem_text_margin">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">28sp</dimen>
|
||||
<dimen name="tweetitem_indicator_margin">3dp</dimen>
|
||||
<dimen name="tweetitem_indicator_padding">6sp</dimen>
|
||||
<!--dimens of item_status.xml-->
|
||||
<dimen name="item_status_profile_size">36sp</dimen>
|
||||
<dimen name="item_status_layout_padding">5dp</dimen>
|
||||
<dimen name="item_status_text_margin">5dp</dimen>
|
||||
<dimen name="item_status_drawable_margin">5dp</dimen>
|
||||
<dimen name="item_status_textsize_button">12sp</dimen>
|
||||
<dimen name="item_status_textsize_date">12sp</dimen>
|
||||
<dimen name="item_status_icon_size">14sp</dimen>
|
||||
<dimen name="item_status_indicator_size">28sp</dimen>
|
||||
<dimen name="item_status_indicator_margin">3dp</dimen>
|
||||
<dimen name="item_status_indicator_padding">6sp</dimen>
|
||||
|
||||
<!--dimens of item_trend.xml-->
|
||||
<dimen name="trenditem_layout_padding">5dp</dimen>
|
||||
|
Loading…
x
Reference in New Issue
Block a user