Fix some layout issues
This commit is contained in:
parent
ee1f141295
commit
165c308f58
|
@ -265,7 +265,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
|
|
||||||
boolean displayFollowInstance = sharedpreferences.getBoolean(Helper.SET_DISPLAY_FOLLOW_INSTANCE, true);
|
boolean displayFollowInstance = sharedpreferences.getBoolean(Helper.SET_DISPLAY_FOLLOW_INSTANCE, true);
|
||||||
if( !displayFollowInstance)
|
if( !displayFollowInstance)
|
||||||
federatedTimelines.setVisibility(View.GONE);
|
federatedTimelines.hide();
|
||||||
federatedTimelines.setOnClickListener(new View.OnClickListener() {
|
federatedTimelines.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -427,9 +427,9 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
viewPager.setVisibility(View.VISIBLE);
|
viewPager.setVisibility(View.VISIBLE);
|
||||||
Helper.switchLayout(BaseMainActivity.this);
|
Helper.switchLayout(BaseMainActivity.this);
|
||||||
if( tab.getPosition() != 1 )
|
if( tab.getPosition() != 1 )
|
||||||
toot.setVisibility(View.VISIBLE);
|
toot.show();
|
||||||
else
|
else
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||||
drawer.closeDrawer(GravityCompat.START);
|
drawer.closeDrawer(GravityCompat.START);
|
||||||
if( tab.getCustomView() != null) {
|
if( tab.getCustomView() != null) {
|
||||||
|
@ -462,9 +462,9 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
drawer.closeDrawer(GravityCompat.START);
|
drawer.closeDrawer(GravityCompat.START);
|
||||||
}
|
}
|
||||||
if( tab.getPosition() != 1 )
|
if( tab.getPosition() != 1 )
|
||||||
toot.setVisibility(View.VISIBLE);
|
toot.show();
|
||||||
else
|
else
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
if( viewPager.getAdapter() != null) {
|
if( viewPager.getAdapter() != null) {
|
||||||
Fragment fragment = (Fragment) viewPager.getAdapter().instantiateItem(viewPager, tab.getPosition());
|
Fragment fragment = (Fragment) viewPager.getAdapter().instantiateItem(viewPager, tab.getPosition());
|
||||||
switch (tab.getPosition()) {
|
switch (tab.getPosition()) {
|
||||||
|
@ -1318,14 +1318,14 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
viewPager.setVisibility(View.VISIBLE);
|
viewPager.setVisibility(View.VISIBLE);
|
||||||
tabLayout.setVisibility(View.VISIBLE);
|
tabLayout.setVisibility(View.VISIBLE);
|
||||||
toolbarTitle.setVisibility(View.GONE);
|
toolbarTitle.setVisibility(View.GONE);
|
||||||
delete_all.setVisibility(View.GONE);
|
delete_all.hide();
|
||||||
add_new.setVisibility(View.GONE);
|
add_new.hide();
|
||||||
final NavigationView navigationView = findViewById(R.id.nav_view);
|
final NavigationView navigationView = findViewById(R.id.nav_view);
|
||||||
unCheckAllMenuItems(navigationView);
|
unCheckAllMenuItems(navigationView);
|
||||||
toot.setVisibility(View.VISIBLE);
|
toot.show();
|
||||||
switch (viewPager.getCurrentItem()){
|
switch (viewPager.getCurrentItem()){
|
||||||
case 1:
|
case 1:
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1455,24 +1455,24 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
toolbarTitle.setVisibility(View.VISIBLE);
|
toolbarTitle.setVisibility(View.VISIBLE);
|
||||||
appBar.setExpanded(true);
|
appBar.setExpanded(true);
|
||||||
if (id != R.id.nav_drafts && id != R.id.nav_bookmarks ) {
|
if (id != R.id.nav_drafts && id != R.id.nav_bookmarks ) {
|
||||||
delete_all.setVisibility(View.GONE);
|
delete_all.hide();
|
||||||
}else{
|
}else{
|
||||||
delete_all.setVisibility(View.VISIBLE);
|
delete_all.show();
|
||||||
}
|
}
|
||||||
if( id != R.id.nav_list && id != R.id.nav_filters){
|
if( id != R.id.nav_list && id != R.id.nav_filters){
|
||||||
add_new.setVisibility(View.GONE);
|
add_new.hide();
|
||||||
}else{
|
}else{
|
||||||
add_new.setVisibility(View.VISIBLE);
|
add_new.show();
|
||||||
}
|
}
|
||||||
if (id == R.id.nav_settings) {
|
if (id == R.id.nav_settings) {
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
TabLayoutSettingsFragment tabLayoutSettingsFragment= new TabLayoutSettingsFragment();
|
TabLayoutSettingsFragment tabLayoutSettingsFragment= new TabLayoutSettingsFragment();
|
||||||
fragmentTag = "TABLAYOUT_SETTINGS";
|
fragmentTag = "TABLAYOUT_SETTINGS";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, tabLayoutSettingsFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, tabLayoutSettingsFragment, fragmentTag).commit();
|
||||||
|
|
||||||
}else if (id == R.id.nav_favorites) {
|
}else if (id == R.id.nav_favorites) {
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
statusFragment = new DisplayStatusFragment();
|
statusFragment = new DisplayStatusFragment();
|
||||||
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.FAVOURITES);
|
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.FAVOURITES);
|
||||||
statusFragment.setArguments(bundle);
|
statusFragment.setArguments(bundle);
|
||||||
|
@ -1480,7 +1480,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, statusFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, statusFragment, fragmentTag).commit();
|
||||||
} else if (id == R.id.nav_blocked) {
|
} else if (id == R.id.nav_blocked) {
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
accountsFragment = new DisplayAccountsFragment();
|
accountsFragment = new DisplayAccountsFragment();
|
||||||
bundle.putSerializable("type", RetrieveAccountsAsyncTask.Type.BLOCKED);
|
bundle.putSerializable("type", RetrieveAccountsAsyncTask.Type.BLOCKED);
|
||||||
accountsFragment.setArguments(bundle);
|
accountsFragment.setArguments(bundle);
|
||||||
|
@ -1488,7 +1488,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, accountsFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, accountsFragment, fragmentTag).commit();
|
||||||
}else if (id == R.id.nav_muted) {
|
}else if (id == R.id.nav_muted) {
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
accountsFragment = new DisplayAccountsFragment();
|
accountsFragment = new DisplayAccountsFragment();
|
||||||
bundle.putSerializable("type", RetrieveAccountsAsyncTask.Type.MUTED);
|
bundle.putSerializable("type", RetrieveAccountsAsyncTask.Type.MUTED);
|
||||||
accountsFragment.setArguments(bundle);
|
accountsFragment.setArguments(bundle);
|
||||||
|
@ -1496,7 +1496,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, accountsFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, accountsFragment, fragmentTag).commit();
|
||||||
}else if (id == R.id.nav_scheduled) {
|
}else if (id == R.id.nav_scheduled) {
|
||||||
toot.setVisibility(View.VISIBLE);
|
toot.show();
|
||||||
DisplayScheduledTootsFragment displayScheduledTootsFragment = new DisplayScheduledTootsFragment();
|
DisplayScheduledTootsFragment displayScheduledTootsFragment = new DisplayScheduledTootsFragment();
|
||||||
fragmentTag = "SCHEDULED";
|
fragmentTag = "SCHEDULED";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
|
@ -1506,33 +1506,33 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
fragmentTag = "DRAFTS";
|
fragmentTag = "DRAFTS";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, displayDraftsFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, displayDraftsFragment, fragmentTag).commit();
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
}else if (id == R.id.nav_bookmarks) {
|
}else if (id == R.id.nav_bookmarks) {
|
||||||
DisplayBookmarksFragment displayBookmarksFragment = new DisplayBookmarksFragment();
|
DisplayBookmarksFragment displayBookmarksFragment = new DisplayBookmarksFragment();
|
||||||
fragmentTag = "BOOKMARKS";
|
fragmentTag = "BOOKMARKS";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, displayBookmarksFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, displayBookmarksFragment, fragmentTag).commit();
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
}else if( id == R.id.nav_follow_request){
|
}else if( id == R.id.nav_follow_request){
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
DisplayFollowRequestSentFragment followRequestSentFragment = new DisplayFollowRequestSentFragment();
|
DisplayFollowRequestSentFragment followRequestSentFragment = new DisplayFollowRequestSentFragment();
|
||||||
fragmentTag = "FOLLOW_REQUEST_SENT";
|
fragmentTag = "FOLLOW_REQUEST_SENT";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, followRequestSentFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, followRequestSentFragment, fragmentTag).commit();
|
||||||
}else if(id == R.id.nav_list){
|
}else if(id == R.id.nav_list){
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
DisplayListsFragment displayListsFragment = new DisplayListsFragment();
|
DisplayListsFragment displayListsFragment = new DisplayListsFragment();
|
||||||
fragmentTag = "LISTS";
|
fragmentTag = "LISTS";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, displayListsFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, displayListsFragment, fragmentTag).commit();
|
||||||
}else if(id == R.id.nav_filters){
|
}else if(id == R.id.nav_filters){
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
DisplayFiltersFragment displayFiltersFragment = new DisplayFiltersFragment();
|
DisplayFiltersFragment displayFiltersFragment = new DisplayFiltersFragment();
|
||||||
fragmentTag = "FILTERS";
|
fragmentTag = "FILTERS";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.replace(R.id.main_app_container, displayFiltersFragment, fragmentTag).commit();
|
.replace(R.id.main_app_container, displayFiltersFragment, fragmentTag).commit();
|
||||||
}else if(id == R.id.nav_who_to_follow){
|
}else if(id == R.id.nav_who_to_follow){
|
||||||
toot.setVisibility(View.GONE);
|
toot.hide();
|
||||||
WhoToFollowFragment whoToFollowFragment = new WhoToFollowFragment();
|
WhoToFollowFragment whoToFollowFragment = new WhoToFollowFragment();
|
||||||
fragmentTag = "WHO_TO_FOLLOW";
|
fragmentTag = "WHO_TO_FOLLOW";
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
|
@ -1927,9 +1927,9 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
FloatingActionButton federatedTimelines = findViewById(R.id.federated_timeline);
|
FloatingActionButton federatedTimelines = findViewById(R.id.federated_timeline);
|
||||||
boolean displayFollowInstance = sharedpreferences.getBoolean(Helper.SET_DISPLAY_FOLLOW_INSTANCE, true);
|
boolean displayFollowInstance = sharedpreferences.getBoolean(Helper.SET_DISPLAY_FOLLOW_INSTANCE, true);
|
||||||
if( !displayFollowInstance)
|
if( !displayFollowInstance)
|
||||||
federatedTimelines.setVisibility(View.GONE);
|
federatedTimelines.hide();
|
||||||
else
|
else
|
||||||
federatedTimelines.setVisibility(View.VISIBLE);
|
federatedTimelines.show();
|
||||||
}
|
}
|
||||||
public DisplayStatusFragment getHomeFragment(){
|
public DisplayStatusFragment getHomeFragment(){
|
||||||
return homeFragment;
|
return homeFragment;
|
||||||
|
|
|
@ -108,7 +108,6 @@ public class EditProfileActivity extends BaseActivity implements OnRetrieveAccou
|
||||||
private final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE_HEADER = 754;
|
private final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE_HEADER = 754;
|
||||||
private final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE_PICTURE = 755;
|
private final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE_PICTURE = 755;
|
||||||
private String avatarName, headerName;
|
private String avatarName, headerName;
|
||||||
private HashMap<String, String> fields;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -267,7 +266,7 @@ public class EditProfileActivity extends BaseActivity implements OnRetrieveAccou
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ( account.getFields() != null && account.getFields().size() > 0){
|
if ( account.getFields() != null && account.getFields().size() > 0){
|
||||||
fields = account.getFields();
|
HashMap<String, String> fields = account.getFields();
|
||||||
Iterator it = fields.entrySet().iterator();
|
Iterator it = fields.entrySet().iterator();
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class InstanceActivity extends BaseActivity implements OnRetrieveInstance
|
||||||
instance_version.setText(instance.getVersion());
|
instance_version.setText(instance.getVersion());
|
||||||
instance_uri.setText(instance.getUri());
|
instance_uri.setText(instance.getUri());
|
||||||
if( instance.getEmail() == null){
|
if( instance.getEmail() == null){
|
||||||
instance_contact.setVisibility(View.GONE);
|
instance_contact.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
instance_contact.setOnClickListener(new View.OnClickListener() {
|
instance_contact.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -181,8 +181,8 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// DO DELAYED STUFF
|
// DO DELAYED STUFF
|
||||||
media_close.setVisibility(View.GONE);
|
media_close.hide();
|
||||||
media_save.setVisibility(View.GONE);
|
media_save.hide();
|
||||||
media_description.setVisibility(View.GONE);
|
media_description.setVisibility(View.GONE);
|
||||||
scheduleHidden = false;
|
scheduleHidden = false;
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,8 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
|
|
||||||
if( event.getAction() == MotionEvent.ACTION_DOWN && !scheduleHidden){
|
if( event.getAction() == MotionEvent.ACTION_DOWN && !scheduleHidden){
|
||||||
scheduleHidden = true;
|
scheduleHidden = true;
|
||||||
media_close.setVisibility(View.VISIBLE);
|
media_close.show();
|
||||||
media_save.setVisibility(View.VISIBLE);
|
media_save.show();
|
||||||
if( attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")){
|
if( attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")){
|
||||||
media_description.setText(attachment.getDescription());
|
media_description.setText(attachment.getDescription());
|
||||||
media_description.setVisibility(View.VISIBLE);
|
media_description.setVisibility(View.VISIBLE);
|
||||||
|
@ -256,8 +256,8 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
||||||
handler.postDelayed(new Runnable() {
|
handler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
media_close.setVisibility(View.GONE);
|
media_close.hide();
|
||||||
media_save.setVisibility(View.GONE);
|
media_save.hide();
|
||||||
media_description.setVisibility(View.GONE);
|
media_description.setVisibility(View.GONE);
|
||||||
scheduleHidden = false;
|
scheduleHidden = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,24 +304,24 @@ public class RemoteFollowActivity extends BaseActivity implements OnRetrieveRemo
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
final String accountId = relationship.getId();
|
final String accountId = relationship.getId();
|
||||||
if( accountId != null && accountId.equals(userId)){
|
if( accountId != null && accountId.equals(userId)){
|
||||||
account_follow.setVisibility(View.GONE);
|
account_follow.hide();
|
||||||
}else if( relationship.isBlocking()){
|
}else if( relationship.isBlocking()){
|
||||||
account_follow.setImageResource(R.drawable.ic_lock_open);
|
account_follow.setImageResource(R.drawable.ic_lock_open);
|
||||||
doAction = ShowAccountActivity.action.UNBLOCK;
|
doAction = ShowAccountActivity.action.UNBLOCK;
|
||||||
account_follow.setVisibility(View.VISIBLE);
|
account_follow.show();
|
||||||
}else if( relationship.isRequested()){
|
}else if( relationship.isRequested()){
|
||||||
account_follow.setVisibility(View.GONE);
|
account_follow.hide();
|
||||||
doAction = ShowAccountActivity.action.NOTHING;
|
doAction = ShowAccountActivity.action.NOTHING;
|
||||||
}else if( relationship.isFollowing()){
|
}else if( relationship.isFollowing()){
|
||||||
account_follow.setImageResource(R.drawable.ic_user_times);
|
account_follow.setImageResource(R.drawable.ic_user_times);
|
||||||
doAction = ShowAccountActivity.action.UNFOLLOW;
|
doAction = ShowAccountActivity.action.UNFOLLOW;
|
||||||
account_follow.setVisibility(View.VISIBLE);
|
account_follow.show();
|
||||||
}else if( !relationship.isFollowing()){
|
}else if( !relationship.isFollowing()){
|
||||||
account_follow.setImageResource(R.drawable.ic_user_plus);
|
account_follow.setImageResource(R.drawable.ic_user_plus);
|
||||||
doAction = ShowAccountActivity.action.FOLLOW;
|
doAction = ShowAccountActivity.action.FOLLOW;
|
||||||
account_follow.setVisibility(View.VISIBLE);
|
account_follow.show();
|
||||||
}else{
|
}else{
|
||||||
account_follow.setVisibility(View.GONE);
|
account_follow.hide();
|
||||||
doAction = ShowAccountActivity.action.NOTHING;
|
doAction = ShowAccountActivity.action.NOTHING;
|
||||||
}
|
}
|
||||||
final ShowAccountActivity.action finalDoAction = doAction;
|
final ShowAccountActivity.action finalDoAction = doAction;
|
||||||
|
|
|
@ -128,9 +128,9 @@ public class AccountSearchDevAdapter extends BaseAdapter implements OnPostAction
|
||||||
.load(account.getAvatar())
|
.load(account.getAvatar())
|
||||||
.into(holder.account_pp);
|
.into(holder.account_pp);
|
||||||
if( account.isFollowing()){
|
if( account.isFollowing()){
|
||||||
holder.account_follow.setVisibility(View.GONE);
|
holder.account_follow.hide();
|
||||||
}else{
|
}else{
|
||||||
holder.account_follow.setVisibility(View.VISIBLE);
|
holder.account_follow.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.account_follow.setOnClickListener(new View.OnClickListener() {
|
holder.account_follow.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -168,7 +168,7 @@ public class AccountSearchDevAdapter extends BaseAdapter implements OnPostAction
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
holder.account_follow.setVisibility(View.GONE);
|
holder.account_follow.hide();
|
||||||
Toast.makeText(context, R.string.toast_follow, Toast.LENGTH_LONG).show();
|
Toast.makeText(context, R.string.toast_follow, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,27 +91,27 @@ public class AccountsListAdapter extends RecyclerView.Adapter implements OnPostA
|
||||||
account.setFollowType(Account.followAction.MUTE);
|
account.setFollowType(Account.followAction.MUTE);
|
||||||
|
|
||||||
if (account.getFollowType() == Account.followAction.NOTHING){
|
if (account.getFollowType() == Account.followAction.NOTHING){
|
||||||
holder.account_follow.setVisibility(View.GONE);
|
holder.account_follow.hide();
|
||||||
holder.account_follow_request.setVisibility(View.GONE);
|
holder.account_follow_request.setVisibility(View.GONE);
|
||||||
doAction = null;
|
doAction = null;
|
||||||
}else if( account.getFollowType() == Account.followAction.REQUEST_SENT){
|
}else if( account.getFollowType() == Account.followAction.REQUEST_SENT){
|
||||||
holder.account_follow.setVisibility(View.GONE);
|
holder.account_follow.hide();
|
||||||
holder.account_follow_request.setVisibility(View.VISIBLE);
|
holder.account_follow_request.setVisibility(View.VISIBLE);
|
||||||
doAction = null;
|
doAction = null;
|
||||||
}else if( account.getFollowType() == Account.followAction.FOLLOW){
|
}else if( account.getFollowType() == Account.followAction.FOLLOW){
|
||||||
holder.account_follow.setImageResource(R.drawable.ic_user_times);
|
holder.account_follow.setImageResource(R.drawable.ic_user_times);
|
||||||
doAction = API.StatusAction.UNFOLLOW;
|
doAction = API.StatusAction.UNFOLLOW;
|
||||||
holder.account_follow.setVisibility(View.VISIBLE);
|
holder.account_follow.show();
|
||||||
holder.account_follow_request.setVisibility(View.GONE);
|
holder.account_follow_request.setVisibility(View.GONE);
|
||||||
}else if( account.getFollowType() == Account.followAction.NOT_FOLLOW){
|
}else if( account.getFollowType() == Account.followAction.NOT_FOLLOW){
|
||||||
holder.account_follow.setImageResource(R.drawable.ic_user_plus);
|
holder.account_follow.setImageResource(R.drawable.ic_user_plus);
|
||||||
doAction = API.StatusAction.FOLLOW;
|
doAction = API.StatusAction.FOLLOW;
|
||||||
holder.account_follow.setVisibility(View.VISIBLE);
|
holder.account_follow.show();
|
||||||
holder.account_follow_request.setVisibility(View.GONE);
|
holder.account_follow_request.setVisibility(View.GONE);
|
||||||
}else if( account.getFollowType() == Account.followAction.BLOCK){
|
}else if( account.getFollowType() == Account.followAction.BLOCK){
|
||||||
holder.account_follow.setImageResource(R.drawable.ic_lock_open);
|
holder.account_follow.setImageResource(R.drawable.ic_lock_open);
|
||||||
doAction = API.StatusAction.UNBLOCK;
|
doAction = API.StatusAction.UNBLOCK;
|
||||||
holder.account_follow.setVisibility(View.VISIBLE);
|
holder.account_follow.show();
|
||||||
holder.account_follow_request.setVisibility(View.GONE);
|
holder.account_follow_request.setVisibility(View.GONE);
|
||||||
}else if( account.getFollowType() == Account.followAction.MUTE){
|
}else if( account.getFollowType() == Account.followAction.MUTE){
|
||||||
|
|
||||||
|
@ -120,10 +120,10 @@ public class AccountsListAdapter extends RecyclerView.Adapter implements OnPostA
|
||||||
else
|
else
|
||||||
holder.account_mute_notification.setImageResource(R.drawable.ic_notifications_off);
|
holder.account_mute_notification.setImageResource(R.drawable.ic_notifications_off);
|
||||||
|
|
||||||
holder.account_mute_notification.setVisibility(View.VISIBLE);
|
holder.account_mute_notification.show();
|
||||||
holder.account_follow.setImageResource(R.drawable.ic_volume_up);
|
holder.account_follow.setImageResource(R.drawable.ic_volume_up);
|
||||||
doAction = API.StatusAction.UNMUTE;
|
doAction = API.StatusAction.UNMUTE;
|
||||||
holder.account_follow.setVisibility(View.VISIBLE);
|
holder.account_follow.show();
|
||||||
holder.account_follow_request.setVisibility(View.GONE);
|
holder.account_follow_request.setVisibility(View.GONE);
|
||||||
final int positionFinal = position;
|
final int positionFinal = position;
|
||||||
holder.account_mute_notification.setOnClickListener(new View.OnClickListener() {
|
holder.account_mute_notification.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -282,7 +282,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
TextView status_reply;
|
TextView status_reply;
|
||||||
ImageView status_pin;
|
ImageView status_pin;
|
||||||
ImageView status_privacy;
|
ImageView status_privacy;
|
||||||
FloatingActionButton status_translate, status_bookmark;
|
ImageButton status_translate, status_bookmark;
|
||||||
LinearLayout status_container2;
|
LinearLayout status_container2;
|
||||||
LinearLayout status_container3;
|
LinearLayout status_container3;
|
||||||
LinearLayout main_container;
|
LinearLayout main_container;
|
||||||
|
|
|
@ -110,8 +110,9 @@
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/federated_timeline_close"
|
android:id="@+id/federated_timeline_close"
|
||||||
android:layout_width="30dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="30dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
android:layout_gravity="bottom|start"
|
android:layout_gravity="bottom|start"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
app:srcCompat="@drawable/ic_close"
|
app:srcCompat="@drawable/ic_close"
|
||||||
|
|
|
@ -139,8 +139,8 @@
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/federated_timeline"
|
android:id="@+id/federated_timeline"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_gravity="bottom|start"
|
android:layout_gravity="bottom|start"
|
||||||
android:layout_margin="@dimen/fab_margin_floating"
|
android:layout_margin="@dimen/fab_margin_floating"
|
||||||
|
|
|
@ -126,9 +126,9 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_width="30dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
app:backgroundTint="?colorAccent"
|
app:backgroundTint="?colorAccent"
|
||||||
android:layout_height="30dp"
|
|
||||||
android:src="@drawable/ic_close"
|
android:src="@drawable/ic_close"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -142,8 +142,8 @@
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
app:backgroundTint="?colorAccent"
|
app:backgroundTint="?colorAccent"
|
||||||
android:layout_width="30dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="30dp"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_save_white"
|
android:src="@drawable/ic_save_white"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,8 @@
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/header_edit_profile"
|
android:id="@+id/header_edit_profile"
|
||||||
|
@ -87,8 +87,8 @@
|
||||||
android:layout_toRightOf="@id/account_pp"
|
android:layout_toRightOf="@id/account_pp"
|
||||||
android:layout_toEndOf="@id/account_pp"
|
android:layout_toEndOf="@id/account_pp"
|
||||||
android:layout_alignTop="@+id/account_pp"
|
android:layout_alignTop="@+id/account_pp"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/account_menu"
|
android:id="@+id/account_menu"
|
||||||
|
|
|
@ -142,8 +142,8 @@
|
||||||
android:id="@+id/account_follow"
|
android:id="@+id/account_follow"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -153,8 +153,8 @@
|
||||||
android:id="@+id/account_mute_notification"
|
android:id="@+id/account_mute_notification"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -40,21 +40,21 @@
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:id="@+id/edit_filter"
|
android:id="@+id/edit_filter"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
app:backgroundTint="?colorAccent"
|
app:backgroundTint="?colorAccent"
|
||||||
app:srcCompat="@drawable/ic_edit"
|
app:srcCompat="@drawable/ic_edit"
|
||||||
tools:ignore="VectorDrawableCompat"
|
tools:ignore="VectorDrawableCompat"
|
||||||
android:layout_height="30dp" />
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:layout_width="30dp"
|
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:id="@+id/delete_filter"
|
android:id="@+id/delete_filter"
|
||||||
app:backgroundTint="?colorAccent"
|
app:backgroundTint="?colorAccent"
|
||||||
app:srcCompat="@drawable/ic_delete"
|
app:srcCompat="@drawable/ic_delete"
|
||||||
tools:ignore="VectorDrawableCompat"
|
tools:ignore="VectorDrawableCompat"
|
||||||
android:layout_height="30dp"/>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -81,23 +81,28 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
<android.support.design.widget.FloatingActionButton
|
<ImageButton
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/status_translate"
|
android:id="@+id/status_translate"
|
||||||
android:layout_width="30dp"
|
android:gravity="center"
|
||||||
android:layout_height="30dp"
|
android:tint="@android:color/white"
|
||||||
android:layout_gravity="center_horizontal"
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
app:fabSize="mini"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_translate"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:src="@drawable/ic_translate" />
|
android:layout_gravity="center_horizontal"
|
||||||
<android.support.design.widget.FloatingActionButton
|
/>
|
||||||
|
<ImageButton
|
||||||
android:id="@+id/status_bookmark"
|
android:id="@+id/status_bookmark"
|
||||||
android:layout_width="30dp"
|
android:gravity="center"
|
||||||
android:layout_height="30dp"
|
android:tint="@android:color/white"
|
||||||
android:layout_gravity="center_horizontal"
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
app:fabSize="mini"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_bookmark_border"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:src="@drawable/ic_bookmark_border" />
|
android:layout_gravity="center_horizontal"
|
||||||
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
|
|
|
@ -164,22 +164,28 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
>
|
>
|
||||||
<android.support.design.widget.FloatingActionButton
|
<ImageButton
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/status_translate"
|
android:id="@+id/status_translate"
|
||||||
android:layout_width="30dp"
|
android:gravity="center"
|
||||||
android:layout_height="30dp"
|
android:tint="@android:color/white"
|
||||||
android:layout_gravity="center_horizontal"
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
app:fabSize="mini"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_translate"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:src="@drawable/ic_translate" />
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
|
||||||
android:id="@+id/status_bookmark"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
app:fabSize="mini"
|
/>
|
||||||
android:src="@drawable/ic_bookmark_border" />
|
<ImageButton
|
||||||
|
android:id="@+id/status_bookmark"
|
||||||
|
android:gravity="center"
|
||||||
|
android:tint="@android:color/white"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_bookmark_border"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/status_content_translated_container"
|
android:id="@+id/status_content_translated_container"
|
||||||
|
|
|
@ -155,23 +155,28 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
>
|
>
|
||||||
<android.support.design.widget.FloatingActionButton
|
<ImageButton
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/status_translate"
|
android:id="@+id/status_translate"
|
||||||
android:layout_width="30dp"
|
android:gravity="center"
|
||||||
android:layout_height="30dp"
|
android:tint="@android:color/white"
|
||||||
android:layout_gravity="center_horizontal"
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
app:fabSize="mini"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_translate"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:src="@drawable/ic_translate" />
|
android:layout_gravity="center_horizontal"
|
||||||
<android.support.design.widget.FloatingActionButton
|
/>
|
||||||
|
<ImageButton
|
||||||
android:id="@+id/status_bookmark"
|
android:id="@+id/status_bookmark"
|
||||||
android:layout_width="30dp"
|
android:gravity="center"
|
||||||
android:layout_height="30dp"
|
android:tint="@android:color/white"
|
||||||
android:layout_gravity="center_horizontal"
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
app:fabSize="mini"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_bookmark_border"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:src="@drawable/ic_bookmark_border" />
|
android:layout_gravity="center_horizontal"
|
||||||
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/status_content_translated_container"
|
android:id="@+id/status_content_translated_container"
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp" />
|
android:layout_marginStart="10dp" />
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:layout_width="30dp"
|
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:id="@+id/account_to_follow_profile"
|
android:id="@+id/account_to_follow_profile"
|
||||||
|
@ -54,5 +53,6 @@
|
||||||
android:tint="@android:color/white"
|
android:tint="@android:color/white"
|
||||||
app:srcCompat="@drawable/ic_remove_red_eye"
|
app:srcCompat="@drawable/ic_remove_red_eye"
|
||||||
tools:ignore="VectorDrawableCompat"
|
tools:ignore="VectorDrawableCompat"
|
||||||
android:layout_height="30dp"/>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -2,6 +2,7 @@
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/toot_show_accounts"
|
android:id="@+id/toot_show_accounts"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -14,13 +15,14 @@
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/toot_close_accounts"
|
android:id="@+id/toot_close_accounts"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
app:srcCompat="@drawable/ic_close" />
|
app:srcCompat="@drawable/ic_close"
|
||||||
|
tools:ignore="VectorDrawableCompat" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in New Issue