cleanup code, remove some unneeded files
This commit is contained in:
parent
07edebdfcf
commit
f2f3be37b3
47 changed files with 189 additions and 286 deletions
|
@ -26,7 +26,7 @@ public class AboutActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_about);
|
setContentView(R.layout.activity_about);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
@ -34,12 +34,12 @@ public class AboutActivity extends BaseActivity {
|
||||||
bar.setDisplayShowHomeEnabled(true);
|
bar.setDisplayShowHomeEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextView versionTextView = (TextView) findViewById(R.id.versionTV);
|
TextView versionTextView = findViewById(R.id.versionTV);
|
||||||
String versionName = BuildConfig.VERSION_NAME;
|
String versionName = BuildConfig.VERSION_NAME;
|
||||||
String versionFormat = getString(R.string.about_application_version);
|
String versionFormat = getString(R.string.about_application_version);
|
||||||
versionTextView.setText(String.format(versionFormat, versionName));
|
versionTextView.setText(String.format(versionFormat, versionName));
|
||||||
|
|
||||||
appAccountButton = (Button) findViewById(R.id.tusky_profile_button);
|
appAccountButton = findViewById(R.id.tusky_profile_button);
|
||||||
appAccountButton.setOnClickListener(new View.OnClickListener() {
|
appAccountButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class AccountListActivity extends BaseActivity {
|
||||||
type = Type.BLOCKS;
|
type = Type.BLOCKS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
|
|
@ -169,20 +169,20 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_compose);
|
setContentView(R.layout.activity_compose);
|
||||||
|
|
||||||
textEditor = (EditTextTyped) findViewById(R.id.compose_edit_field);
|
textEditor = findViewById(R.id.compose_edit_field);
|
||||||
mediaPreviewBar = (LinearLayout) findViewById(R.id.compose_media_preview_bar);
|
mediaPreviewBar = findViewById(R.id.compose_media_preview_bar);
|
||||||
contentWarningBar = findViewById(R.id.compose_content_warning_bar);
|
contentWarningBar = findViewById(R.id.compose_content_warning_bar);
|
||||||
contentWarningEditor = (EditText) findViewById(R.id.field_content_warning);
|
contentWarningEditor = findViewById(R.id.field_content_warning);
|
||||||
charactersLeft = (TextView) findViewById(R.id.characters_left);
|
charactersLeft = findViewById(R.id.characters_left);
|
||||||
floatingBtn = (Button) findViewById(R.id.floating_btn);
|
floatingBtn = findViewById(R.id.floating_btn);
|
||||||
pickButton = (ImageButton) findViewById(R.id.compose_photo_pick);
|
pickButton = findViewById(R.id.compose_photo_pick);
|
||||||
visibilityBtn = (ImageButton) findViewById(R.id.action_toggle_visibility);
|
visibilityBtn = findViewById(R.id.action_toggle_visibility);
|
||||||
saveButton = (ImageButton) findViewById(R.id.compose_save_draft);
|
saveButton = findViewById(R.id.compose_save_draft);
|
||||||
hideMediaToggle = (ImageButton) findViewById(R.id.action_hide_media);
|
hideMediaToggle = findViewById(R.id.action_hide_media);
|
||||||
postProgress = (ProgressBar) findViewById(R.id.postProgress);
|
postProgress = findViewById(R.id.postProgress);
|
||||||
|
|
||||||
// Setup the toolbar.
|
// Setup the toolbar.
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
|
@ -666,7 +666,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean saveTheToot(String s, @Nullable String contentWarning) {
|
private boolean saveTheToot(String s, @Nullable String contentWarning) {
|
||||||
if (TextUtils.isEmpty(s)) {
|
if (TextUtils.isEmpty(s)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -789,13 +789,13 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
|
||||||
updateVisibleCharactersLeft();
|
updateVisibleCharactersLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setStateToReadying() {
|
private void setStateToReadying() {
|
||||||
statusAlreadyInFlight = true;
|
statusAlreadyInFlight = true;
|
||||||
disableButtons();
|
disableButtons();
|
||||||
postProgress.setVisibility(View.VISIBLE);
|
postProgress.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setStateToNotReadying() {
|
private void setStateToNotReadying() {
|
||||||
postProgress.setVisibility(View.INVISIBLE);
|
postProgress.setVisibility(View.INVISIBLE);
|
||||||
statusAlreadyInFlight = false;
|
statusAlreadyInFlight = false;
|
||||||
enableButtons();
|
enableButtons();
|
||||||
|
@ -1706,9 +1706,9 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
|
||||||
|
|
||||||
Account account = getItem(position);
|
Account account = getItem(position);
|
||||||
if (account != null) {
|
if (account != null) {
|
||||||
TextView username = (TextView) view.findViewById(R.id.username);
|
TextView username = view.findViewById(R.id.username);
|
||||||
TextView displayName = (TextView) view.findViewById(R.id.display_name);
|
TextView displayName = view.findViewById(R.id.display_name);
|
||||||
ImageView avatar = (ImageView) view.findViewById(R.id.avatar);
|
ImageView avatar = view.findViewById(R.id.avatar);
|
||||||
String format = getContext().getString(R.string.status_username_format);
|
String format = getContext().getString(R.string.status_username_format);
|
||||||
String formattedUsername = String.format(format, account.username);
|
String formattedUsername = String.format(format, account.username);
|
||||||
username.setText(formattedUsername);
|
username.setText(formattedUsername);
|
||||||
|
|
|
@ -95,17 +95,17 @@ public class EditProfileActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_edit_profile);
|
setContentView(R.layout.activity_edit_profile);
|
||||||
|
|
||||||
ImageButton headerButton = (ImageButton) findViewById(R.id.edit_profile_header);
|
ImageButton headerButton = findViewById(R.id.edit_profile_header);
|
||||||
headerPreview = (ImageView) findViewById(R.id.edit_profile_header_preview);
|
headerPreview = findViewById(R.id.edit_profile_header_preview);
|
||||||
headerProgress = (ProgressBar) findViewById(R.id.edit_profile_header_progress);
|
headerProgress = findViewById(R.id.edit_profile_header_progress);
|
||||||
avatarButton = (ImageButton) findViewById(R.id.edit_profile_avatar);
|
avatarButton = findViewById(R.id.edit_profile_avatar);
|
||||||
avatarPreview = (ImageView) findViewById(R.id.edit_profile_avatar_preview);
|
avatarPreview = findViewById(R.id.edit_profile_avatar_preview);
|
||||||
avatarProgress = (ProgressBar) findViewById(R.id.edit_profile_avatar_progress);
|
avatarProgress = findViewById(R.id.edit_profile_avatar_progress);
|
||||||
displayNameEditText = (EditText) findViewById(R.id.edit_profile_display_name);
|
displayNameEditText = findViewById(R.id.edit_profile_display_name);
|
||||||
noteEditText = (EditText) findViewById(R.id.edit_profile_note);
|
noteEditText = findViewById(R.id.edit_profile_note);
|
||||||
saveProgress = (ProgressBar) findViewById(R.id.edit_profile_save_progress);
|
saveProgress = findViewById(R.id.edit_profile_save_progress);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
|
@ -171,8 +171,8 @@ public class EditProfileActivity extends BaseActivity {
|
||||||
priorDisplayName = me.getDisplayName();
|
priorDisplayName = me.getDisplayName();
|
||||||
priorNote = me.note.toString();
|
priorNote = me.note.toString();
|
||||||
CircularImageView avatar =
|
CircularImageView avatar =
|
||||||
(CircularImageView) findViewById(R.id.edit_profile_avatar_preview);
|
findViewById(R.id.edit_profile_avatar_preview);
|
||||||
ImageView header = (ImageView) findViewById(R.id.edit_profile_header_preview);
|
ImageView header = findViewById(R.id.edit_profile_header_preview);
|
||||||
|
|
||||||
displayNameEditText.setText(priorDisplayName);
|
displayNameEditText.setText(priorDisplayName);
|
||||||
noteEditText.setText(priorNote);
|
noteEditText.setText(priorNote);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class FavouritesActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_favourites);
|
setContentView(R.layout.activity_favourites);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
|
|
@ -73,11 +73,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
setContentView(R.layout.activity_login);
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
input = (LinearLayout) findViewById(R.id.login_input);
|
input = findViewById(R.id.login_input);
|
||||||
loading = (LinearLayout) findViewById(R.id.login_loading);
|
loading = findViewById(R.id.login_loading);
|
||||||
editText = (EditText) findViewById(R.id.edit_text_domain);
|
editText = findViewById(R.id.edit_text_domain);
|
||||||
Button button = (Button) findViewById(R.id.button_login);
|
Button button = findViewById(R.id.button_login);
|
||||||
TextView whatsAnInstance = (TextView) findViewById(R.id.whats_an_instance);
|
TextView whatsAnInstance = findViewById(R.id.whats_an_instance);
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
domain = savedInstanceState.getString("domain");
|
domain = savedInstanceState.getString("domain");
|
||||||
|
@ -114,7 +114,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
TextView textView = (TextView) dialog.findViewById(android.R.id.message);
|
TextView textView = dialog.findViewById(android.R.id.message);
|
||||||
textView.setMovementMethod(LinkMovementMethod.getInstance());
|
textView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class MainActivity extends BaseActivity implements ActionButtonActivity {
|
||||||
private static final long DRAWER_ITEM_FOLLOW_REQUESTS = 8;
|
private static final long DRAWER_ITEM_FOLLOW_REQUESTS = 8;
|
||||||
private static final long DRAWER_ITEM_SAVED_TOOT = 9;
|
private static final long DRAWER_ITEM_SAVED_TOOT = 9;
|
||||||
|
|
||||||
protected static int COMPOSE_RESULT = 1;
|
private static int COMPOSE_RESULT = 1;
|
||||||
|
|
||||||
private FloatingActionButton composeButton;
|
private FloatingActionButton composeButton;
|
||||||
private String loggedInAccountId;
|
private String loggedInAccountId;
|
||||||
|
@ -101,10 +101,10 @@ public class MainActivity extends BaseActivity implements ActionButtonActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatingActionButton floatingBtn = (FloatingActionButton) findViewById(R.id.floating_btn);
|
FloatingActionButton floatingBtn = findViewById(R.id.floating_btn);
|
||||||
ImageButton drawerToggle = (ImageButton) findViewById(R.id.drawer_toggle);
|
ImageButton drawerToggle = findViewById(R.id.drawer_toggle);
|
||||||
TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
|
TabLayout tabLayout = findViewById(R.id.tab_layout);
|
||||||
viewPager = (ViewPager) findViewById(R.id.pager);
|
viewPager = findViewById(R.id.pager);
|
||||||
|
|
||||||
floatingBtn.setOnClickListener(new View.OnClickListener() {
|
floatingBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class ReportActivity extends BaseActivity {
|
||||||
String statusId = intent.getStringExtra("status_id");
|
String statusId = intent.getStringExtra("status_id");
|
||||||
String statusContent = intent.getStringExtra("status_content");
|
String statusContent = intent.getStringExtra("status_content");
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
@ -77,7 +77,7 @@ public class ReportActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
anyView = toolbar;
|
anyView = toolbar;
|
||||||
|
|
||||||
final RecyclerView recyclerView = (RecyclerView) findViewById(R.id.report_recycler_view);
|
final RecyclerView recyclerView = findViewById(R.id.report_recycler_view);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
@ -95,7 +95,7 @@ public class ReportActivity extends BaseActivity {
|
||||||
HtmlUtils.fromHtml(statusContent), true);
|
HtmlUtils.fromHtml(statusContent), true);
|
||||||
adapter.addItem(reportStatus);
|
adapter.addItem(reportStatus);
|
||||||
|
|
||||||
comment = (EditText) findViewById(R.id.report_comment);
|
comment = findViewById(R.id.report_comment);
|
||||||
|
|
||||||
reportAlreadyInFlight = false;
|
reportAlreadyInFlight = false;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SavedTootActivity extends BaseActivity implements SavedTootAdapter.SavedTootAction {
|
public class SavedTootActivity extends BaseActivity implements SavedTootAdapter.SavedTootAction {
|
||||||
public static final String TAG = "SavedTootActivity"; // logging tag
|
private static final String TAG = "SavedTootActivity"; // logging tag
|
||||||
|
|
||||||
// dao
|
// dao
|
||||||
private static TootDao tootDao = TuskyApplication.getDB().tootDao();
|
private static TootDao tootDao = TuskyApplication.getDB().tootDao();
|
||||||
|
@ -55,7 +55,7 @@ public class SavedTootActivity extends BaseActivity implements SavedTootAdapter.
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_saved_toot);
|
setContentView(R.layout.activity_saved_toot);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
@ -64,8 +64,8 @@ public class SavedTootActivity extends BaseActivity implements SavedTootAdapter.
|
||||||
bar.setDisplayShowHomeEnabled(true);
|
bar.setDisplayShowHomeEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
|
RecyclerView recyclerView = findViewById(R.id.recycler_view);
|
||||||
noContent = (TextView) findViewById(R.id.no_content);
|
noContent = findViewById(R.id.no_content);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
@ -98,7 +98,7 @@ public class SavedTootActivity extends BaseActivity implements SavedTootAdapter.
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getAllToot() {
|
private void getAllToot() {
|
||||||
new AsyncTask<Void, Void, List<TootEntity>>() {
|
new AsyncTask<Void, Void, List<TootEntity>>() {
|
||||||
@Override
|
@Override
|
||||||
protected List<TootEntity> doInBackground(Void... params) {
|
protected List<TootEntity> doInBackground(Void... params) {
|
||||||
|
|
|
@ -55,10 +55,10 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_search);
|
setContentView(R.layout.activity_search);
|
||||||
|
|
||||||
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
|
progressBar = findViewById(R.id.progress_bar);
|
||||||
messageNoResults = (TextView) findViewById(R.id.message_no_results);
|
messageNoResults = findViewById(R.id.message_no_results);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
@ -67,7 +67,7 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe
|
||||||
bar.setDisplayShowTitleEnabled(false);
|
bar.setDisplayShowTitleEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
|
RecyclerView recyclerView = findViewById(R.id.recycler_view);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
adapter = new SearchResultsAdapter(this);
|
adapter = new SearchResultsAdapter(this);
|
||||||
|
|
|
@ -67,8 +67,8 @@ public class ViewMediaActivity extends BaseActivity implements ViewMediaFragment
|
||||||
supportPostponeEnterTransition();
|
supportPostponeEnterTransition();
|
||||||
|
|
||||||
// Obtain the views.
|
// Obtain the views.
|
||||||
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
toolbar = findViewById(R.id.toolbar);
|
||||||
viewPager = (ImageViewPager) findViewById(R.id.view_pager);
|
viewPager = findViewById(R.id.view_pager);
|
||||||
anyView = toolbar;
|
anyView = toolbar;
|
||||||
|
|
||||||
// Gather the parameters.
|
// Gather the parameters.
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ViewTagActivity extends BaseActivity {
|
||||||
|
|
||||||
String hashtag = getIntent().getStringExtra("hashtag");
|
String hashtag = getIntent().getStringExtra("hashtag");
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ViewThreadActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_view_thread);
|
setContentView(R.layout.activity_view_thread);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
|
|
@ -42,10 +42,10 @@ public class ViewVideoActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_view_video);
|
setContentView(R.layout.activity_view_video);
|
||||||
|
|
||||||
final ProgressBar progressBar = (ProgressBar) findViewById(R.id.video_progress);
|
final ProgressBar progressBar = findViewById(R.id.video_progress);
|
||||||
VideoView videoView = (VideoView) findViewById(R.id.video_player);
|
VideoView videoView = findViewById(R.id.video_player);
|
||||||
|
|
||||||
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
|
|
|
@ -22,9 +22,9 @@ class AccountViewHolder extends RecyclerView.ViewHolder {
|
||||||
AccountViewHolder(View itemView) {
|
AccountViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
container = itemView.findViewById(R.id.account_container);
|
container = itemView.findViewById(R.id.account_container);
|
||||||
username = (TextView) itemView.findViewById(R.id.account_username);
|
username = itemView.findViewById(R.id.account_username);
|
||||||
displayName = (TextView) itemView.findViewById(R.id.account_display_name);
|
displayName = itemView.findViewById(R.id.account_display_name);
|
||||||
avatar = (CircularImageView) itemView.findViewById(R.id.account_avatar);
|
avatar = itemView.findViewById(R.id.account_avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupWithAccount(Account account) {
|
void setupWithAccount(Account account) {
|
||||||
|
|
|
@ -83,10 +83,10 @@ public class BlocksAdapter extends AccountAdapter {
|
||||||
|
|
||||||
BlockedUserViewHolder(View itemView) {
|
BlockedUserViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
avatar = (CircularImageView) itemView.findViewById(R.id.blocked_user_avatar);
|
avatar = itemView.findViewById(R.id.blocked_user_avatar);
|
||||||
username = (TextView) itemView.findViewById(R.id.blocked_user_username);
|
username = itemView.findViewById(R.id.blocked_user_username);
|
||||||
displayName = (TextView) itemView.findViewById(R.id.blocked_user_display_name);
|
displayName = itemView.findViewById(R.id.blocked_user_display_name);
|
||||||
unblock = (ImageButton) itemView.findViewById(R.id.blocked_user_unblock);
|
unblock = itemView.findViewById(R.id.blocked_user_unblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupWithAccount(Account account) {
|
void setupWithAccount(Account account) {
|
||||||
|
|
|
@ -84,11 +84,11 @@ public class FollowRequestsAdapter extends AccountAdapter {
|
||||||
|
|
||||||
FollowRequestViewHolder(View itemView) {
|
FollowRequestViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
avatar = (CircularImageView) itemView.findViewById(R.id.follow_request_avatar);
|
avatar = itemView.findViewById(R.id.follow_request_avatar);
|
||||||
username = (TextView) itemView.findViewById(R.id.follow_request_username);
|
username = itemView.findViewById(R.id.follow_request_username);
|
||||||
displayName = (TextView) itemView.findViewById(R.id.follow_request_display_name);
|
displayName = itemView.findViewById(R.id.follow_request_display_name);
|
||||||
accept = (ImageButton) itemView.findViewById(R.id.follow_request_accept);
|
accept = itemView.findViewById(R.id.follow_request_accept);
|
||||||
reject = (ImageButton) itemView.findViewById(R.id.follow_request_reject);
|
reject = itemView.findViewById(R.id.follow_request_reject);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupWithAccount(Account account) {
|
void setupWithAccount(Account account) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ public class FooterViewHolder extends RecyclerView.ViewHolder {
|
||||||
FooterViewHolder(View itemView) {
|
FooterViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
container = itemView.findViewById(R.id.footer_container);
|
container = itemView.findViewById(R.id.footer_container);
|
||||||
progressBar = (ProgressBar) itemView.findViewById(R.id.footer_progress_bar);
|
progressBar = itemView.findViewById(R.id.footer_progress_bar);
|
||||||
endMessage = (TextView) itemView.findViewById(R.id.footer_end_message);
|
endMessage = itemView.findViewById(R.id.footer_end_message);
|
||||||
Drawable top = AppCompatResources.getDrawable(itemView.getContext(),
|
Drawable top = AppCompatResources.getDrawable(itemView.getContext(),
|
||||||
R.drawable.elephant_friend);
|
R.drawable.elephant_friend);
|
||||||
if (top != null) {
|
if (top != null) {
|
||||||
|
|
|
@ -68,10 +68,10 @@ public class MutesAdapter extends AccountAdapter {
|
||||||
|
|
||||||
MutedUserViewHolder(View itemView) {
|
MutedUserViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
avatar = (CircularImageView) itemView.findViewById(R.id.muted_user_avatar);
|
avatar = itemView.findViewById(R.id.muted_user_avatar);
|
||||||
username = (TextView) itemView.findViewById(R.id.muted_user_username);
|
username = itemView.findViewById(R.id.muted_user_username);
|
||||||
displayName = (TextView) itemView.findViewById(R.id.muted_user_display_name);
|
displayName = itemView.findViewById(R.id.muted_user_display_name);
|
||||||
unmute = (ImageButton) itemView.findViewById(R.id.muted_user_unmute);
|
unmute = itemView.findViewById(R.id.muted_user_unmute);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupWithAccount(Account account) {
|
void setupWithAccount(Account account) {
|
||||||
|
|
|
@ -200,10 +200,10 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
||||||
|
|
||||||
FollowViewHolder(View itemView) {
|
FollowViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
message = (TextView) itemView.findViewById(R.id.notification_text);
|
message = itemView.findViewById(R.id.notification_text);
|
||||||
usernameView = (TextView) itemView.findViewById(R.id.notification_username);
|
usernameView = itemView.findViewById(R.id.notification_username);
|
||||||
displayNameView = (TextView) itemView.findViewById(R.id.notification_display_name);
|
displayNameView = itemView.findViewById(R.id.notification_display_name);
|
||||||
avatar = (ImageView) itemView.findViewById(R.id.notification_avatar);
|
avatar = itemView.findViewById(R.id.notification_avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMessage(String displayName, String username, String avatarUrl) {
|
void setMessage(String displayName, String username, String avatarUrl) {
|
||||||
|
@ -247,13 +247,12 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
||||||
|
|
||||||
StatusNotificationViewHolder(View itemView) {
|
StatusNotificationViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
message = (TextView) itemView.findViewById(R.id.notification_text);
|
message = itemView.findViewById(R.id.notification_text);
|
||||||
icon = (ImageView) itemView.findViewById(R.id.notification_icon);
|
icon = itemView.findViewById(R.id.notification_icon);
|
||||||
statusContent = (TextView) itemView.findViewById(R.id.notification_content);
|
statusContent = itemView.findViewById(R.id.notification_content);
|
||||||
container = (ViewGroup) itemView.findViewById(R.id.notification_container);
|
container = itemView.findViewById(R.id.notification_container);
|
||||||
statusAvatar = (ImageView) itemView.findViewById(R.id.notification_status_avatar);
|
statusAvatar = itemView.findViewById(R.id.notification_status_avatar);
|
||||||
notificationAvatar = (ImageView)
|
notificationAvatar = itemView.findViewById(R.id.notification_notification_avatar);
|
||||||
itemView.findViewById(R.id.notification_notification_avatar);
|
|
||||||
int darkerFilter = Color.rgb(123, 123, 123);
|
int darkerFilter = Color.rgb(123, 123, 123);
|
||||||
statusAvatar.setColorFilter(darkerFilter, PorterDuff.Mode.MULTIPLY);
|
statusAvatar.setColorFilter(darkerFilter, PorterDuff.Mode.MULTIPLY);
|
||||||
notificationAvatar.setColorFilter(darkerFilter, PorterDuff.Mode.MULTIPLY);
|
notificationAvatar.setColorFilter(darkerFilter, PorterDuff.Mode.MULTIPLY);
|
||||||
|
|
|
@ -120,8 +120,8 @@ public class ReportAdapter extends RecyclerView.Adapter {
|
||||||
|
|
||||||
ReportStatusViewHolder(View view) {
|
ReportStatusViewHolder(View view) {
|
||||||
super(view);
|
super(view);
|
||||||
content = (TextView) view.findViewById(R.id.report_status_content);
|
content = view.findViewById(R.id.report_status_content);
|
||||||
checkBox = (CheckBox) view.findViewById(R.id.report_status_check_box);
|
checkBox = view.findViewById(R.id.report_status_check_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupWithStatus(final ReportStatus status) {
|
void setupWithStatus(final ReportStatus status) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class SavedTootAdapter extends RecyclerView.Adapter {
|
||||||
return toot;
|
return toot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TootEntity getItem(int position) {
|
private TootEntity getItem(int position) {
|
||||||
if (position >= 0 && position < list.size()) {
|
if (position >= 0 && position < list.size()) {
|
||||||
return list.get(position);
|
return list.get(position);
|
||||||
}
|
}
|
||||||
|
@ -111,8 +111,8 @@ public class SavedTootAdapter extends RecyclerView.Adapter {
|
||||||
TootViewHolder(View view) {
|
TootViewHolder(View view) {
|
||||||
super(view);
|
super(view);
|
||||||
this.view = view;
|
this.view = view;
|
||||||
this.content = (TextView) view.findViewById(R.id.content);
|
this.content = view.findViewById(R.id.content);
|
||||||
this.suppr = (ImageButton) view.findViewById(R.id.suppr);
|
this.suppr = view.findViewById(R.id.suppr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bind(final int position, final TootEntity item) {
|
void bind(final int position, final TootEntity item) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
|
||||||
|
|
||||||
HashtagViewHolder(View itemView) {
|
HashtagViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
hashtag = (TextView) itemView.findViewById(R.id.hashtag);
|
hashtag = itemView.findViewById(R.id.hashtag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup(final String tag, final LinkListener listener) {
|
void setup(final String tag, final LinkListener listener) {
|
||||||
|
|
|
@ -60,30 +60,30 @@ class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
||||||
StatusBaseViewHolder(View itemView) {
|
StatusBaseViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
container = itemView.findViewById(R.id.status_container);
|
container = itemView.findViewById(R.id.status_container);
|
||||||
displayName = (TextView) itemView.findViewById(R.id.status_display_name);
|
displayName = itemView.findViewById(R.id.status_display_name);
|
||||||
username = (TextView) itemView.findViewById(R.id.status_username);
|
username = itemView.findViewById(R.id.status_username);
|
||||||
timestamp = (TextView) itemView.findViewById(R.id.status_timestamp);
|
timestamp = itemView.findViewById(R.id.status_timestamp);
|
||||||
content = (TextView) itemView.findViewById(R.id.status_content);
|
content = itemView.findViewById(R.id.status_content);
|
||||||
avatar = (ImageView) itemView.findViewById(R.id.status_avatar);
|
avatar = itemView.findViewById(R.id.status_avatar);
|
||||||
replyButton = (ImageButton) itemView.findViewById(R.id.status_reply);
|
replyButton = itemView.findViewById(R.id.status_reply);
|
||||||
reblogButton = (SparkButton) itemView.findViewById(R.id.status_reblog);
|
reblogButton = itemView.findViewById(R.id.status_reblog);
|
||||||
favouriteButton = (SparkButton) itemView.findViewById(R.id.status_favourite);
|
favouriteButton = itemView.findViewById(R.id.status_favourite);
|
||||||
moreButton = (ImageButton) itemView.findViewById(R.id.status_more);
|
moreButton = itemView.findViewById(R.id.status_more);
|
||||||
reblogged = false;
|
reblogged = false;
|
||||||
favourited = false;
|
favourited = false;
|
||||||
mediaPreview0 = (ImageView) itemView.findViewById(R.id.status_media_preview_0);
|
mediaPreview0 = itemView.findViewById(R.id.status_media_preview_0);
|
||||||
mediaPreview1 = (ImageView) itemView.findViewById(R.id.status_media_preview_1);
|
mediaPreview1 = itemView.findViewById(R.id.status_media_preview_1);
|
||||||
mediaPreview2 = (ImageView) itemView.findViewById(R.id.status_media_preview_2);
|
mediaPreview2 = itemView.findViewById(R.id.status_media_preview_2);
|
||||||
mediaPreview3 = (ImageView) itemView.findViewById(R.id.status_media_preview_3);
|
mediaPreview3 = itemView.findViewById(R.id.status_media_preview_3);
|
||||||
sensitiveMediaWarning = itemView.findViewById(R.id.status_sensitive_media_warning);
|
sensitiveMediaWarning = itemView.findViewById(R.id.status_sensitive_media_warning);
|
||||||
sensitiveMediaShow = itemView.findViewById(R.id.status_sensitive_media_button);
|
sensitiveMediaShow = itemView.findViewById(R.id.status_sensitive_media_button);
|
||||||
videoIndicator = itemView.findViewById(R.id.status_video_indicator);
|
videoIndicator = itemView.findViewById(R.id.status_video_indicator);
|
||||||
mediaLabel = (TextView) itemView.findViewById(R.id.status_media_label);
|
mediaLabel = itemView.findViewById(R.id.status_media_label);
|
||||||
contentWarningBar = itemView.findViewById(R.id.status_content_warning_bar);
|
contentWarningBar = itemView.findViewById(R.id.status_content_warning_bar);
|
||||||
contentWarningDescription =
|
contentWarningDescription =
|
||||||
(TextView) itemView.findViewById(R.id.status_content_warning_description);
|
itemView.findViewById(R.id.status_content_warning_description);
|
||||||
contentWarningButton =
|
contentWarningButton =
|
||||||
(ToggleButton) itemView.findViewById(R.id.status_content_warning_button);
|
itemView.findViewById(R.id.status_content_warning_button);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDisplayName(String name) {
|
private void setDisplayName(String name) {
|
||||||
|
|
|
@ -26,9 +26,9 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
|
||||||
|
|
||||||
StatusDetailedViewHolder(View view) {
|
StatusDetailedViewHolder(View view) {
|
||||||
super(view);
|
super(view);
|
||||||
reblogs = (TextView) view.findViewById(R.id.status_reblogs);
|
reblogs = view.findViewById(R.id.status_reblogs);
|
||||||
favourites = (TextView) view.findViewById(R.id.status_favourites);
|
favourites = view.findViewById(R.id.status_favourites);
|
||||||
application = (TextView) view.findViewById(R.id.status_application);
|
application = view.findViewById(R.id.status_application);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,9 +36,9 @@ public class StatusViewHolder extends StatusBaseViewHolder {
|
||||||
|
|
||||||
StatusViewHolder(View itemView) {
|
StatusViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
avatarReblog = (ImageView) itemView.findViewById(R.id.status_avatar_reblog);
|
avatarReblog = itemView.findViewById(R.id.status_avatar_reblog);
|
||||||
rebloggedBar = itemView.findViewById(R.id.status_reblogged_bar);
|
rebloggedBar = itemView.findViewById(R.id.status_reblogged_bar);
|
||||||
rebloggedByDisplayName = (TextView) itemView.findViewById(R.id.status_reblogged);
|
rebloggedByDisplayName = itemView.findViewById(R.id.status_reblogged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class AccountListFragment extends BaseFragment implements AccountActionLi
|
||||||
View rootView = inflater.inflate(R.layout.fragment_account_list, container, false);
|
View rootView = inflater.inflate(R.layout.fragment_account_list, container, false);
|
||||||
|
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
|
recyclerView = rootView.findViewById(R.id.recycler_view);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
layoutManager = new LinearLayoutManager(context);
|
layoutManager = new LinearLayoutManager(context);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
@ -153,7 +153,7 @@ public class AccountListFragment extends BaseFragment implements AccountActionLi
|
||||||
BaseActivity activity = (BaseActivity) getActivity();
|
BaseActivity activity = (BaseActivity) getActivity();
|
||||||
|
|
||||||
if (jumpToTopAllowed()) {
|
if (jumpToTopAllowed()) {
|
||||||
TabLayout layout = (TabLayout) activity.findViewById(R.id.tab_layout);
|
TabLayout layout = activity.findViewById(R.id.tab_layout);
|
||||||
onTabSelectedListener = new TabLayout.OnTabSelectedListener() {
|
onTabSelectedListener = new TabLayout.OnTabSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onTabSelected(TabLayout.Tab tab) {}
|
public void onTabSelected(TabLayout.Tab tab) {}
|
||||||
|
@ -226,7 +226,7 @@ public class AccountListFragment extends BaseFragment implements AccountActionLi
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
if (jumpToTopAllowed()) {
|
if (jumpToTopAllowed()) {
|
||||||
TabLayout tabLayout = (TabLayout) getActivity().findViewById(R.id.tab_layout);
|
TabLayout tabLayout = getActivity().findViewById(R.id.tab_layout);
|
||||||
tabLayout.removeOnTabSelectedListener(onTabSelectedListener);
|
tabLayout.removeOnTabSelectedListener(onTabSelectedListener);
|
||||||
}
|
}
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment {
|
||||||
String statusVisibility = arguments.getString("visibility");
|
String statusVisibility = arguments.getString("visibility");
|
||||||
boolean statusHideText = arguments.getBoolean("hideText");
|
boolean statusHideText = arguments.getBoolean("hideText");
|
||||||
|
|
||||||
radio = (RadioGroup) rootView.findViewById(R.id.radio_visibility);
|
radio = rootView.findViewById(R.id.radio_visibility);
|
||||||
int radioCheckedId = R.id.radio_public;
|
int radioCheckedId = R.id.radio_public;
|
||||||
if (statusVisibility != null) {
|
if (statusVisibility != null) {
|
||||||
switch (statusVisibility) {
|
switch (statusVisibility) {
|
||||||
|
@ -83,16 +83,16 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment {
|
||||||
}
|
}
|
||||||
radio.check(radioCheckedId);
|
radio.check(radioCheckedId);
|
||||||
|
|
||||||
RadioButton publicButton = (RadioButton) rootView.findViewById(R.id.radio_public);
|
RadioButton publicButton = rootView.findViewById(R.id.radio_public);
|
||||||
RadioButton unlistedButton = (RadioButton) rootView.findViewById(R.id.radio_unlisted);
|
RadioButton unlistedButton = rootView.findViewById(R.id.radio_unlisted);
|
||||||
RadioButton privateButton = (RadioButton) rootView.findViewById(R.id.radio_private);
|
RadioButton privateButton = rootView.findViewById(R.id.radio_private);
|
||||||
RadioButton directButton = (RadioButton) rootView.findViewById(R.id.radio_direct);
|
RadioButton directButton = rootView.findViewById(R.id.radio_direct);
|
||||||
setRadioButtonDrawable(getContext(), publicButton, R.drawable.ic_public_24dp);
|
setRadioButtonDrawable(getContext(), publicButton, R.drawable.ic_public_24dp);
|
||||||
setRadioButtonDrawable(getContext(), unlistedButton, R.drawable.ic_lock_open_24dp);
|
setRadioButtonDrawable(getContext(), unlistedButton, R.drawable.ic_lock_open_24dp);
|
||||||
setRadioButtonDrawable(getContext(), privateButton, R.drawable.ic_lock_outline_24dp);
|
setRadioButtonDrawable(getContext(), privateButton, R.drawable.ic_lock_outline_24dp);
|
||||||
setRadioButtonDrawable(getContext(), directButton, R.drawable.ic_email_24dp);
|
setRadioButtonDrawable(getContext(), directButton, R.drawable.ic_email_24dp);
|
||||||
|
|
||||||
hideText = (CheckBox) rootView.findViewById(R.id.compose_hide_text);
|
hideText = rootView.findViewById(R.id.compose_hide_text);
|
||||||
hideText.setChecked(statusHideText);
|
hideText.setChecked(statusHideText);
|
||||||
|
|
||||||
return rootView;
|
return rootView;
|
||||||
|
|
|
@ -109,10 +109,10 @@ public class NotificationsFragment extends SFragment implements
|
||||||
|
|
||||||
// Setup the SwipeRefreshLayout.
|
// Setup the SwipeRefreshLayout.
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipe_refresh_layout);
|
swipeRefreshLayout = rootView.findViewById(R.id.swipe_refresh_layout);
|
||||||
swipeRefreshLayout.setOnRefreshListener(this);
|
swipeRefreshLayout.setOnRefreshListener(this);
|
||||||
// Setup the RecyclerView.
|
// Setup the RecyclerView.
|
||||||
recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
|
recyclerView = rootView.findViewById(R.id.recycler_view);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
layoutManager = new LinearLayoutManager(context);
|
layoutManager = new LinearLayoutManager(context);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
@ -152,7 +152,7 @@ public class NotificationsFragment extends SFragment implements
|
||||||
MainActivity activity = (MainActivity) getActivity();
|
MainActivity activity = (MainActivity) getActivity();
|
||||||
|
|
||||||
// MainActivity's layout is guaranteed to be inflated until onCreate returns.
|
// MainActivity's layout is guaranteed to be inflated until onCreate returns.
|
||||||
TabLayout layout = (TabLayout) activity.findViewById(R.id.tab_layout);
|
TabLayout layout = activity.findViewById(R.id.tab_layout);
|
||||||
onTabSelectedListener = new TabLayout.OnTabSelectedListener() {
|
onTabSelectedListener = new TabLayout.OnTabSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onTabSelected(TabLayout.Tab tab) {
|
public void onTabSelected(TabLayout.Tab tab) {
|
||||||
|
@ -208,7 +208,7 @@ public class NotificationsFragment extends SFragment implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
TabLayout tabLayout = (TabLayout) getActivity().findViewById(R.id.tab_layout);
|
TabLayout tabLayout = getActivity().findViewById(R.id.tab_layout);
|
||||||
tabLayout.removeOnTabSelectedListener(onTabSelectedListener);
|
tabLayout.removeOnTabSelectedListener(onTabSelectedListener);
|
||||||
|
|
||||||
LocalBroadcastManager.getInstance(getContext())
|
LocalBroadcastManager.getInstance(getContext())
|
||||||
|
|
|
@ -134,10 +134,10 @@ public class TimelineFragment extends SFragment implements
|
||||||
|
|
||||||
// Setup the SwipeRefreshLayout.
|
// Setup the SwipeRefreshLayout.
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipe_refresh_layout);
|
swipeRefreshLayout = rootView.findViewById(R.id.swipe_refresh_layout);
|
||||||
swipeRefreshLayout.setOnRefreshListener(this);
|
swipeRefreshLayout.setOnRefreshListener(this);
|
||||||
// Setup the RecyclerView.
|
// Setup the RecyclerView.
|
||||||
recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
|
recyclerView = rootView.findViewById(R.id.recycler_view);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
layoutManager = new LinearLayoutManager(context);
|
layoutManager = new LinearLayoutManager(context);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
@ -175,7 +175,7 @@ public class TimelineFragment extends SFragment implements
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
if (jumpToTopAllowed()) {
|
if (jumpToTopAllowed()) {
|
||||||
TabLayout layout = (TabLayout) getActivity().findViewById(R.id.tab_layout);
|
TabLayout layout = getActivity().findViewById(R.id.tab_layout);
|
||||||
onTabSelectedListener = new TabLayout.OnTabSelectedListener() {
|
onTabSelectedListener = new TabLayout.OnTabSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onTabSelected(TabLayout.Tab tab) {
|
public void onTabSelected(TabLayout.Tab tab) {
|
||||||
|
@ -241,7 +241,7 @@ public class TimelineFragment extends SFragment implements
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
if (jumpToTopAllowed()) {
|
if (jumpToTopAllowed()) {
|
||||||
TabLayout tabLayout = (TabLayout) getActivity().findViewById(R.id.tab_layout);
|
TabLayout tabLayout = getActivity().findViewById(R.id.tab_layout);
|
||||||
tabLayout.removeOnTabSelectedListener(onTabSelectedListener);
|
tabLayout.removeOnTabSelectedListener(onTabSelectedListener);
|
||||||
}
|
}
|
||||||
LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(timelineReceiver);
|
LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(timelineReceiver);
|
||||||
|
|
|
@ -42,8 +42,8 @@ public class ViewMediaFragment extends BaseFragment {
|
||||||
|
|
||||||
private PhotoViewAttacher attacher;
|
private PhotoViewAttacher attacher;
|
||||||
private PhotoActionsListener photoActionsListener;
|
private PhotoActionsListener photoActionsListener;
|
||||||
View rootView;
|
private View rootView;
|
||||||
PhotoView photoView;
|
private PhotoView photoView;
|
||||||
|
|
||||||
private static final String ARG_START_POSTPONED_TRANSITION = "startPostponedTransition";
|
private static final String ARG_START_POSTPONED_TRANSITION = "startPostponedTransition";
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public class ViewMediaFragment extends BaseFragment {
|
||||||
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
rootView = inflater.inflate(R.layout.fragment_view_media, container, false);
|
rootView = inflater.inflate(R.layout.fragment_view_media, container, false);
|
||||||
photoView = (PhotoView) rootView.findViewById(R.id.view_media_image);
|
photoView = rootView.findViewById(R.id.view_media_image);
|
||||||
|
|
||||||
final Bundle arguments = getArguments();
|
final Bundle arguments = getArguments();
|
||||||
final String url = arguments.getString("url");
|
final String url = arguments.getString("url");
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class ViewThreadFragment extends SFragment implements
|
||||||
private String thisThreadsStatusId;
|
private String thisThreadsStatusId;
|
||||||
private TimelineReceiver timelineReceiver;
|
private TimelineReceiver timelineReceiver;
|
||||||
|
|
||||||
int statusIndex = 0;
|
private int statusIndex = 0;
|
||||||
|
|
||||||
private final PairedList<Status, StatusViewData> statuses =
|
private final PairedList<Status, StatusViewData> statuses =
|
||||||
new PairedList<>(ViewDataUtils.statusMapper());
|
new PairedList<>(ViewDataUtils.statusMapper());
|
||||||
|
@ -84,10 +84,10 @@ public class ViewThreadFragment extends SFragment implements
|
||||||
View rootView = inflater.inflate(R.layout.fragment_view_thread, container, false);
|
View rootView = inflater.inflate(R.layout.fragment_view_thread, container, false);
|
||||||
|
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipe_refresh_layout);
|
swipeRefreshLayout = rootView.findViewById(R.id.swipe_refresh_layout);
|
||||||
swipeRefreshLayout.setOnRefreshListener(this);
|
swipeRefreshLayout.setOnRefreshListener(this);
|
||||||
|
|
||||||
recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
|
recyclerView = rootView.findViewById(R.id.recycler_view);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(context);
|
LinearLayoutManager layoutManager = new LinearLayoutManager(context);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
@ -335,7 +335,7 @@ public class ViewThreadFragment extends SFragment implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int setStatus(Status status) {
|
private int setStatus(Status status) {
|
||||||
if (statuses.size() > 0
|
if (statuses.size() > 0
|
||||||
&& statusIndex < statuses.size()
|
&& statusIndex < statuses.size()
|
||||||
&& statuses.get(statusIndex).equals(status)) {
|
&& statuses.get(statusIndex).equals(status)) {
|
||||||
|
@ -350,7 +350,7 @@ public class ViewThreadFragment extends SFragment implements
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContext(List<Status> ancestors, List<Status> descendants) {
|
private void setContext(List<Status> ancestors, List<Status> descendants) {
|
||||||
Status mainStatus = null;
|
Status mainStatus = null;
|
||||||
|
|
||||||
// In case of refresh, remove old ancestors and descendants first. We'll remove all blindly,
|
// In case of refresh, remove old ancestors and descendants first. We'll remove all blindly,
|
||||||
|
|
|
@ -17,7 +17,6 @@ package com.keylesspalace.tusky.interfaces;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.keylesspalace.tusky.adapter.StatusViewHolder;
|
|
||||||
import com.keylesspalace.tusky.entity.Status;
|
import com.keylesspalace.tusky.entity.Status;
|
||||||
|
|
||||||
public interface StatusActionListener extends LinkListener {
|
public interface StatusActionListener extends LinkListener {
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class AccountPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
public View getTabView(int position, ViewGroup root) {
|
public View getTabView(int position, ViewGroup root) {
|
||||||
View view = LayoutInflater.from(context).inflate(R.layout.tab_account, root, false);
|
View view = LayoutInflater.from(context).inflate(R.layout.tab_account, root, false);
|
||||||
TextView title = (TextView) view.findViewById(R.id.title);
|
TextView title = view.findViewById(R.id.title);
|
||||||
title.setText(pageTitles[position]);
|
title.setText(pageTitles[position]);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,13 +10,11 @@ import java.util.Locale;
|
||||||
|
|
||||||
public class ImagePagerAdapter extends FragmentPagerAdapter {
|
public class ImagePagerAdapter extends FragmentPagerAdapter {
|
||||||
private String[] urls;
|
private String[] urls;
|
||||||
private FragmentManager fragmentManager;
|
|
||||||
private int initialPosition;
|
private int initialPosition;
|
||||||
|
|
||||||
public ImagePagerAdapter(FragmentManager fragmentManager, String[] urls, int initialPosition) {
|
public ImagePagerAdapter(FragmentManager fragmentManager, String[] urls, int initialPosition) {
|
||||||
super(fragmentManager);
|
super(fragmentManager);
|
||||||
this.urls = urls;
|
this.urls = urls;
|
||||||
this.fragmentManager = fragmentManager;
|
|
||||||
this.initialPosition = initialPosition;
|
this.initialPosition = initialPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ import java.util.List;
|
||||||
|
|
||||||
public class CustomTabsHelper {
|
public class CustomTabsHelper {
|
||||||
private static final String TAG = "CustomTabsHelper";
|
private static final String TAG = "CustomTabsHelper";
|
||||||
static final String STABLE_PACKAGE = "com.android.chrome";
|
private static final String STABLE_PACKAGE = "com.android.chrome";
|
||||||
static final String BETA_PACKAGE = "com.chrome.beta";
|
private static final String BETA_PACKAGE = "com.chrome.beta";
|
||||||
static final String DEV_PACKAGE = "com.chrome.dev";
|
private static final String DEV_PACKAGE = "com.chrome.dev";
|
||||||
static final String LOCAL_PACKAGE = "com.google.android.apps.chrome";
|
private static final String LOCAL_PACKAGE = "com.google.android.apps.chrome";
|
||||||
private static final String EXTRA_CUSTOM_TABS_KEEP_ALIVE =
|
private static final String EXTRA_CUSTOM_TABS_KEEP_ALIVE =
|
||||||
"android.support.customtabs.extra.KEEP_ALIVE";
|
"android.support.customtabs.extra.KEEP_ALIVE";
|
||||||
private static final String ACTION_CUSTOM_TABS_CONNECTION =
|
private static final String ACTION_CUSTOM_TABS_CONNECTION =
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class ParserUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ComposeActivity : EditText inside the onTextChanged
|
// ComposeActivity : EditText inside the onTextChanged
|
||||||
public String getPastedURLText(Context context) {
|
public void getPastedURLText(Context context) {
|
||||||
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
String pasteData;
|
String pasteData;
|
||||||
if (clipboard.hasPrimaryClip()) {
|
if (clipboard.hasPrimaryClip()) {
|
||||||
|
@ -47,7 +47,6 @@ public class ParserUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putInClipboardManager(Context context, String string) {
|
public void putInClipboardManager(Context context, String string) {
|
||||||
|
|
|
@ -27,8 +27,8 @@ import com.keylesspalace.tusky.util.Assert;
|
||||||
|
|
||||||
public class EditTextTyped extends AppCompatMultiAutoCompleteTextView {
|
public class EditTextTyped extends AppCompatMultiAutoCompleteTextView {
|
||||||
|
|
||||||
InputConnectionCompat.OnCommitContentListener onCommitContentListener;
|
private InputConnectionCompat.OnCommitContentListener onCommitContentListener;
|
||||||
String[] mimeTypes;
|
private String[] mimeTypes;
|
||||||
private OnPasteListener onPasteListener;
|
private OnPasteListener onPasteListener;
|
||||||
|
|
||||||
public EditTextTyped(Context context) {
|
public EditTextTyped(Context context) {
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<scale
|
|
||||||
android:interpolator="@android:anim/linear_interpolator"
|
|
||||||
android:fromXScale=".1"
|
|
||||||
android:toXScale="1"
|
|
||||||
android:fromYScale=".1"
|
|
||||||
android:toYScale="1"
|
|
||||||
android:pivotX="50%"
|
|
||||||
android:pivotY="50%"
|
|
||||||
android:duration="200"
|
|
||||||
android:fillAfter="true">
|
|
||||||
</scale>
|
|
||||||
|
|
||||||
<alpha
|
|
||||||
android:interpolator="@android:anim/linear_interpolator"
|
|
||||||
android:fromAlpha="0"
|
|
||||||
android:toAlpha="1"
|
|
||||||
android:duration="300" />
|
|
||||||
</set>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<scale
|
|
||||||
android:interpolator="@android:anim/linear_interpolator"
|
|
||||||
android:fromXScale="1"
|
|
||||||
android:toXScale=".1"
|
|
||||||
android:fromYScale="1"
|
|
||||||
android:toYScale=".1"
|
|
||||||
android:pivotX="50%"
|
|
||||||
android:pivotY="50%"
|
|
||||||
android:duration="200"
|
|
||||||
android:fillAfter="true">
|
|
||||||
</scale>
|
|
||||||
|
|
||||||
<alpha
|
|
||||||
android:interpolator="@android:anim/linear_interpolator"
|
|
||||||
android:fromAlpha="1"
|
|
||||||
android:toAlpha="0"
|
|
||||||
android:duration="300" />
|
|
||||||
</set>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/toolbar_icon_dark"
|
|
||||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-4.42 3.58,-8 8,-8 1.85,0 3.55,0.63 4.9,1.69L5.69,16.9C4.63,15.55 4,13.85 4,12zM12,20c-1.85,0 -3.55,-0.63 -4.9,-1.69L18.31,7.1C19.37,8.45 20,10.15 20,12c0,4.42 -3.58,8 -8,8z"/>
|
|
||||||
</vector>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/toolbar_icon_dark"
|
|
||||||
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/toolbar_icon_dark"
|
|
||||||
android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
|
|
||||||
</vector>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/toolbar_icon_dark"
|
|
||||||
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
|
|
||||||
</vector>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/toolbar_icon_dark"
|
|
||||||
android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zM12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
|
|
||||||
</vector>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#60000000">
|
|
||||||
|
|
||||||
<WebView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/gif_view"
|
|
||||||
android:layout_centerInParent="true" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
|
@ -1,48 +1,49 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/account_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:paddingRight="16dp"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:id="@+id/account_container">
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<com.pkmmte.view.CircularImageView
|
<com.pkmmte.view.CircularImageView
|
||||||
|
android:id="@+id/account_avatar"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:id="@+id/account_avatar"
|
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginRight="24dp" />
|
android:layout_marginRight="24dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:layout_toEndOf="@id/account_avatar"
|
android:layout_toEndOf="@id/account_avatar"
|
||||||
android:layout_toRightOf="@id/account_avatar">
|
android:layout_toRightOf="@id/account_avatar"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/account_display_name"
|
android:id="@+id/account_display_name"
|
||||||
android:text="Display name"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="?android:textColorPrimary"
|
|
||||||
android:textStyle="normal|bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="\@username"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:textSize="14sp"
|
android:maxLines="1"
|
||||||
|
android:textColor="?android:textColorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="normal|bold"
|
||||||
|
tools:text="Display name" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/account_username"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textColor="?android:textColorSecondary"
|
||||||
android:id="@+id/account_username" />
|
android:textSize="14sp"
|
||||||
|
tools:text="\@username" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--This applies only to favourite and reblog notifications.-->
|
||||||
<!--This applies only to favourite and reblog notifications.-->
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/notification_container"
|
android:id="@+id/notification_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/notification_top_bar"
|
android:id="@+id/notification_top_bar"
|
||||||
|
@ -25,7 +24,7 @@
|
||||||
android:paddingLeft="24dp"
|
android:paddingLeft="24dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:paddingStart="24dp"
|
android:paddingStart="24dp"
|
||||||
app:srcCompat="@drawable/ic_repeat_24dp"/>
|
app:srcCompat="@drawable/ic_repeat_24dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/notification_text"
|
android:id="@+id/notification_text"
|
||||||
|
@ -36,8 +35,8 @@
|
||||||
android:layout_toRightOf="@id/notification_icon"
|
android:layout_toRightOf="@id/notification_icon"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="Someone favourited your status"
|
android:textColor="?android:textColorSecondary"
|
||||||
android:textColor="?android:textColorSecondary"/>
|
tools:text="Someone favourited your status" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
@ -52,7 +51,7 @@
|
||||||
android:paddingRight="0dp"
|
android:paddingRight="0dp"
|
||||||
android:paddingStart="58dp"
|
android:paddingStart="58dp"
|
||||||
android:textColor="?android:textColorTertiary"
|
android:textColor="?android:textColorTertiary"
|
||||||
tools:text="Example status here"/>
|
tools:text="Example status here" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/notification_status_avatar"
|
android:id="@+id/notification_status_avatar"
|
||||||
|
@ -68,7 +67,7 @@
|
||||||
android:paddingRight="12dp"
|
android:paddingRight="12dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||||
tools:src="@drawable/avatar_default"/>
|
tools:src="@drawable/avatar_default" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/notification_notification_avatar"
|
android:id="@+id/notification_notification_avatar"
|
||||||
|
@ -79,6 +78,6 @@
|
||||||
android:layout_alignRight="@id/notification_status_avatar"
|
android:layout_alignRight="@id/notification_status_avatar"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:src="@color/accent"
|
tools:src="@color/accent"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in a new issue