From b3833cb4a6b59f142d9e792cdc51cb547bb9c3d0 Mon Sep 17 00:00:00 2001 From: stom79 Date: Fri, 9 Nov 2018 07:02:55 +0100 Subject: [PATCH] Change about page --- .../mastodon/activities/AboutActivity.java | 25 ++++++++++++++++++- .../res/layout-sw600dp/activity_about.xml | 21 ++++++++++++++++ app/src/main/res/layout/activity_about.xml | 21 ++++++++++++++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 67 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/AboutActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/AboutActivity.java index 75e4d49a9..2f6080221 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/AboutActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/AboutActivity.java @@ -67,11 +67,13 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou private List contributors = new ArrayList<>(); private List designers = new ArrayList<>(); private List banners = new ArrayList<>(); + private List uxuidesigners = new ArrayList<>(); private AccountSearchDevAdapter accountSearchWebAdapterDeveloper; private AccountSearchDevAdapter accountSearchWebAdapterDesigner; private AccountSearchDevAdapter accountSearchWebAdapterContributors; private AccountSearchDevAdapter accountSearchWebAdapterBanners; + private AccountSearchDevAdapter accountSearchWebAdapterUxUiDesigners; @Override protected void onCreate(Bundle savedInstanceState) { @@ -127,6 +129,8 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou ExpandableHeightListView lv_designers = findViewById(R.id.lv_designers); ExpandableHeightListView lv_contributors = findViewById(R.id.lv_contributors); ExpandableHeightListView lv_banners = findViewById(R.id.lv_banners); + ExpandableHeightListView lv_ux = findViewById(R.id.lv_ux); + Button about_code = findViewById(R.id.about_code); Button about_license = findViewById(R.id.about_license); Button about_thekinrar = findViewById(R.id.about_thekinrar); @@ -222,6 +226,7 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou lv_developers.setExpanded(true); lv_designers.setExpanded(true); lv_banners.setExpanded(true); + lv_ux.setExpanded(true); accountSearchWebAdapterContributors = new AccountSearchDevAdapter(AboutActivity.this, contributors); lv_contributors.setAdapter(accountSearchWebAdapterContributors); @@ -231,9 +236,11 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou lv_developers.setAdapter(accountSearchWebAdapterDeveloper); accountSearchWebAdapterBanners = new AccountSearchDevAdapter(AboutActivity.this, banners); lv_banners.setAdapter(accountSearchWebAdapterBanners); - + accountSearchWebAdapterUxUiDesigners = new AccountSearchDevAdapter(AboutActivity.this, uxuidesigners); + lv_ux.setAdapter(accountSearchWebAdapterUxUiDesigners); new RetrieveRemoteDataAsyncTask(getApplicationContext(), "tom79", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new RetrieveRemoteDataAsyncTask(getApplicationContext(), "mmarif", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new RetrieveRemoteDataAsyncTask(getApplicationContext(), "NateLikesSheep", "mastodon.art", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new RetrieveRemoteDataAsyncTask(getApplicationContext(), "daycode", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new RetrieveRemoteDataAsyncTask(getApplicationContext(), "PhotonQyv", "mastodon.xyz", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); @@ -278,6 +285,10 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou designers.add(account); accountSearchWebAdapterDesigner.notifyDataSetChanged(); break; + case "mmarif": + uxuidesigners.add(account); + accountSearchWebAdapterUxUiDesigners.notifyDataSetChanged(); + break; default: contributors.add(account); accountSearchWebAdapterContributors.notifyDataSetChanged(); @@ -311,6 +322,11 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(),AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } } + if( uxuidesigners != null){ + for(Account account: uxuidesigners){ + new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(),AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + } + } } @Override @@ -348,5 +364,12 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou break; } } + for( int i = 0 ; i < uxuidesigners.size() ; i++){ + if( uxuidesigners.get(i).getId() != null && uxuidesigners.get(i).getId().equals(relationship.getId())){ + uxuidesigners.get(i).setFollowing(relationship.isFollowing() || userId.trim().equals(relationship.getId())); + accountSearchWebAdapterUxUiDesigners.notifyDataSetChanged(); + break; + } + } } } diff --git a/app/src/main/res/layout-sw600dp/activity_about.xml b/app/src/main/res/layout-sw600dp/activity_about.xml index d293d6c5a..73e217b75 100644 --- a/app/src/main/res/layout-sw600dp/activity_about.xml +++ b/app/src/main/res/layout-sw600dp/activity_about.xml @@ -111,6 +111,27 @@ android:layout_width="match_parent" android:layout_height="wrap_content" tools:ignore="HardcodedText" /> + + + + + + + + + + + + Use Emoji One Information Display previews in all toots + New UX/UI designer Never