Compare commits
68 Commits
v1.1.4+for
...
v1.1.5+for
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c77b5dfac2 | ||
|
|
673ea40238 | ||
|
|
f7ced7f253 | ||
|
|
6152ec9d0d | ||
|
|
7ed8bb259d | ||
|
|
06882d5bea | ||
|
|
f460456502 | ||
|
|
6ef9f2ff15 | ||
|
|
062af9937f | ||
|
|
452ee8e1a5 | ||
|
|
88c62427aa | ||
|
|
09458c5ecb | ||
|
|
4171a5d210 | ||
|
|
1362a03877 | ||
|
|
34ae099b89 | ||
|
|
679bd4588f | ||
|
|
7d4c69bc82 | ||
|
|
1749fcacb1 | ||
|
|
683f87cc19 | ||
|
|
2ef19be3c7 | ||
|
|
fb5289372d | ||
|
|
f8d9d00dac | ||
|
|
a7c707f62e | ||
|
|
336ebb71cf | ||
|
|
a5f98f5c50 | ||
|
|
9d5d4b7957 | ||
|
|
3626da7362 | ||
|
|
400e340859 | ||
|
|
31cad1efbe | ||
|
|
e5da24a44d | ||
|
|
d63e5af8d0 | ||
|
|
abdce64b99 | ||
|
|
d5696684fa | ||
|
|
d168794d4e | ||
|
|
52c5057e85 | ||
|
|
21167f64c9 | ||
|
|
26343ce10b | ||
|
|
238d930c48 | ||
|
|
87ade4a020 | ||
|
|
db9bb58b3c | ||
|
|
99cbc8f071 | ||
|
|
d2a4ae8f59 | ||
|
|
9a47530ab8 | ||
|
|
ed1d9165e1 | ||
|
|
ef421dd5dd | ||
|
|
acbf27f025 | ||
|
|
f54e2375be | ||
|
|
1a66db065f | ||
|
|
c51b2bb2e7 | ||
|
|
4de3da09b3 | ||
|
|
e0febda372 | ||
|
|
516f97e679 | ||
|
|
069d141451 | ||
|
|
166401ea18 | ||
|
|
55e5c03b5f | ||
|
|
c950b6e6c1 | ||
|
|
2dc884b1bb | ||
|
|
c49660950d | ||
|
|
9162908173 | ||
|
|
2789169dd7 | ||
|
|
0728b00381 | ||
|
|
34b82337b1 | ||
|
|
f25d4e4d44 | ||
|
|
ac3176c0d8 | ||
|
|
021fc9e5a0 | ||
|
|
a48c11332c | ||
|
|
93bccc02bf | ||
|
|
7a594be3f2 |
@@ -162,6 +162,9 @@ There's also a handful of custom strings exclusive to this projects that would n
|
|||||||
* [Custom color themes](https://github.com/sk22/megalodon/pull/124) by [@LucasGGamerM](https://github.com/LucasGGamerM)
|
* [Custom color themes](https://github.com/sk22/megalodon/pull/124) by [@LucasGGamerM](https://github.com/LucasGGamerM)
|
||||||
* [Custom "megalodon" text logo](https://github.com/sk22/megalodon/commit/563afd487ca5c608cfbb00fa3909d3c27384acc0) by [@LucasGGamerM](https://github.com/LucasGGamerM)
|
* [Custom "megalodon" text logo](https://github.com/sk22/megalodon/commit/563afd487ca5c608cfbb00fa3909d3c27384acc0) by [@LucasGGamerM](https://github.com/LucasGGamerM)
|
||||||
* [Custom login screen](https://github.com/sk22/megalodon/commit/9bbf8c4618dbe13accaeb3b5482bf3fe88cac4c0)
|
* [Custom login screen](https://github.com/sk22/megalodon/commit/9bbf8c4618dbe13accaeb3b5482bf3fe88cac4c0)
|
||||||
|
* [More distinct filled boost icon](https://github.com/sk22/megalodon/commits/more-distinct-filled-boost-icon)
|
||||||
|
* [Material You color theme] by [@LucasGGamerM](https://github.com/LucasGGamerM)
|
||||||
|
* [Animations for interaction buttons](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/animate-buttons)
|
||||||
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|||||||
@@ -9,13 +9,10 @@ android {
|
|||||||
applicationId "org.joinmastodon.android.sk"
|
applicationId "org.joinmastodon.android.sk"
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 59
|
versionCode 61
|
||||||
versionName "1.1.4+fork.59"
|
versionName "1.1.5+fork.61"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
resConfigs "en", "ar-rSA", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES",
|
resConfigs "ar-rSA", "be-rBY", "bn-rBD", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES", "eu-rES", "fi-rFI", "fil-rPH", "fr-rFR", "ga-rIE", "gd-rGB", "gl-rES", "hi-rIN", "hr-rHR", "hu-rHU", "hy-rAM", "in-rID", "is-rIS", "it-rIT", "iw-rIL", "ja-rJP", "kab", "ko-rKR", "nl-rNL", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ro-rRO", "ru-rRU", "si-rLK", "sl-rSI", "sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "vi-rVN", "zh-rCN", "zh-rTW"
|
||||||
"eu-rES", "fi-rFI", "fr-rFR", "gl-rES", "hr-rHR", "hy-rAM", "it-rIT", "iw-rIL",
|
|
||||||
"ja-rJP", "kab", "ko-rKR", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ru-rRU",
|
|
||||||
"sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "vi-rVN", "zh-rCN", "zh-rTW"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -80,4 +77,4 @@ dependencies {
|
|||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.4-alpha05'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.4-alpha05'
|
||||||
androidTestImplementation 'androidx.test:runner:1.5.0-alpha02'
|
androidTestImplementation 'androidx.test:runner:1.5.0-alpha02'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha05'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha05'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class ExternalShareActivity extends FragmentStackActivity{
|
|||||||
|
|
||||||
Intent intent=getIntent();
|
Intent intent=getIntent();
|
||||||
StringBuilder builder=new StringBuilder();
|
StringBuilder builder=new StringBuilder();
|
||||||
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n");
|
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n\n");
|
||||||
if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n");
|
if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n");
|
||||||
String text=builder.toString();
|
String text=builder.toString();
|
||||||
List<Uri> mediaUris;
|
List<Uri> mediaUris;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import static org.joinmastodon.android.api.MastodonAPIController.gson;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
@@ -54,8 +56,14 @@ public class GlobalUserPreferences{
|
|||||||
disableMarquee=prefs.getBoolean("disableMarquee", false);
|
disableMarquee=prefs.getBoolean("disableMarquee", false);
|
||||||
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
|
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
|
||||||
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
|
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
|
||||||
color=ColorPreference.values()[prefs.getInt("color", 0)];
|
|
||||||
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
|
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
|
||||||
|
|
||||||
|
try {
|
||||||
|
color=ColorPreference.valueOf(prefs.getString("color", ColorPreference.PINK.name()));
|
||||||
|
} catch (IllegalArgumentException|ClassCastException ignored) {
|
||||||
|
// invalid color name or color was previously saved as integer
|
||||||
|
color=ColorPreference.PINK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void save(){
|
public static void save(){
|
||||||
@@ -71,17 +79,20 @@ public class GlobalUserPreferences{
|
|||||||
.putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings)
|
.putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings)
|
||||||
.putBoolean("disableMarquee", disableMarquee)
|
.putBoolean("disableMarquee", disableMarquee)
|
||||||
.putInt("theme", theme.ordinal())
|
.putInt("theme", theme.ordinal())
|
||||||
.putInt("color", color.ordinal())
|
.putString("color", color.name())
|
||||||
.putString("recentLanguages", gson.toJson(recentLanguages))
|
.putString("recentLanguages", gson.toJson(recentLanguages))
|
||||||
.apply();
|
.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ColorPreference{
|
public enum ColorPreference{
|
||||||
|
MATERIAL3,
|
||||||
PINK,
|
PINK,
|
||||||
PURPLE,
|
PURPLE,
|
||||||
GREEN,
|
GREEN,
|
||||||
BLUE,
|
BLUE,
|
||||||
BROWN,
|
BROWN,
|
||||||
|
RED,
|
||||||
|
ORANGE,
|
||||||
YELLOW
|
YELLOW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.joinmastodon.android.fragments.HomeFragment;
|
|||||||
import org.joinmastodon.android.fragments.ProfileFragment;
|
import org.joinmastodon.android.fragments.ProfileFragment;
|
||||||
import org.joinmastodon.android.fragments.ThreadFragment;
|
import org.joinmastodon.android.fragments.ThreadFragment;
|
||||||
import org.joinmastodon.android.fragments.onboarding.AccountActivationFragment;
|
import org.joinmastodon.android.fragments.onboarding.AccountActivationFragment;
|
||||||
import org.joinmastodon.android.fragments.onboarding.MegalodonLoginFragment;
|
import org.joinmastodon.android.fragments.onboarding.CustomWelcomeFragment;
|
||||||
import org.joinmastodon.android.model.Notification;
|
import org.joinmastodon.android.model.Notification;
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
import org.joinmastodon.android.updater.GithubSelfUpdater;
|
import org.joinmastodon.android.updater.GithubSelfUpdater;
|
||||||
@@ -33,7 +33,7 @@ public class MainActivity extends FragmentStackActivity{
|
|||||||
|
|
||||||
if(savedInstanceState==null){
|
if(savedInstanceState==null){
|
||||||
if(AccountSessionManager.getInstance().getLoggedInAccounts().isEmpty()){
|
if(AccountSessionManager.getInstance().getLoggedInAccounts().isEmpty()){
|
||||||
showFragmentClearingBackStack(new MegalodonLoginFragment());
|
showFragmentClearingBackStack(new CustomWelcomeFragment());
|
||||||
}else{
|
}else{
|
||||||
AccountSessionManager.getInstance().maybeUpdateLocalInfo();
|
AccountSessionManager.getInstance().maybeUpdateLocalInfo();
|
||||||
AccountSession session;
|
AccountSession session;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class OAuthActivity extends Activity{
|
|||||||
.setCallback(new Callback<>(){
|
.setCallback(new Callback<>(){
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Account account){
|
public void onSuccess(Account account){
|
||||||
AccountSessionManager.getInstance().addAccount(instance, token, account, app, true);
|
AccountSessionManager.getInstance().addAccount(instance, token, account, app, null);
|
||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
finish();
|
finish();
|
||||||
// not calling restartMainActivity() here on purpose to have it recreated (notice different flags)
|
// not calling restartMainActivity() here on purpose to have it recreated (notice different flags)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.joinmastodon.android.events.StatusCountersUpdatedEvent;
|
|||||||
import org.joinmastodon.android.model.Status;
|
import org.joinmastodon.android.model.Status;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
import me.grishka.appkit.api.Callback;
|
import me.grishka.appkit.api.Callback;
|
||||||
import me.grishka.appkit.api.ErrorResponse;
|
import me.grishka.appkit.api.ErrorResponse;
|
||||||
@@ -25,7 +26,7 @@ public class StatusInteractionController{
|
|||||||
this.accountID=accountID;
|
this.accountID=accountID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFavorited(Status status, boolean favorited){
|
public void setFavorited(Status status, boolean favorited, Consumer<Status> cb){
|
||||||
if(!Looper.getMainLooper().isCurrentThread())
|
if(!Looper.getMainLooper().isCurrentThread())
|
||||||
throw new IllegalStateException("Can only be called from main thread");
|
throw new IllegalStateException("Can only be called from main thread");
|
||||||
|
|
||||||
@@ -38,6 +39,8 @@ public class StatusInteractionController{
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Status result){
|
public void onSuccess(Status result){
|
||||||
runningFavoriteRequests.remove(status.id);
|
runningFavoriteRequests.remove(status.id);
|
||||||
|
result.favouritesCount = Math.max(0, status.favouritesCount) + (favorited ? 1 : -1);
|
||||||
|
cb.accept(result);
|
||||||
E.post(new StatusCountersUpdatedEvent(result));
|
E.post(new StatusCountersUpdatedEvent(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,24 +49,17 @@ public class StatusInteractionController{
|
|||||||
runningFavoriteRequests.remove(status.id);
|
runningFavoriteRequests.remove(status.id);
|
||||||
error.showToast(MastodonApp.context);
|
error.showToast(MastodonApp.context);
|
||||||
status.favourited=!favorited;
|
status.favourited=!favorited;
|
||||||
if(favorited)
|
cb.accept(status);
|
||||||
status.favouritesCount--;
|
|
||||||
else
|
|
||||||
status.favouritesCount++;
|
|
||||||
E.post(new StatusCountersUpdatedEvent(status));
|
E.post(new StatusCountersUpdatedEvent(status));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.exec(accountID);
|
.exec(accountID);
|
||||||
runningFavoriteRequests.put(status.id, req);
|
runningFavoriteRequests.put(status.id, req);
|
||||||
status.favourited=favorited;
|
status.favourited=favorited;
|
||||||
if(favorited)
|
|
||||||
status.favouritesCount++;
|
|
||||||
else
|
|
||||||
status.favouritesCount--;
|
|
||||||
E.post(new StatusCountersUpdatedEvent(status));
|
E.post(new StatusCountersUpdatedEvent(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReblogged(Status status, boolean reblogged){
|
public void setReblogged(Status status, boolean reblogged, Consumer<Status> cb){
|
||||||
if(!Looper.getMainLooper().isCurrentThread())
|
if(!Looper.getMainLooper().isCurrentThread())
|
||||||
throw new IllegalStateException("Can only be called from main thread");
|
throw new IllegalStateException("Can only be called from main thread");
|
||||||
|
|
||||||
@@ -76,6 +72,8 @@ public class StatusInteractionController{
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Status result){
|
public void onSuccess(Status result){
|
||||||
runningReblogRequests.remove(status.id);
|
runningReblogRequests.remove(status.id);
|
||||||
|
result.reblogsCount = Math.max(0, status.reblogsCount) + (reblogged ? 1 : -1);
|
||||||
|
cb.accept(result);
|
||||||
E.post(new StatusCountersUpdatedEvent(result));
|
E.post(new StatusCountersUpdatedEvent(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,24 +82,21 @@ public class StatusInteractionController{
|
|||||||
runningReblogRequests.remove(status.id);
|
runningReblogRequests.remove(status.id);
|
||||||
error.showToast(MastodonApp.context);
|
error.showToast(MastodonApp.context);
|
||||||
status.reblogged=!reblogged;
|
status.reblogged=!reblogged;
|
||||||
if(reblogged)
|
cb.accept(status);
|
||||||
status.reblogsCount--;
|
|
||||||
else
|
|
||||||
status.reblogsCount++;
|
|
||||||
E.post(new StatusCountersUpdatedEvent(status));
|
E.post(new StatusCountersUpdatedEvent(status));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.exec(accountID);
|
.exec(accountID);
|
||||||
runningReblogRequests.put(status.id, req);
|
runningReblogRequests.put(status.id, req);
|
||||||
status.reblogged=reblogged;
|
status.reblogged=reblogged;
|
||||||
if(reblogged)
|
|
||||||
status.reblogsCount++;
|
|
||||||
else
|
|
||||||
status.reblogsCount--;
|
|
||||||
E.post(new StatusCountersUpdatedEvent(status));
|
E.post(new StatusCountersUpdatedEvent(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBookmarked(Status status, boolean bookmarked){
|
public void setBookmarked(Status status, boolean bookmarked){
|
||||||
|
setBookmarked(status, bookmarked, r->{});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBookmarked(Status status, boolean bookmarked, Consumer<Status> cb){
|
||||||
if(!Looper.getMainLooper().isCurrentThread())
|
if(!Looper.getMainLooper().isCurrentThread())
|
||||||
throw new IllegalStateException("Can only be called from main thread");
|
throw new IllegalStateException("Can only be called from main thread");
|
||||||
|
|
||||||
@@ -114,6 +109,7 @@ public class StatusInteractionController{
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Status result){
|
public void onSuccess(Status result){
|
||||||
runningBookmarkRequests.remove(status.id);
|
runningBookmarkRequests.remove(status.id);
|
||||||
|
cb.accept(result);
|
||||||
E.post(new StatusCountersUpdatedEvent(result));
|
E.post(new StatusCountersUpdatedEvent(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,6 +118,7 @@ public class StatusInteractionController{
|
|||||||
runningBookmarkRequests.remove(status.id);
|
runningBookmarkRequests.remove(status.id);
|
||||||
error.showToast(MastodonApp.context);
|
error.showToast(MastodonApp.context);
|
||||||
status.bookmarked=!bookmarked;
|
status.bookmarked=!bookmarked;
|
||||||
|
cb.accept(status);
|
||||||
E.post(new StatusCountersUpdatedEvent(status));
|
E.post(new StatusCountersUpdatedEvent(status));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package org.joinmastodon.android.api.session;
|
||||||
|
|
||||||
|
public class AccountActivationInfo{
|
||||||
|
public String email;
|
||||||
|
public long lastEmailConfirmationResend;
|
||||||
|
|
||||||
|
public AccountActivationInfo(String email, long lastEmailConfirmationResend){
|
||||||
|
this.email=email;
|
||||||
|
this.lastEmailConfirmationResend=lastEmailConfirmationResend;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,17 +30,19 @@ public class AccountSession{
|
|||||||
public List<Filter> wordFilters=new ArrayList<>();
|
public List<Filter> wordFilters=new ArrayList<>();
|
||||||
public String pushAccountID;
|
public String pushAccountID;
|
||||||
public Preferences preferences;
|
public Preferences preferences;
|
||||||
|
public AccountActivationInfo activationInfo;
|
||||||
private transient MastodonAPIController apiController;
|
private transient MastodonAPIController apiController;
|
||||||
private transient StatusInteractionController statusInteractionController;
|
private transient StatusInteractionController statusInteractionController;
|
||||||
private transient CacheController cacheController;
|
private transient CacheController cacheController;
|
||||||
private transient PushSubscriptionManager pushSubscriptionManager;
|
private transient PushSubscriptionManager pushSubscriptionManager;
|
||||||
|
|
||||||
AccountSession(Token token, Account self, Application app, String domain, boolean activated){
|
AccountSession(Token token, Account self, Application app, String domain, boolean activated, AccountActivationInfo activationInfo){
|
||||||
this.token=token;
|
this.token=token;
|
||||||
this.self=self;
|
this.self=self;
|
||||||
this.domain=domain;
|
this.domain=domain;
|
||||||
this.app=app;
|
this.app=app;
|
||||||
this.activated=activated;
|
this.activated=activated;
|
||||||
|
this.activationInfo=activationInfo;
|
||||||
infoLastUpdated=System.currentTimeMillis();
|
infoLastUpdated=System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ public class AccountSessionManager{
|
|||||||
maybeUpdateShortcuts();
|
maybeUpdateShortcuts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAccount(Instance instance, Token token, Account self, Application app, boolean active){
|
public void addAccount(Instance instance, Token token, Account self, Application app, AccountActivationInfo activationInfo){
|
||||||
instances.put(instance.uri, instance);
|
instances.put(instance.uri, instance);
|
||||||
AccountSession session=new AccountSession(token, self, app, instance.uri, active);
|
AccountSession session=new AccountSession(token, self, app, instance.uri, activationInfo==null, activationInfo);
|
||||||
sessions.put(session.getID(), session);
|
sessions.put(session.getID(), session);
|
||||||
lastActiveAccountID=session.getID();
|
lastActiveAccountID=session.getID();
|
||||||
writeAccountsFile();
|
writeAccountsFile();
|
||||||
|
|||||||
@@ -672,7 +672,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
|||||||
languageButton.setOnTouchListener(languagePopup.getDragToOpenListener());
|
languageButton.setOnTouchListener(languagePopup.getDragToOpenListener());
|
||||||
languageButton.setOnClickListener(v->languagePopup.show());
|
languageButton.setOnClickListener(v->languagePopup.show());
|
||||||
|
|
||||||
updateLanguage(languageResolver.getDefault());
|
Preferences prefs = AccountSessionManager.getInstance().getAccount(accountID).preferences;
|
||||||
|
updateLanguage(prefs != null && prefs.postingDefaultLanguage != null && prefs.postingDefaultLanguage.length() > 0
|
||||||
|
? languageResolver.from(prefs.postingDefaultLanguage)
|
||||||
|
: languageResolver.getDefault());
|
||||||
|
|
||||||
Menu languageMenu = languagePopup.getMenu();
|
Menu languageMenu = languagePopup.getMenu();
|
||||||
for (String recentLanguage : Optional.ofNullable(recentLanguages.get(accountID)).orElse(defaultRecentLanguages)) {
|
for (String recentLanguage : Optional.ofNullable(recentLanguages.get(accountID)).orElse(defaultRecentLanguages)) {
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public class FollowRequestsListFragment extends BaseRecyclerFragment<FollowReque
|
|||||||
RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter();
|
RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter();
|
||||||
if (!rel.requested && !rel.followedBy && adapter != null) {
|
if (!rel.requested && !rel.followedBy && adapter != null) {
|
||||||
data.remove(item);
|
data.remove(item);
|
||||||
adapter.notifyItemRemoved(getBindingAdapterPosition());
|
adapter.notifyItemRemoved(getLayoutPosition());
|
||||||
} else {
|
} else {
|
||||||
rebind();
|
rebind();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowInsets;
|
import android.view.WindowInsets;
|
||||||
@@ -31,6 +32,7 @@ import com.squareup.otto.Subscribe;
|
|||||||
import org.joinmastodon.android.BuildConfig;
|
import org.joinmastodon.android.BuildConfig;
|
||||||
import org.joinmastodon.android.E;
|
import org.joinmastodon.android.E;
|
||||||
import org.joinmastodon.android.GlobalUserPreferences;
|
import org.joinmastodon.android.GlobalUserPreferences;
|
||||||
|
import org.joinmastodon.android.GlobalUserPreferences.ColorPreference;
|
||||||
import org.joinmastodon.android.MainActivity;
|
import org.joinmastodon.android.MainActivity;
|
||||||
import org.joinmastodon.android.MastodonApp;
|
import org.joinmastodon.android.MastodonApp;
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
@@ -241,10 +243,25 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
|||||||
restartActivityToApplyNewTheme();
|
restartActivityToApplyNewTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onColorPreferenceClick(GlobalUserPreferences.ColorPreference color){
|
private boolean onColorPreferenceClick(MenuItem item){
|
||||||
GlobalUserPreferences.color=color;
|
ColorPreference pref = null;
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == R.id.m3_color) pref = ColorPreference.MATERIAL3;
|
||||||
|
else if (id == R.id.pink_color) pref = ColorPreference.PINK;
|
||||||
|
else if (id == R.id.purple_color) pref = ColorPreference.PURPLE;
|
||||||
|
else if (id == R.id.green_color) pref = ColorPreference.GREEN;
|
||||||
|
else if (id == R.id.blue_color) pref = ColorPreference.BLUE;
|
||||||
|
else if (id == R.id.brown_color) pref = ColorPreference.BROWN;
|
||||||
|
else if (id == R.id.red_color) pref = ColorPreference.RED;
|
||||||
|
else if (id == R.id.yellow_color) pref = ColorPreference.YELLOW;
|
||||||
|
|
||||||
|
if (pref == null) return false;
|
||||||
|
|
||||||
|
GlobalUserPreferences.color=pref;
|
||||||
GlobalUserPreferences.save();
|
GlobalUserPreferences.save();
|
||||||
restartActivityToApplyNewTheme();
|
restartActivityToApplyNewTheme();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onTrueBlackThemeChanged(SwitchItem item){
|
private void onTrueBlackThemeChanged(SwitchItem item){
|
||||||
@@ -682,38 +699,8 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
|||||||
button=findViewById(R.id.color_picker_button);
|
button=findViewById(R.id.color_picker_button);
|
||||||
popupMenu=new PopupMenu(getActivity(), button, Gravity.CENTER_HORIZONTAL);
|
popupMenu=new PopupMenu(getActivity(), button, Gravity.CENTER_HORIZONTAL);
|
||||||
popupMenu.inflate(R.menu.color_picker);
|
popupMenu.inflate(R.menu.color_picker);
|
||||||
popupMenu.setOnMenuItemClickListener(item->{
|
popupMenu.getMenu().findItem(R.id.m3_color).setVisible(Build.VERSION.SDK_INT >= Build.VERSION_CODES.S);
|
||||||
GlobalUserPreferences.ColorPreference pref;
|
popupMenu.setOnMenuItemClickListener(SettingsFragment.this::onColorPreferenceClick);
|
||||||
int id=item.getItemId();
|
|
||||||
if(id==R.id.pink_color) {
|
|
||||||
pref = GlobalUserPreferences.ColorPreference.PINK;
|
|
||||||
onColorPreferenceClick(pref);
|
|
||||||
}
|
|
||||||
else if(id==R.id.purple_color) {
|
|
||||||
pref = GlobalUserPreferences.ColorPreference.PURPLE;
|
|
||||||
onColorPreferenceClick(pref);
|
|
||||||
}
|
|
||||||
else if(id==R.id.green_color) {
|
|
||||||
pref = GlobalUserPreferences.ColorPreference.GREEN;
|
|
||||||
onColorPreferenceClick(pref);
|
|
||||||
}
|
|
||||||
else if(id==R.id.blue_color) {
|
|
||||||
pref = GlobalUserPreferences.ColorPreference.BLUE;
|
|
||||||
onColorPreferenceClick(pref);
|
|
||||||
}
|
|
||||||
else if(id==R.id.brown_color) {
|
|
||||||
pref = GlobalUserPreferences.ColorPreference.BROWN;
|
|
||||||
onColorPreferenceClick(pref);
|
|
||||||
}
|
|
||||||
else if(id==R.id.yellow_color) {
|
|
||||||
pref = GlobalUserPreferences.ColorPreference.YELLOW;
|
|
||||||
onColorPreferenceClick(pref);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
// UiUtils.enablePopupMenuIcons(getActivity(), popupMenu);
|
|
||||||
button.setOnTouchListener(popupMenu.getDragToOpenListener());
|
button.setOnTouchListener(popupMenu.getDragToOpenListener());
|
||||||
button.setOnClickListener(v->popupMenu.show());
|
button.setOnClickListener(v->popupMenu.show());
|
||||||
}
|
}
|
||||||
@@ -722,12 +709,15 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
|||||||
public void onBind(ColorPicker item){
|
public void onBind(ColorPicker item){
|
||||||
icon.setImageResource(R.drawable.ic_fluent_color_24_regular);
|
icon.setImageResource(R.drawable.ic_fluent_color_24_regular);
|
||||||
button.setText(switch(GlobalUserPreferences.color){
|
button.setText(switch(GlobalUserPreferences.color){
|
||||||
|
case MATERIAL3 -> R.string.sk_color_theme_material3;
|
||||||
case PINK -> R.string.sk_color_theme_pink;
|
case PINK -> R.string.sk_color_theme_pink;
|
||||||
case PURPLE -> R.string.sk_color_theme_purple;
|
case PURPLE -> R.string.sk_color_theme_purple;
|
||||||
case GREEN -> R.string.sk_color_theme_green;
|
case GREEN -> R.string.sk_color_theme_green;
|
||||||
case BLUE -> R.string.sk_color_theme_blue;
|
case BLUE -> R.string.sk_color_theme_blue;
|
||||||
case BROWN -> R.string.sk_color_theme_brown;
|
case BROWN -> R.string.sk_color_theme_brown;
|
||||||
|
case RED -> R.string.sk_color_theme_red;
|
||||||
case YELLOW -> R.string.sk_color_theme_yellow;
|
case YELLOW -> R.string.sk_color_theme_yellow;
|
||||||
|
default -> throw new IllegalStateException("Unexpected value: "+GlobalUserPreferences.color);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import android.graphics.Paint;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.style.ImageSpan;
|
|
||||||
import android.text.style.ReplacementSpan;
|
import android.text.style.ReplacementSpan;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -15,17 +14,14 @@ import android.view.WindowInsets;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.joinmastodon.android.MastodonApp;
|
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
import org.joinmastodon.android.fragments.onboarding.InstanceCatalogSignupFragment;
|
import org.joinmastodon.android.fragments.onboarding.InstanceCatalogSignupFragment;
|
||||||
import org.joinmastodon.android.fragments.onboarding.InstanceChooserLoginFragment;
|
import org.joinmastodon.android.fragments.onboarding.InstanceChooserLoginFragment;
|
||||||
import org.joinmastodon.android.ui.InterpolatingMotionEffect;
|
|
||||||
import org.joinmastodon.android.ui.views.SizeListenerFrameLayout;
|
import org.joinmastodon.android.ui.views.SizeListenerFrameLayout;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.viewpager.widget.PagerAdapter;
|
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
import me.grishka.appkit.Nav;
|
import me.grishka.appkit.Nav;
|
||||||
import me.grishka.appkit.fragments.AppKitFragment;
|
import me.grishka.appkit.fragments.AppKitFragment;
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>{
|
|||||||
public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){
|
public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){
|
||||||
for(Status s:data){
|
for(Status s:data){
|
||||||
if(s.getContentStatus().id.equals(ev.id)){
|
if(s.getContentStatus().id.equals(ev.id)){
|
||||||
s.update(ev);
|
s.getContentStatus().update(ev);
|
||||||
for(int i=0;i<list.getChildCount();i++){
|
for(int i=0;i<list.getChildCount();i++){
|
||||||
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
|
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
|
||||||
if(holder instanceof FooterStatusDisplayItem.Holder footer && footer.getItem().status==s.getContentStatus()){
|
if(holder instanceof FooterStatusDisplayItem.Holder footer && footer.getItem().status==s.getContentStatus()){
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import org.joinmastodon.android.R;
|
|||||||
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
|
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
|
||||||
import org.joinmastodon.android.api.requests.accounts.SetAccountFollowed;
|
import org.joinmastodon.android.api.requests.accounts.SetAccountFollowed;
|
||||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
import org.joinmastodon.android.api.session.AccountSessionManager;
|
||||||
|
import org.joinmastodon.android.fragments.ListTimelinesFragment;
|
||||||
import org.joinmastodon.android.fragments.ProfileFragment;
|
import org.joinmastodon.android.fragments.ProfileFragment;
|
||||||
import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment;
|
import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment;
|
||||||
import org.joinmastodon.android.model.Account;
|
import org.joinmastodon.android.model.Account;
|
||||||
@@ -286,6 +287,7 @@ public abstract class BaseAccountListFragment extends BaseRecyclerFragment<BaseA
|
|||||||
menu.findItem(R.id.mute).setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername()));
|
menu.findItem(R.id.mute).setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername()));
|
||||||
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getDisplayUsername()));
|
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getDisplayUsername()));
|
||||||
menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getDisplayUsername()));
|
menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getDisplayUsername()));
|
||||||
|
menu.findItem(R.id.manage_user_lists).setTitle(getString(R.string.sk_lists_with_user, account.getDisplayUsername())).setVisible(relationship.following);
|
||||||
MenuItem hideBoosts=menu.findItem(R.id.hide_boosts);
|
MenuItem hideBoosts=menu.findItem(R.id.hide_boosts);
|
||||||
MenuItem manageUserLists=menu.findItem(R.id.manage_user_lists);
|
MenuItem manageUserLists=menu.findItem(R.id.manage_user_lists);
|
||||||
if(relationship.following){
|
if(relationship.following){
|
||||||
@@ -372,6 +374,12 @@ public abstract class BaseAccountListFragment extends BaseRecyclerFragment<BaseA
|
|||||||
})
|
})
|
||||||
.wrapProgress(getActivity(), R.string.loading, false)
|
.wrapProgress(getActivity(), R.string.loading, false)
|
||||||
.exec(accountID);
|
.exec(accountID);
|
||||||
|
}else if(id==R.id.manage_user_lists){
|
||||||
|
final Bundle args=new Bundle();
|
||||||
|
args.putString("account", accountID);
|
||||||
|
args.putString("profileAccount", account.id);
|
||||||
|
args.putString("profileDisplayUsername", account.getDisplayUsername());
|
||||||
|
Nav.go(getActivity(), ListTimelinesFragment.class, args);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.joinmastodon.android.fragments.onboarding;
|
package org.joinmastodon.android.fragments.onboarding;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
@@ -12,19 +12,21 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowInsets;
|
import android.view.WindowInsets;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.joinmastodon.android.MainActivity;
|
import org.joinmastodon.android.MainActivity;
|
||||||
import org.joinmastodon.android.MastodonApp;
|
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
import org.joinmastodon.android.api.requests.accounts.GetOwnAccount;
|
import org.joinmastodon.android.api.requests.accounts.GetOwnAccount;
|
||||||
import org.joinmastodon.android.api.requests.accounts.ResendConfirmationEmail;
|
import org.joinmastodon.android.api.requests.accounts.ResendConfirmationEmail;
|
||||||
import org.joinmastodon.android.api.requests.accounts.UpdateAccountCredentials;
|
import org.joinmastodon.android.api.requests.accounts.UpdateAccountCredentials;
|
||||||
|
import org.joinmastodon.android.api.session.AccountActivationInfo;
|
||||||
import org.joinmastodon.android.api.session.AccountSession;
|
import org.joinmastodon.android.api.session.AccountSession;
|
||||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
import org.joinmastodon.android.api.session.AccountSessionManager;
|
||||||
import org.joinmastodon.android.fragments.HomeFragment;
|
import org.joinmastodon.android.fragments.HomeFragment;
|
||||||
import org.joinmastodon.android.fragments.SettingsFragment;
|
import org.joinmastodon.android.fragments.SettingsFragment;
|
||||||
import org.joinmastodon.android.model.Account;
|
import org.joinmastodon.android.model.Account;
|
||||||
|
import org.joinmastodon.android.ui.AccountSwitcherSheet;
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -35,40 +37,50 @@ import me.grishka.appkit.Nav;
|
|||||||
import me.grishka.appkit.api.APIRequest;
|
import me.grishka.appkit.api.APIRequest;
|
||||||
import me.grishka.appkit.api.Callback;
|
import me.grishka.appkit.api.Callback;
|
||||||
import me.grishka.appkit.api.ErrorResponse;
|
import me.grishka.appkit.api.ErrorResponse;
|
||||||
import me.grishka.appkit.fragments.AppKitFragment;
|
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
public class AccountActivationFragment extends AppKitFragment{
|
public class AccountActivationFragment extends ToolbarFragment{
|
||||||
private String accountID;
|
private String accountID;
|
||||||
|
|
||||||
private Button btn, backBtn;
|
private Button openEmailBtn, resendBtn;
|
||||||
private View buttonBar;
|
private View contentView;
|
||||||
private Handler uiHandler=new Handler(Looper.getMainLooper());
|
private Handler uiHandler=new Handler(Looper.getMainLooper());
|
||||||
private Runnable pollRunnable=this::tryGetAccount;
|
private Runnable pollRunnable=this::tryGetAccount;
|
||||||
private APIRequest currentRequest;
|
private APIRequest currentRequest;
|
||||||
|
private Runnable resendTimer=this::updateResendTimer;
|
||||||
|
private long lastResendTime;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState){
|
public void onCreate(Bundle savedInstanceState){
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
accountID=getArguments().getString("account");
|
accountID=getArguments().getString("account");
|
||||||
|
setTitle(R.string.confirm_email_title);
|
||||||
|
AccountSession session=AccountSessionManager.getInstance().getAccount(accountID);
|
||||||
|
lastResendTime=session.activationInfo!=null ? session.activationInfo.lastEmailConfirmationResend : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState){
|
public View onCreateContentView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState){
|
||||||
View view=inflater.inflate(R.layout.fragment_onboarding_activation, container, false);
|
View view=inflater.inflate(R.layout.fragment_onboarding_activation, container, false);
|
||||||
|
|
||||||
btn=view.findViewById(R.id.btn_next);
|
openEmailBtn=view.findViewById(R.id.btn_next);
|
||||||
btn.setOnClickListener(v->onButtonClick());
|
openEmailBtn.setOnClickListener(this::onOpenEmailClick);
|
||||||
btn.setOnLongClickListener(v->{
|
openEmailBtn.setOnLongClickListener(v->{
|
||||||
Bundle args=new Bundle();
|
Bundle args=new Bundle();
|
||||||
args.putString("account", accountID);
|
args.putString("account", accountID);
|
||||||
Nav.go(getActivity(), SettingsFragment.class, args);
|
Nav.go(getActivity(), SettingsFragment.class, args);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
buttonBar=view.findViewById(R.id.button_bar);
|
resendBtn=view.findViewById(R.id.btn_resend);
|
||||||
view.findViewById(R.id.btn_back).setOnClickListener(v->onBackButtonClick());
|
resendBtn.setOnClickListener(this::onResendClick);
|
||||||
|
TextView text=view.findViewById(R.id.subtitle);
|
||||||
|
AccountSession session=AccountSessionManager.getInstance().getAccount(accountID);
|
||||||
|
text.setText(getString(R.string.confirm_email_subtitle, session.activationInfo!=null ? session.activationInfo.email : "?"));
|
||||||
|
updateResendTimer();
|
||||||
|
|
||||||
|
contentView=view;
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,14 +92,32 @@ public class AccountActivationFragment extends AppKitFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLight));
|
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onUpdateToolbar(){
|
||||||
|
super.onUpdateToolbar();
|
||||||
|
getToolbar().setBackground(null);
|
||||||
|
getToolbar().setElevation(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canGoBack(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onToolbarNavigationClick(){
|
||||||
|
new AccountSwitcherSheet(getActivity()).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplyWindowInsets(WindowInsets insets){
|
public void onApplyWindowInsets(WindowInsets insets){
|
||||||
if(Build.VERSION.SDK_INT>=27){
|
if(Build.VERSION.SDK_INT>=27){
|
||||||
int inset=insets.getSystemWindowInsetBottom();
|
int inset=insets.getSystemWindowInsetBottom();
|
||||||
buttonBar.setPadding(0, 0, 0, inset>0 ? Math.max(inset, V.dp(36)) : 0);
|
contentView.setPadding(0, 0, 0, inset>0 ? Math.max(inset, V.dp(36)) : 0);
|
||||||
super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), 0));
|
super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), 0));
|
||||||
}else{
|
}else{
|
||||||
super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom()));
|
super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom()));
|
||||||
@@ -111,7 +141,7 @@ public class AccountActivationFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onButtonClick(){
|
private void onOpenEmailClick(View v){
|
||||||
try{
|
try{
|
||||||
startActivity(Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_EMAIL).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
startActivity(Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_EMAIL).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||||
}catch(ActivityNotFoundException x){
|
}catch(ActivityNotFoundException x){
|
||||||
@@ -119,12 +149,21 @@ public class AccountActivationFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onBackButtonClick(){
|
private void onResendClick(View v){
|
||||||
new ResendConfirmationEmail(null)
|
new ResendConfirmationEmail(null)
|
||||||
.setCallback(new Callback<>(){
|
.setCallback(new Callback<>(){
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object result){
|
public void onSuccess(Object result){
|
||||||
Toast.makeText(getActivity(), R.string.resent_email, Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), R.string.resent_email, Toast.LENGTH_SHORT).show();
|
||||||
|
AccountSession session=AccountSessionManager.getInstance().getAccount(accountID);
|
||||||
|
if(session.activationInfo==null){
|
||||||
|
session.activationInfo=new AccountActivationInfo("?", System.currentTimeMillis());
|
||||||
|
}else{
|
||||||
|
session.activationInfo.lastEmailConfirmationResend=System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
lastResendTime=session.activationInfo.lastEmailConfirmationResend;
|
||||||
|
AccountSessionManager.getInstance().writeAccountsFile();
|
||||||
|
updateResendTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -152,7 +191,7 @@ public class AccountActivationFragment extends AppKitFragment{
|
|||||||
AccountSessionManager mgr=AccountSessionManager.getInstance();
|
AccountSessionManager mgr=AccountSessionManager.getInstance();
|
||||||
AccountSession session=mgr.getAccount(accountID);
|
AccountSession session=mgr.getAccount(accountID);
|
||||||
mgr.removeAccount(accountID);
|
mgr.removeAccount(accountID);
|
||||||
mgr.addAccount(mgr.getInstanceInfo(session.domain), session.token, result, session.app, true);
|
mgr.addAccount(mgr.getInstanceInfo(session.domain), session.token, result, session.app, null);
|
||||||
String newID=mgr.getLastActiveAccountID();
|
String newID=mgr.getLastActiveAccountID();
|
||||||
Bundle args=new Bundle();
|
Bundle args=new Bundle();
|
||||||
args.putString("account", newID);
|
args.putString("account", newID);
|
||||||
@@ -189,4 +228,25 @@ public class AccountActivationFragment extends AppKitFragment{
|
|||||||
})
|
})
|
||||||
.exec(accountID);
|
.exec(accountID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DefaultLocale")
|
||||||
|
private void updateResendTimer(){
|
||||||
|
long sinceResend=System.currentTimeMillis()-lastResendTime;
|
||||||
|
if(sinceResend>59_000L){
|
||||||
|
resendBtn.setText(R.string.resend);
|
||||||
|
resendBtn.setEnabled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int seconds=(int)((60_000L-sinceResend)/1000L);
|
||||||
|
resendBtn.setText(String.format("%s (%d)", getString(R.string.resend), seconds));
|
||||||
|
if(resendBtn.isEnabled())
|
||||||
|
resendBtn.setEnabled(false);
|
||||||
|
resendBtn.postDelayed(resendTimer, 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView(){
|
||||||
|
super.onDestroyView();
|
||||||
|
resendBtn.removeCallbacks(resendTimer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,22 +5,18 @@ import android.content.res.ColorStateList;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.TypedValue;
|
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.Space;
|
import android.widget.Space;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.DiffUtil;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
@@ -28,27 +24,23 @@ import org.joinmastodon.android.api.session.AccountSessionManager;
|
|||||||
import org.joinmastodon.android.model.Instance;
|
import org.joinmastodon.android.model.Instance;
|
||||||
import org.joinmastodon.android.model.catalog.CatalogInstance;
|
import org.joinmastodon.android.model.catalog.CatalogInstance;
|
||||||
import org.joinmastodon.android.ui.BetterItemAnimator;
|
import org.joinmastodon.android.ui.BetterItemAnimator;
|
||||||
import org.joinmastodon.android.ui.DividerItemDecoration;
|
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import me.grishka.appkit.FragmentStackActivity;
|
import me.grishka.appkit.FragmentStackActivity;
|
||||||
import me.grishka.appkit.Nav;
|
|
||||||
import me.grishka.appkit.api.PaginatedList;
|
|
||||||
import me.grishka.appkit.utils.BindableViewHolder;
|
import me.grishka.appkit.utils.BindableViewHolder;
|
||||||
import me.grishka.appkit.utils.MergeRecyclerAdapter;
|
import me.grishka.appkit.utils.MergeRecyclerAdapter;
|
||||||
import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
import me.grishka.appkit.views.UsableRecyclerView;
|
import me.grishka.appkit.views.UsableRecyclerView;
|
||||||
|
|
||||||
public class MegalodonLoginFragment extends InstanceCatalogFragment {
|
public class CustomWelcomeFragment extends InstanceCatalogFragment {
|
||||||
private View headerView;
|
private View headerView;
|
||||||
|
|
||||||
public MegalodonLoginFragment() {
|
public CustomWelcomeFragment() {
|
||||||
super(R.layout.fragment_megalodon_welcome, 1);
|
super(R.layout.fragment_welcome_custom, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -139,15 +131,16 @@ public class MegalodonLoginFragment extends InstanceCatalogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RecyclerView.Adapter getAdapter(){
|
protected RecyclerView.Adapter getAdapter(){
|
||||||
headerView=getActivity().getLayoutInflater().inflate(R.layout.header_megalodon_welcome, list, false);
|
headerView=getActivity().getLayoutInflater().inflate(R.layout.header_welcome_custom, list, false);
|
||||||
searchEdit=headerView.findViewById(R.id.search_edit);
|
searchEdit=headerView.findViewById(R.id.search_edit);
|
||||||
searchEdit.setOnEditorActionListener(this::onSearchEnterPressed);
|
searchEdit.setOnEditorActionListener(this::onSearchEnterPressed);
|
||||||
|
|
||||||
headerView.findViewById(R.id.more).setVisibility(View.GONE);
|
headerView.findViewById(R.id.more).setVisibility(View.GONE);
|
||||||
headerView.findViewById(R.id.visibility).setVisibility(View.GONE);
|
headerView.findViewById(R.id.visibility).setVisibility(View.GONE);
|
||||||
((TextView) headerView.findViewById(R.id.username)).setText("@megalodon");
|
headerView.findViewById(R.id.separator).setVisibility(View.GONE);
|
||||||
|
headerView.findViewById(R.id.timestamp).setVisibility(View.GONE);
|
||||||
|
((TextView) headerView.findViewById(R.id.username)).setText(R.string.sk_app_username);
|
||||||
((TextView) headerView.findViewById(R.id.name)).setText(R.string.sk_app_name);
|
((TextView) headerView.findViewById(R.id.name)).setText(R.string.sk_app_name);
|
||||||
((TextView) headerView.findViewById(R.id.timestamp)).setText(R.string.time_now);
|
|
||||||
((ImageView) headerView.findViewById(R.id.avatar)).setImageDrawable(getActivity().getDrawable(R.mipmap.ic_launcher));
|
((ImageView) headerView.findViewById(R.id.avatar)).setImageDrawable(getActivity().getDrawable(R.mipmap.ic_launcher));
|
||||||
((FragmentStackActivity) getActivity()).invalidateSystemBarColors(this);
|
((FragmentStackActivity) getActivity()).invalidateSystemBarColors(this);
|
||||||
|
|
||||||
@@ -176,7 +169,7 @@ public class MegalodonLoginFragment extends InstanceCatalogFragment {
|
|||||||
return mergeAdapter;
|
return mergeAdapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class InstancesAdapter extends UsableRecyclerView.Adapter<InstanceViewHolder>{
|
private class InstancesAdapter extends UsableRecyclerView.Adapter<InstanceViewHolder> {
|
||||||
public InstancesAdapter(){
|
public InstancesAdapter(){
|
||||||
super(imgLoader);
|
super(imgLoader);
|
||||||
}
|
}
|
||||||
@@ -211,7 +204,7 @@ public class MegalodonLoginFragment extends InstanceCatalogFragment {
|
|||||||
private final RadioButton radioButton;
|
private final RadioButton radioButton;
|
||||||
|
|
||||||
public InstanceViewHolder(){
|
public InstanceViewHolder(){
|
||||||
super(getActivity(), R.layout.item_megalodon_instance, list);
|
super(getActivity(), R.layout.item_instance_custom, list);
|
||||||
|
|
||||||
// itemView.setPadding(V.dp(16), V.dp(16), V.dp(16), V.dp(16));
|
// itemView.setPadding(V.dp(16), V.dp(16), V.dp(16), V.dp(16));
|
||||||
// TypedValue value = new TypedValue();
|
// TypedValue value = new TypedValue();
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.joinmastodon.android.fragments.onboarding;
|
package org.joinmastodon.android.fragments.onboarding;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.graphics.Paint;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -15,6 +16,7 @@ import android.widget.TextView;
|
|||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
import org.joinmastodon.android.api.MastodonAPIController;
|
import org.joinmastodon.android.api.MastodonAPIController;
|
||||||
import org.joinmastodon.android.model.Instance;
|
import org.joinmastodon.android.model.Instance;
|
||||||
|
import org.joinmastodon.android.ui.DividerItemDecoration;
|
||||||
import org.joinmastodon.android.ui.OutlineProviders;
|
import org.joinmastodon.android.ui.OutlineProviders;
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
@@ -33,6 +35,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import me.grishka.appkit.Nav;
|
import me.grishka.appkit.Nav;
|
||||||
import me.grishka.appkit.fragments.AppKitFragment;
|
import me.grishka.appkit.fragments.AppKitFragment;
|
||||||
|
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||||
import me.grishka.appkit.imageloader.ViewImageLoader;
|
import me.grishka.appkit.imageloader.ViewImageLoader;
|
||||||
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
||||||
import me.grishka.appkit.utils.BindableViewHolder;
|
import me.grishka.appkit.utils.BindableViewHolder;
|
||||||
@@ -46,7 +49,7 @@ import okhttp3.Request;
|
|||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
import okhttp3.ResponseBody;
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
public class GoogleMadeMeAddThisFragment extends AppKitFragment{
|
public class GoogleMadeMeAddThisFragment extends ToolbarFragment{
|
||||||
private UsableRecyclerView list;
|
private UsableRecyclerView list;
|
||||||
private MergeRecyclerAdapter adapter;
|
private MergeRecyclerAdapter adapter;
|
||||||
private Button btn;
|
private Button btn;
|
||||||
@@ -60,6 +63,7 @@ public class GoogleMadeMeAddThisFragment extends AppKitFragment{
|
|||||||
public void onCreate(Bundle savedInstanceState){
|
public void onCreate(Bundle savedInstanceState){
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setRetainInstance(true);
|
setRetainInstance(true);
|
||||||
|
setTitle(R.string.privacy_policy_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -82,37 +86,24 @@ public class GoogleMadeMeAddThisFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||||
View view=inflater.inflate(R.layout.fragment_onboarding_rules, container, false);
|
View view=inflater.inflate(R.layout.fragment_onboarding_rules, container, false);
|
||||||
|
|
||||||
list=view.findViewById(R.id.list);
|
list=view.findViewById(R.id.list);
|
||||||
list.setLayoutManager(new LinearLayoutManager(getActivity()));
|
list.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
View headerView=inflater.inflate(R.layout.item_list_header, list, false);
|
View headerView=inflater.inflate(R.layout.item_list_header_simple, list, false);
|
||||||
TextView title=headerView.findViewById(R.id.title);
|
TextView text=headerView.findViewById(R.id.text);
|
||||||
TextView subtitle=headerView.findViewById(R.id.subtitle);
|
text.setText(R.string.privacy_policy_subtitle);
|
||||||
headerView.findViewById(R.id.step_counter).setVisibility(View.GONE);
|
|
||||||
title.setText(R.string.privacy_policy_title);
|
|
||||||
subtitle.setText(R.string.privacy_policy_subtitle);
|
|
||||||
|
|
||||||
adapter=new MergeRecyclerAdapter();
|
adapter=new MergeRecyclerAdapter();
|
||||||
adapter.addAdapter(new SingleViewRecyclerAdapter(headerView));
|
adapter.addAdapter(new SingleViewRecyclerAdapter(headerView));
|
||||||
adapter.addAdapter(itemsAdapter=new ItemsAdapter());
|
adapter.addAdapter(itemsAdapter=new ItemsAdapter());
|
||||||
list.setAdapter(adapter);
|
list.setAdapter(adapter);
|
||||||
list.setSelector(null);
|
list.addItemDecoration(new DividerItemDecoration(getActivity(), R.attr.colorM3SurfaceVariant, 1, 56, 0, DividerItemDecoration.NOT_FIRST));
|
||||||
list.addItemDecoration(new RecyclerView.ItemDecoration(){
|
|
||||||
@Override
|
|
||||||
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state){
|
|
||||||
if(parent.getChildViewHolder(view) instanceof ItemViewHolder){
|
|
||||||
outRect.left=outRect.right=V.dp(18.5f);
|
|
||||||
outRect.top=V.dp(16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btn=view.findViewById(R.id.btn_next);
|
btn=view.findViewById(R.id.btn_next);
|
||||||
btn.setOnClickListener(v->onButtonClick());
|
btn.setOnClickListener(v->onButtonClick());
|
||||||
buttonBar=view.findViewById(R.id.button_bar);
|
buttonBar=view.findViewById(R.id.button_bar);
|
||||||
view.findViewById(R.id.btn_back).setOnClickListener(v->Nav.finish(this));
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
@@ -120,7 +111,15 @@ public class GoogleMadeMeAddThisFragment extends AppKitFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLight));
|
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onUpdateToolbar(){
|
||||||
|
super.onUpdateToolbar();
|
||||||
|
getToolbar().setBackground(null);
|
||||||
|
getToolbar().setElevation(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onButtonClick(){
|
protected void onButtonClick(){
|
||||||
@@ -192,24 +191,17 @@ public class GoogleMadeMeAddThisFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class ItemViewHolder extends BindableViewHolder<Item> implements UsableRecyclerView.Clickable{
|
private class ItemViewHolder extends BindableViewHolder<Item> implements UsableRecyclerView.Clickable{
|
||||||
private final TextView domain, title;
|
private final TextView title;
|
||||||
private final ImageView favicon;
|
|
||||||
|
|
||||||
public ItemViewHolder(){
|
public ItemViewHolder(){
|
||||||
super(getActivity(), R.layout.item_privacy_policy_link, list);
|
super(getActivity(), R.layout.item_privacy_policy_link, list);
|
||||||
domain=findViewById(R.id.domain);
|
|
||||||
title=findViewById(R.id.title);
|
title=findViewById(R.id.title);
|
||||||
favicon=findViewById(R.id.favicon);
|
title.setPaintFlags(title.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||||
itemView.setOutlineProvider(OutlineProviders.roundedRect(10));
|
|
||||||
itemView.setClipToOutline(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBind(Item item){
|
public void onBind(Item item){
|
||||||
domain.setText(item.domain);
|
|
||||||
title.setText(item.title);
|
title.setText(item.title);
|
||||||
|
|
||||||
ViewImageLoader.load(favicon, null, new UrlImageLoaderRequest(item.faviconUrl));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -187,6 +187,8 @@ abstract class InstanceCatalogFragment extends BaseRecyclerFragment<CatalogInsta
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void loadInstanceInfo(String _domain, boolean isFromRedirect){
|
protected void loadInstanceInfo(String _domain, boolean isFromRedirect){
|
||||||
|
if(TextUtils.isEmpty(_domain))
|
||||||
|
return;
|
||||||
String domain=normalizeInstanceDomain(_domain);
|
String domain=normalizeInstanceDomain(_domain);
|
||||||
Instance cachedInstance=instancesCache.get(domain);
|
Instance cachedInstance=instancesCache.get(domain);
|
||||||
if(cachedInstance!=null){
|
if(cachedInstance!=null){
|
||||||
@@ -222,7 +224,7 @@ abstract class InstanceCatalogFragment extends BaseRecyclerFragment<CatalogInsta
|
|||||||
}
|
}
|
||||||
if(Objects.equals(domain, currentSearchQuery) || Objects.equals(currentSearchQuery, redirects.get(domain)) || Objects.equals(currentSearchQuery, redirectsInverse.get(domain))){
|
if(Objects.equals(domain, currentSearchQuery) || Objects.equals(currentSearchQuery, redirects.get(domain)) || Objects.equals(currentSearchQuery, redirectsInverse.get(domain))){
|
||||||
boolean found=false;
|
boolean found=false;
|
||||||
for(CatalogInstance ci : filteredData){
|
for(CatalogInstance ci:filteredData){
|
||||||
if(ci.domain.equals(domain) && ci!=fakeInstance){
|
if(ci.domain.equals(domain) && ci!=fakeInstance){
|
||||||
found=true;
|
found=true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,39 +1,52 @@
|
|||||||
package org.joinmastodon.android.fragments.onboarding;
|
package org.joinmastodon.android.fragments.onboarding;
|
||||||
|
|
||||||
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
|
import android.animation.AnimatorSet;
|
||||||
|
import android.animation.ObjectAnimator;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.graphics.drawable.LayerDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.LocaleList;
|
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.view.Menu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowInsets;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.HorizontalScrollView;
|
||||||
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.PopupMenu;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
import org.joinmastodon.android.api.MastodonAPIRequest;
|
import org.joinmastodon.android.api.MastodonAPIRequest;
|
||||||
import org.joinmastodon.android.api.requests.catalog.GetCatalogCategories;
|
import org.joinmastodon.android.api.requests.catalog.GetCatalogCategories;
|
||||||
import org.joinmastodon.android.api.requests.catalog.GetCatalogInstances;
|
import org.joinmastodon.android.api.requests.catalog.GetCatalogInstances;
|
||||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
|
||||||
import org.joinmastodon.android.model.Instance;
|
import org.joinmastodon.android.model.Instance;
|
||||||
import org.joinmastodon.android.model.catalog.CatalogCategory;
|
import org.joinmastodon.android.model.catalog.CatalogCategory;
|
||||||
import org.joinmastodon.android.model.catalog.CatalogInstance;
|
import org.joinmastodon.android.model.catalog.CatalogInstance;
|
||||||
import org.joinmastodon.android.ui.BetterItemAnimator;
|
import org.joinmastodon.android.ui.BetterItemAnimator;
|
||||||
import org.joinmastodon.android.ui.DividerItemDecoration;
|
|
||||||
import org.joinmastodon.android.ui.M3AlertDialogBuilder;
|
import org.joinmastodon.android.ui.M3AlertDialogBuilder;
|
||||||
import org.joinmastodon.android.ui.tabs.TabLayout;
|
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
import org.joinmastodon.android.ui.views.FilterChipView;
|
||||||
import org.parceler.Parcels;
|
import org.parceler.Parcels;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Locale;
|
||||||
|
import java.util.Random;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -42,18 +55,37 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import me.grishka.appkit.Nav;
|
import me.grishka.appkit.Nav;
|
||||||
import me.grishka.appkit.api.Callback;
|
import me.grishka.appkit.api.Callback;
|
||||||
import me.grishka.appkit.api.ErrorResponse;
|
import me.grishka.appkit.api.ErrorResponse;
|
||||||
|
import me.grishka.appkit.fragments.OnBackPressedListener;
|
||||||
|
import me.grishka.appkit.imageloader.ImageLoaderRecyclerAdapter;
|
||||||
|
import me.grishka.appkit.imageloader.ImageLoaderViewHolder;
|
||||||
|
import me.grishka.appkit.imageloader.requests.ImageLoaderRequest;
|
||||||
import me.grishka.appkit.utils.BindableViewHolder;
|
import me.grishka.appkit.utils.BindableViewHolder;
|
||||||
|
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
||||||
import me.grishka.appkit.utils.MergeRecyclerAdapter;
|
import me.grishka.appkit.utils.MergeRecyclerAdapter;
|
||||||
import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
||||||
|
import me.grishka.appkit.utils.V;
|
||||||
import me.grishka.appkit.views.UsableRecyclerView;
|
import me.grishka.appkit.views.UsableRecyclerView;
|
||||||
|
|
||||||
public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
public class InstanceCatalogSignupFragment extends InstanceCatalogFragment implements OnBackPressedListener{
|
||||||
private View headerView;
|
|
||||||
private MastodonAPIRequest<?> getCategoriesRequest;
|
private MastodonAPIRequest<?> getCategoriesRequest;
|
||||||
private TabLayout categoriesList;
|
|
||||||
private String currentCategory="all";
|
private String currentCategory="all";
|
||||||
private List<CatalogCategory> categories=new ArrayList<>();
|
private List<CatalogCategory> categories=new ArrayList<>();
|
||||||
|
private View topBar;
|
||||||
|
|
||||||
|
private List<String> languages=Collections.emptyList();
|
||||||
|
private PopupMenu langFilterMenu, speedFilterMenu;
|
||||||
|
private SignupSpeedFilter currentSignupSpeedFilter=SignupSpeedFilter.INSTANT;
|
||||||
|
private String currentLanguage=null;
|
||||||
|
private boolean searchQueryMode;
|
||||||
|
private LinearLayout filtersWrap;
|
||||||
|
private HorizontalScrollView filtersScroll;
|
||||||
|
private ImageButton backBtn, clearSearchBtn;
|
||||||
|
private View focusThing;
|
||||||
|
|
||||||
|
private FilterChipView categoryGeneral, categorySpecialInterests;
|
||||||
|
private List<FilterChipView> regionalFilters;
|
||||||
|
private CatalogInstance.Region chosenRegion;
|
||||||
|
private CategoryChoice categoryChoice;
|
||||||
|
|
||||||
public InstanceCatalogSignupFragment(){
|
public InstanceCatalogSignupFragment(){
|
||||||
super(R.layout.fragment_onboarding_common, 10);
|
super(R.layout.fragment_onboarding_common, 10);
|
||||||
@@ -63,6 +95,12 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
public void onAttach(Context context){
|
public void onAttach(Context context){
|
||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
setRefreshEnabled(false);
|
setRefreshEnabled(false);
|
||||||
|
setRetainInstance(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState){
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,6 +113,25 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
if(getActivity()==null)
|
if(getActivity()==null)
|
||||||
return;
|
return;
|
||||||
onDataLoaded(sortInstances(result), false);
|
onDataLoaded(sortInstances(result), false);
|
||||||
|
|
||||||
|
if(langFilterMenu!=null){
|
||||||
|
Menu menu=langFilterMenu.getMenu();
|
||||||
|
menu.clear();
|
||||||
|
menu.add(0, 0, 0, R.string.server_filter_any_language);
|
||||||
|
languages=result.stream().map(i->i.language).distinct().filter(s->s.length()>0).sorted().collect(Collectors.toList());
|
||||||
|
int i=1;
|
||||||
|
for(String lang:languages){
|
||||||
|
Locale locale=Locale.forLanguageTag(lang);
|
||||||
|
String name=locale.getDisplayLanguage(locale);
|
||||||
|
if(name.equals(lang))
|
||||||
|
name=lang.toUpperCase();
|
||||||
|
else
|
||||||
|
name=name.substring(0, 1).toUpperCase()+name.substring(1);
|
||||||
|
menu.add(0, i, 0, name);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateFilteredList();
|
updateFilteredList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,14 +168,14 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateCategories(){
|
private void updateCategories(){
|
||||||
categoriesList.removeAllTabs();
|
// categoriesList.removeAllTabs();
|
||||||
for(CatalogCategory cat:categories){
|
// for(CatalogCategory cat:categories){
|
||||||
int titleRes=getTitleForCategory(cat.category);
|
// int titleRes=getTitleForCategory(cat.category);
|
||||||
TabLayout.Tab tab=categoriesList.newTab().setText(titleRes!=0 ? getString(titleRes) : cat.category).setCustomView(R.layout.item_instance_category);
|
// TabLayout.Tab tab=categoriesList.newTab().setText(titleRes!=0 ? getString(titleRes) : cat.category).setCustomView(R.layout.item_instance_category);
|
||||||
ImageView emoji=tab.getCustomView().findViewById(R.id.emoji);
|
// ImageView emoji=tab.getCustomView().findViewById(R.id.emoji);
|
||||||
emoji.setImageResource(getEmojiForCategory(cat.category));
|
// emoji.setImageResource(getEmojiForCategory(cat.category));
|
||||||
categoriesList.addTab(tab);
|
// categoriesList.addTab(tab);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -130,27 +187,77 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RecyclerView.Adapter getAdapter(){
|
protected RecyclerView.Adapter getAdapter(){
|
||||||
headerView=getActivity().getLayoutInflater().inflate(R.layout.header_onboarding_instance_catalog, list, false);
|
View headerView=new View(getActivity());
|
||||||
searchEdit=headerView.findViewById(R.id.search_edit);
|
headerView.setLayoutParams(new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1));
|
||||||
categoriesList=headerView.findViewById(R.id.categories_list);
|
|
||||||
categoriesList.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener(){
|
|
||||||
@Override
|
|
||||||
public void onTabSelected(TabLayout.Tab tab){
|
|
||||||
CatalogCategory category=categories.get(tab.getPosition());
|
|
||||||
currentCategory=category.category;
|
|
||||||
updateFilteredList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
mergeAdapter=new MergeRecyclerAdapter();
|
||||||
public void onTabUnselected(TabLayout.Tab tab){
|
mergeAdapter.addAdapter(new SingleViewRecyclerAdapter(headerView));
|
||||||
|
mergeAdapter.addAdapter(adapter=new InstancesAdapter());
|
||||||
}
|
return mergeAdapter;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onTabReselected(TabLayout.Tab tab){
|
|
||||||
|
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
backBtn=view.findViewById(R.id.btn_back);
|
||||||
|
backBtn.setOnClickListener(v->{
|
||||||
|
if(searchQueryMode){
|
||||||
|
setSearchQueryMode(false);
|
||||||
|
}else{
|
||||||
|
Nav.finish(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
clearSearchBtn=view.findViewById(R.id.clear);
|
||||||
|
clearSearchBtn.setOnClickListener(v->searchEdit.setText(""));
|
||||||
|
nextButton.setEnabled(true);
|
||||||
|
list.setItemAnimator(new BetterItemAnimator());
|
||||||
|
setStatusBarColor(0);
|
||||||
|
topBar=view.findViewById(R.id.top_bar);
|
||||||
|
|
||||||
|
LayerDrawable topBg=(LayerDrawable) topBar.getBackground().mutate();
|
||||||
|
topBar.setBackground(topBg);
|
||||||
|
Drawable topOverlay=topBg.findDrawableByLayerId(R.id.color_overlay);
|
||||||
|
topOverlay.setAlpha(0);
|
||||||
|
|
||||||
|
LayerDrawable btmBg=(LayerDrawable) buttonBar.getBackground().mutate();
|
||||||
|
buttonBar.setBackground(btmBg);
|
||||||
|
Drawable btmOverlay=btmBg.findDrawableByLayerId(R.id.color_overlay);
|
||||||
|
btmOverlay.setAlpha(0);
|
||||||
|
|
||||||
|
list.addOnScrollListener(new RecyclerView.OnScrollListener(){
|
||||||
|
private boolean isAtTop=true;
|
||||||
|
private Animator currentPanelsAnim;
|
||||||
|
@Override
|
||||||
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy){
|
||||||
|
boolean newAtTop=recyclerView.getChildCount()==0 || (recyclerView.getChildAdapterPosition(recyclerView.getChildAt(0))==0 && recyclerView.getChildAt(0).getTop()==recyclerView.getPaddingTop());
|
||||||
|
if(newAtTop!=isAtTop){
|
||||||
|
isAtTop=newAtTop;
|
||||||
|
if(currentPanelsAnim!=null)
|
||||||
|
currentPanelsAnim.cancel();
|
||||||
|
|
||||||
|
AnimatorSet set=new AnimatorSet();
|
||||||
|
set.playTogether(
|
||||||
|
ObjectAnimator.ofInt(topOverlay, "alpha", isAtTop ? 0 : 20),
|
||||||
|
ObjectAnimator.ofInt(btmOverlay, "alpha", isAtTop ? 0 : 20),
|
||||||
|
ObjectAnimator.ofFloat(topBar, View.TRANSLATION_Z, isAtTop ? 0 : V.dp(3)),
|
||||||
|
ObjectAnimator.ofFloat(buttonBar, View.TRANSLATION_Z, isAtTop ? 0 : V.dp(3))
|
||||||
|
);
|
||||||
|
set.setDuration(150);
|
||||||
|
set.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
||||||
|
set.addListener(new AnimatorListenerAdapter(){
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation){
|
||||||
|
currentPanelsAnim=null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
set.start();
|
||||||
|
currentPanelsAnim=set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
searchEdit=view.findViewById(R.id.search_edit);
|
||||||
searchEdit.setOnEditorActionListener(this::onSearchEnterPressed);
|
searchEdit.setOnEditorActionListener(this::onSearchEnterPressed);
|
||||||
searchEdit.addTextChangedListener(new TextWatcher(){
|
searchEdit.addTextChangedListener(new TextWatcher(){
|
||||||
@Override
|
@Override
|
||||||
@@ -166,42 +273,159 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s){
|
public void afterTextChanged(Editable s){
|
||||||
|
if((clearSearchBtn.getVisibility()==View.VISIBLE)!=(s.length()>0)){
|
||||||
|
clearSearchBtn.setVisibility(s.length()>0 ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
searchEdit.setOnFocusChangeListener((v, hasFocus)->{
|
||||||
|
if(hasFocus && !searchQueryMode){
|
||||||
|
setSearchQueryMode(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mergeAdapter=new MergeRecyclerAdapter();
|
FilterChipView langFilter=new FilterChipView(getActivity());
|
||||||
mergeAdapter.addAdapter(new SingleViewRecyclerAdapter(headerView));
|
langFilter.setDrawableEnd(R.drawable.ic_baseline_arrow_drop_down_18);
|
||||||
mergeAdapter.addAdapter(adapter=new InstancesAdapter());
|
if(currentLanguage==null){
|
||||||
return mergeAdapter;
|
langFilter.setText(R.string.server_filter_any_language);
|
||||||
|
}else{
|
||||||
|
Locale locale=Locale.forLanguageTag(currentLanguage);
|
||||||
|
langFilter.setText(locale.getDisplayLanguage(locale));
|
||||||
|
langFilter.setSelected(true);
|
||||||
|
}
|
||||||
|
langFilterMenu=new PopupMenu(getContext(), langFilter);
|
||||||
|
langFilter.setOnTouchListener(langFilterMenu.getDragToOpenListener());
|
||||||
|
langFilter.setOnClickListener(v->langFilterMenu.show());
|
||||||
|
filtersWrap=view.findViewById(R.id.filters_container);
|
||||||
|
filtersScroll=view.findViewById(R.id.filters_scroll);
|
||||||
|
filtersWrap.addView(langFilter, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
||||||
|
FilterChipView speedFilter=new FilterChipView(getActivity());
|
||||||
|
speedFilter.setDrawableEnd(R.drawable.ic_baseline_arrow_drop_down_18);
|
||||||
|
speedFilterMenu=new PopupMenu(getContext(), speedFilter);
|
||||||
|
speedFilterMenu.getMenu().add(0, 0, 0, R.string.server_filter_any_signup_speed);
|
||||||
|
speedFilterMenu.getMenu().add(0, 1, 0, R.string.server_filter_instant_signup);
|
||||||
|
speedFilterMenu.getMenu().add(0, 2, 0, R.string.server_filter_manual_review);
|
||||||
|
speedFilter.setOnTouchListener(speedFilterMenu.getDragToOpenListener());
|
||||||
|
speedFilter.setOnClickListener(v->speedFilterMenu.show());
|
||||||
|
speedFilter.setText(switch(currentSignupSpeedFilter){
|
||||||
|
case ANY -> R.string.server_filter_any_signup_speed;
|
||||||
|
case INSTANT -> R.string.server_filter_instant_signup;
|
||||||
|
case REVIEWED -> R.string.server_filter_manual_review;
|
||||||
|
});
|
||||||
|
speedFilter.setSelected(currentSignupSpeedFilter!=SignupSpeedFilter.ANY);
|
||||||
|
filtersWrap.addView(speedFilter, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
||||||
|
speedFilterMenu.setOnMenuItemClickListener(item->{
|
||||||
|
speedFilter.setText(item.getTitle());
|
||||||
|
speedFilter.setSelected(item.getItemId()>0);
|
||||||
|
currentSignupSpeedFilter=SignupSpeedFilter.values()[item.getItemId()];
|
||||||
|
updateFilteredList();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
langFilterMenu.setOnMenuItemClickListener(item->{
|
||||||
|
langFilter.setText(item.getTitle());
|
||||||
|
langFilter.setSelected(item.getItemId()>0);
|
||||||
|
currentLanguage=item.getItemId()==0 ? null : languages.get(item.getItemId()-1);
|
||||||
|
updateFilteredList();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
View divider=new View(getActivity());
|
||||||
|
divider.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Outline));
|
||||||
|
filtersWrap.addView(divider, new LinearLayout.LayoutParams(V.dp(.5f), ViewGroup.LayoutParams.MATCH_PARENT));
|
||||||
|
|
||||||
|
categoryGeneral=new FilterChipView(getActivity());
|
||||||
|
categoryGeneral.setText(R.string.category_general);
|
||||||
|
categoryGeneral.setTag(CategoryChoice.GENERAL);
|
||||||
|
categoryGeneral.setOnClickListener(this::onCategoryFilterClick);
|
||||||
|
categoryGeneral.setSelected(categoryChoice==CategoryChoice.GENERAL);
|
||||||
|
filtersWrap.addView(categoryGeneral, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
categorySpecialInterests=new FilterChipView(getActivity());
|
||||||
|
categorySpecialInterests.setText(R.string.category_special_interests);
|
||||||
|
categorySpecialInterests.setTag(CategoryChoice.SPECIAL);
|
||||||
|
categorySpecialInterests.setOnClickListener(this::onCategoryFilterClick);
|
||||||
|
categorySpecialInterests.setSelected(categoryChoice==CategoryChoice.SPECIAL);
|
||||||
|
filtersWrap.addView(categorySpecialInterests, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
||||||
|
regionalFilters=Arrays.stream(CatalogInstance.Region.values()).map(r->{
|
||||||
|
FilterChipView fv=new FilterChipView(getActivity());
|
||||||
|
fv.setTag(r);
|
||||||
|
fv.setText(switch(r){
|
||||||
|
case EUROPE -> R.string.server_filter_region_europe;
|
||||||
|
case NORTH_AMERICA -> R.string.server_filter_region_north_america;
|
||||||
|
case SOUTH_AMERICA -> R.string.server_filter_region_south_america;
|
||||||
|
case AFRICA -> R.string.server_filter_region_africa;
|
||||||
|
case ASIA -> R.string.server_filter_region_asia;
|
||||||
|
case OCEANIA -> R.string.server_filter_region_oceania;
|
||||||
|
});
|
||||||
|
fv.setSelected(r==chosenRegion);
|
||||||
|
fv.setOnClickListener(this::onRegionFilterClick);
|
||||||
|
filtersWrap.addView(fv, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
return fv;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
focusThing=view.findViewById(R.id.focus_thing);
|
||||||
|
focusThing.requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onRegionFilterClick(View v){
|
||||||
|
CatalogInstance.Region r=(CatalogInstance.Region) v.getTag();
|
||||||
|
if(chosenRegion==r){
|
||||||
|
chosenRegion=null;
|
||||||
|
v.setSelected(false);
|
||||||
|
}else{
|
||||||
|
if(chosenRegion!=null)
|
||||||
|
filtersWrap.findViewWithTag(chosenRegion).setSelected(false);
|
||||||
|
chosenRegion=r;
|
||||||
|
v.setSelected(true);
|
||||||
|
}
|
||||||
|
updateFilteredList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onCategoryFilterClick(View v){
|
||||||
|
CategoryChoice c=(CategoryChoice) v.getTag();
|
||||||
|
if(categoryChoice==c){
|
||||||
|
categoryChoice=null;
|
||||||
|
v.setSelected(false);
|
||||||
|
}else{
|
||||||
|
if(categoryChoice!=null)
|
||||||
|
filtersWrap.findViewWithTag(categoryChoice).setSelected(false);
|
||||||
|
categoryChoice=c;
|
||||||
|
v.setSelected(true);
|
||||||
|
}
|
||||||
|
updateFilteredList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
protected void onNextClick(View v){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
if(chosenInstance==null){
|
||||||
view.findViewById(R.id.btn_back).setOnClickListener(v->Nav.finish(this));
|
String lang=Locale.getDefault().getLanguage();
|
||||||
list.setItemAnimator(new BetterItemAnimator());
|
List<CatalogInstance> instances=data.stream().filter(ci->!ci.approvalRequired && ("general".equals(ci.category) || (ci.categories!=null && ci.categories.contains("general"))) && (lang.equals(ci.language) || (ci.languages!=null && ci.languages.contains(lang)))).collect(Collectors.toList());
|
||||||
list.addItemDecoration(new DividerItemDecoration(getActivity(), R.attr.colorPollVoted, 1, 16, 16, DividerItemDecoration.NOT_FIRST));
|
if(instances.isEmpty()){
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLight));
|
instances=data.stream().filter(ci->!ci.approvalRequired && ("general".equals(ci.category) || (ci.categories!=null && ci.categories.contains("general")))).collect(Collectors.toList());
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLight));
|
}
|
||||||
|
if(instances.isEmpty()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
chosenInstance=instances.get(new Random().nextInt(instances.size()));
|
||||||
|
}
|
||||||
|
super.onNextClick(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void proceedWithAuthOrSignup(Instance instance){
|
protected void proceedWithAuthOrSignup(Instance instance){
|
||||||
getActivity().getSystemService(InputMethodManager.class).hideSoftInputFromWindow(contentView.getWindowToken(), 0);
|
getActivity().getSystemService(InputMethodManager.class).hideSoftInputFromWindow(contentView.getWindowToken(), 0);
|
||||||
if(isSignup){
|
if(!instance.registrations){
|
||||||
if(!instance.registrations){
|
new M3AlertDialogBuilder(getActivity())
|
||||||
new M3AlertDialogBuilder(getActivity())
|
.setTitle(R.string.error)
|
||||||
.setTitle(R.string.error)
|
.setMessage(R.string.instance_signup_closed)
|
||||||
.setMessage(R.string.instance_signup_closed)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.show();
|
||||||
.show();
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
Bundle args=new Bundle();
|
|
||||||
args.putParcelable("instance", Parcels.wrap(instance));
|
|
||||||
Nav.go(getActivity(), InstanceRulesFragment.class, args);
|
|
||||||
}else{
|
|
||||||
}
|
}
|
||||||
|
Bundle args=new Bundle();
|
||||||
|
args.putParcelable("instance", Parcels.wrap(instance));
|
||||||
|
Nav.go(getActivity(), InstanceRulesFragment.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private String getEmojiForCategory(String category){
|
// private String getEmojiForCategory(String category){
|
||||||
@@ -265,11 +489,29 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
protected void updateFilteredList(){
|
protected void updateFilteredList(){
|
||||||
ArrayList<CatalogInstance> prevData=new ArrayList<>(filteredData);
|
ArrayList<CatalogInstance> prevData=new ArrayList<>(filteredData);
|
||||||
filteredData.clear();
|
filteredData.clear();
|
||||||
for(CatalogInstance instance:data){
|
if(searchQueryMode){
|
||||||
if(currentCategory.equals("all") || instance.categories.contains(currentCategory)){
|
if(!TextUtils.isEmpty(currentSearchQuery)){
|
||||||
if(TextUtils.isEmpty(currentSearchQuery) || instance.domain.contains(currentSearchQuery)){
|
for(CatalogInstance instance:data){
|
||||||
if(instance.domain.equals(currentSearchQuery) || !isSignup || !instance.approvalRequired)
|
if(instance.domain.contains(currentSearchQuery)){
|
||||||
filteredData.add(instance);
|
filteredData.add(instance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
for(CatalogInstance instance:data){
|
||||||
|
if(categoryChoice==null || categoryChoice.matches(instance.category)){
|
||||||
|
if(chosenRegion==null || instance.region==chosenRegion){
|
||||||
|
boolean signupSpeedMatches=switch(currentSignupSpeedFilter){
|
||||||
|
case ANY -> true;
|
||||||
|
case INSTANT -> !instance.approvalRequired;
|
||||||
|
case REVIEWED -> instance.approvalRequired;
|
||||||
|
};
|
||||||
|
if(signupSpeedMatches){
|
||||||
|
if(currentLanguage==null || instance.languages.contains(currentLanguage)){
|
||||||
|
filteredData.add(instance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -296,8 +538,46 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
}).dispatchUpdatesTo(adapter);
|
}).dispatchUpdatesTo(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onApplyWindowInsets(WindowInsets insets){
|
||||||
|
topBar.setPadding(0, insets.getSystemWindowInsetTop(), 0, 0);
|
||||||
|
super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom()));
|
||||||
|
}
|
||||||
|
|
||||||
private class InstancesAdapter extends UsableRecyclerView.Adapter<InstanceCatalogSignupFragment.InstanceViewHolder>{
|
@Override
|
||||||
|
public boolean onBackPressed(){
|
||||||
|
if(searchQueryMode){
|
||||||
|
setSearchQueryMode(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setSearchQueryMode(boolean enabled){
|
||||||
|
searchQueryMode=enabled;
|
||||||
|
RelativeLayout.LayoutParams lp=(RelativeLayout.LayoutParams) searchEdit.getLayoutParams();
|
||||||
|
if(searchQueryMode){
|
||||||
|
filtersScroll.setVisibility(View.GONE);
|
||||||
|
lp.removeRule(RelativeLayout.END_OF);
|
||||||
|
backBtn.setScaleX(0.83333333f);
|
||||||
|
backBtn.setScaleY(0.83333333f);
|
||||||
|
backBtn.setTranslationX(V.dp(8));
|
||||||
|
searchEdit.setCompoundDrawableTintList(ColorStateList.valueOf(0));
|
||||||
|
}else{
|
||||||
|
filtersScroll.setVisibility(View.VISIBLE);
|
||||||
|
focusThing.requestFocus();
|
||||||
|
searchEdit.setText("");
|
||||||
|
lp.addRule(RelativeLayout.END_OF, R.id.btn_back);
|
||||||
|
getActivity().getSystemService(InputMethodManager.class).hideSoftInputFromWindow(searchEdit.getWindowToken(), 0);
|
||||||
|
backBtn.setScaleX(1);
|
||||||
|
backBtn.setScaleY(1);
|
||||||
|
backBtn.setTranslationX(0);
|
||||||
|
searchEdit.setCompoundDrawableTintList(ColorStateList.valueOf(UiUtils.getThemeColor(getActivity(), R.attr.colorM3OnSurfaceVariant)));
|
||||||
|
}
|
||||||
|
updateFilteredList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class InstancesAdapter extends UsableRecyclerView.Adapter<InstanceCatalogSignupFragment.InstanceViewHolder> implements ImageLoaderRecyclerAdapter{
|
||||||
public InstancesAdapter(){
|
public InstancesAdapter(){
|
||||||
super(imgLoader);
|
super(imgLoader);
|
||||||
}
|
}
|
||||||
@@ -323,32 +603,53 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
public int getItemViewType(int position){
|
public int getItemViewType(int position){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getImageCountForItem(int position){
|
||||||
|
return filteredData.get(position).thumbnailRequest!=null ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ImageLoaderRequest getImageRequest(int position, int image){
|
||||||
|
return filteredData.get(position).thumbnailRequest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class InstanceViewHolder extends BindableViewHolder<CatalogInstance> implements UsableRecyclerView.Clickable{
|
private class InstanceViewHolder extends BindableViewHolder<CatalogInstance> implements UsableRecyclerView.DisableableClickable, ImageLoaderViewHolder{
|
||||||
private final TextView title, description, userCount, lang;
|
private final TextView title, description;
|
||||||
private final RadioButton radioButton;
|
private final RadioButton radioButton;
|
||||||
|
private final ImageView thumbnail;
|
||||||
|
private boolean enabled;
|
||||||
|
|
||||||
public InstanceViewHolder(){
|
public InstanceViewHolder(){
|
||||||
super(getActivity(), R.layout.item_instance_catalog, list);
|
super(getActivity(), R.layout.item_instance_catalog, list);
|
||||||
title=findViewById(R.id.title);
|
title=findViewById(R.id.title);
|
||||||
description=findViewById(R.id.description);
|
description=findViewById(R.id.description);
|
||||||
userCount=findViewById(R.id.user_count);
|
|
||||||
lang=findViewById(R.id.lang);
|
|
||||||
radioButton=findViewById(R.id.radiobtn);
|
radioButton=findViewById(R.id.radiobtn);
|
||||||
if(Build.VERSION.SDK_INT<Build.VERSION_CODES.N){
|
thumbnail=findViewById(R.id.image);
|
||||||
UiUtils.fixCompoundDrawableTintOnAndroid6(userCount);
|
|
||||||
UiUtils.fixCompoundDrawableTintOnAndroid6(lang);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBind(CatalogInstance item){
|
public void onBind(CatalogInstance item){
|
||||||
title.setText(item.normalizedDomain);
|
title.setText(item.normalizedDomain);
|
||||||
description.setText(item.description);
|
|
||||||
userCount.setText(UiUtils.abbreviateNumber(item.totalUsers));
|
|
||||||
lang.setText(item.language.toUpperCase());
|
|
||||||
radioButton.setChecked(chosenInstance==item);
|
radioButton.setChecked(chosenInstance==item);
|
||||||
|
if(item.thumbnailRequest==null)
|
||||||
|
thumbnail.setImageDrawable(null);
|
||||||
|
Instance realInstance=instancesCache.get(item.normalizedDomain);
|
||||||
|
float alpha;
|
||||||
|
if(realInstance!=null && !realInstance.registrations){
|
||||||
|
alpha=0.38f;
|
||||||
|
description.setText(R.string.not_accepting_new_members);
|
||||||
|
enabled=false;
|
||||||
|
}else{
|
||||||
|
alpha=1f;
|
||||||
|
description.setText(item.description);
|
||||||
|
enabled=true;
|
||||||
|
}
|
||||||
|
title.setAlpha(alpha);
|
||||||
|
description.setAlpha(alpha);
|
||||||
|
radioButton.setAlpha(alpha);
|
||||||
|
thumbnail.setAlpha(alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -358,10 +659,17 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
if(chosenInstance!=null){
|
if(chosenInstance!=null){
|
||||||
int idx=filteredData.indexOf(chosenInstance);
|
int idx=filteredData.indexOf(chosenInstance);
|
||||||
if(idx!=-1){
|
if(idx!=-1){
|
||||||
RecyclerView.ViewHolder holder=list.findViewHolderForAdapterPosition(mergeAdapter.getPositionForAdapter(adapter)+idx);
|
boolean found=false;
|
||||||
if(holder instanceof InstanceCatalogSignupFragment.InstanceViewHolder ivh){
|
for(int i=0;i<list.getChildCount();i++){
|
||||||
ivh.radioButton.setChecked(false);
|
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
|
||||||
|
if(holder.getAbsoluteAdapterPosition()==mergeAdapter.getPositionForAdapter(adapter)+idx && holder instanceof InstanceViewHolder ivh){
|
||||||
|
ivh.radioButton.setChecked(false);
|
||||||
|
found=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if(!found)
|
||||||
|
adapter.notifyItemChanged(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
radioButton.setChecked(true);
|
radioButton.setChecked(true);
|
||||||
@@ -370,5 +678,36 @@ public class InstanceCatalogSignupFragment extends InstanceCatalogFragment{
|
|||||||
chosenInstance=item;
|
chosenInstance=item;
|
||||||
loadInstanceInfo(chosenInstance.domain, false);
|
loadInstanceInfo(chosenInstance.domain, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setImage(int index, Drawable image){
|
||||||
|
thumbnail.setImageDrawable(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearImage(int index){
|
||||||
|
setImage(index, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled(){
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum SignupSpeedFilter{
|
||||||
|
ANY,
|
||||||
|
INSTANT,
|
||||||
|
REVIEWED
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum CategoryChoice{
|
||||||
|
GENERAL,
|
||||||
|
SPECIAL;
|
||||||
|
|
||||||
|
public boolean matches(String category){
|
||||||
|
boolean isGeneral=(category==null || "general".equals(category));
|
||||||
|
return (this==GENERAL)==isGeneral;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.joinmastodon.android.fragments.onboarding;
|
package org.joinmastodon.android.fragments.onboarding;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -22,14 +23,14 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import me.grishka.appkit.Nav;
|
import me.grishka.appkit.Nav;
|
||||||
import me.grishka.appkit.fragments.AppKitFragment;
|
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||||
import me.grishka.appkit.utils.BindableViewHolder;
|
import me.grishka.appkit.utils.BindableViewHolder;
|
||||||
import me.grishka.appkit.utils.MergeRecyclerAdapter;
|
import me.grishka.appkit.utils.MergeRecyclerAdapter;
|
||||||
import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
import me.grishka.appkit.views.UsableRecyclerView;
|
import me.grishka.appkit.views.UsableRecyclerView;
|
||||||
|
|
||||||
public class InstanceRulesFragment extends AppKitFragment{
|
public class InstanceRulesFragment extends ToolbarFragment{
|
||||||
private UsableRecyclerView list;
|
private UsableRecyclerView list;
|
||||||
private MergeRecyclerAdapter adapter;
|
private MergeRecyclerAdapter adapter;
|
||||||
private Button btn;
|
private Button btn;
|
||||||
@@ -47,31 +48,28 @@ public class InstanceRulesFragment extends AppKitFragment{
|
|||||||
super.onAttach(activity);
|
super.onAttach(activity);
|
||||||
setNavigationBarColor(UiUtils.getThemeColor(activity, R.attr.colorWindowBackground));
|
setNavigationBarColor(UiUtils.getThemeColor(activity, R.attr.colorWindowBackground));
|
||||||
instance=Parcels.unwrap(getArguments().getParcelable("instance"));
|
instance=Parcels.unwrap(getArguments().getParcelable("instance"));
|
||||||
|
setTitle(R.string.instance_rules_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||||
View view=inflater.inflate(R.layout.fragment_onboarding_rules, container, false);
|
View view=inflater.inflate(R.layout.fragment_onboarding_rules, container, false);
|
||||||
|
|
||||||
list=view.findViewById(R.id.list);
|
list=view.findViewById(R.id.list);
|
||||||
list.setLayoutManager(new LinearLayoutManager(getActivity()));
|
list.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
View headerView=inflater.inflate(R.layout.item_list_header, list, false);
|
View headerView=inflater.inflate(R.layout.item_list_header_simple, list, false);
|
||||||
TextView title=headerView.findViewById(R.id.title);
|
TextView text=headerView.findViewById(R.id.text);
|
||||||
TextView subtitle=headerView.findViewById(R.id.subtitle);
|
text.setText(getString(R.string.instance_rules_subtitle, instance.uri));
|
||||||
headerView.findViewById(R.id.step_counter).setVisibility(View.GONE);
|
|
||||||
title.setText(R.string.instance_rules_title);
|
|
||||||
subtitle.setText(getString(R.string.instance_rules_subtitle, instance.uri));
|
|
||||||
|
|
||||||
adapter=new MergeRecyclerAdapter();
|
adapter=new MergeRecyclerAdapter();
|
||||||
adapter.addAdapter(new SingleViewRecyclerAdapter(headerView));
|
adapter.addAdapter(new SingleViewRecyclerAdapter(headerView));
|
||||||
adapter.addAdapter(new ItemsAdapter());
|
adapter.addAdapter(new ItemsAdapter());
|
||||||
list.setAdapter(adapter);
|
list.setAdapter(adapter);
|
||||||
list.addItemDecoration(new DividerItemDecoration(getActivity(), R.attr.colorPollVoted, 1, 16, 16, DividerItemDecoration.NOT_FIRST));
|
list.addItemDecoration(new DividerItemDecoration(getActivity(), R.attr.colorM3SurfaceVariant, 1, 56, 0, DividerItemDecoration.NOT_FIRST));
|
||||||
|
|
||||||
btn=view.findViewById(R.id.btn_next);
|
btn=view.findViewById(R.id.btn_next);
|
||||||
btn.setOnClickListener(v->onButtonClick());
|
btn.setOnClickListener(v->onButtonClick());
|
||||||
buttonBar=view.findViewById(R.id.button_bar);
|
buttonBar=view.findViewById(R.id.button_bar);
|
||||||
view.findViewById(R.id.btn_back).setOnClickListener(v->Nav.finish(this));
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
@@ -79,7 +77,15 @@ public class InstanceRulesFragment extends AppKitFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLight));
|
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onUpdateToolbar(){
|
||||||
|
super.onUpdateToolbar();
|
||||||
|
getToolbar().setBackground(null);
|
||||||
|
getToolbar().setElevation(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onButtonClick(){
|
protected void onButtonClick(){
|
||||||
@@ -119,23 +125,22 @@ public class InstanceRulesFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class ItemViewHolder extends BindableViewHolder<Instance.Rule>{
|
private class ItemViewHolder extends BindableViewHolder<Instance.Rule>{
|
||||||
private final TextView title, subtitle;
|
private final TextView text, number;
|
||||||
private final ImageView checkbox;
|
|
||||||
|
|
||||||
public ItemViewHolder(){
|
public ItemViewHolder(){
|
||||||
super(getActivity(), R.layout.item_report_choice, list);
|
super(getActivity(), R.layout.item_server_rule, list);
|
||||||
title=findViewById(R.id.title);
|
text=findViewById(R.id.text);
|
||||||
subtitle=findViewById(R.id.subtitle);
|
number=findViewById(R.id.number);
|
||||||
checkbox=findViewById(R.id.checkbox);
|
|
||||||
subtitle.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DefaultLocale")
|
||||||
@Override
|
@Override
|
||||||
public void onBind(Instance.Rule item){
|
public void onBind(Instance.Rule item){
|
||||||
if(item.parsedText==null){
|
if(item.parsedText==null){
|
||||||
item.parsedText=HtmlParser.parseLinks(item.text);
|
item.parsedText=HtmlParser.parseLinks(item.text);
|
||||||
}
|
}
|
||||||
title.setText(item.parsedText);
|
text.setText(item.parsedText);
|
||||||
|
number.setText(String.format("%d", getAbsoluteAdapterPosition()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,14 +25,15 @@ import org.joinmastodon.android.api.MastodonDetailedErrorResponse;
|
|||||||
import org.joinmastodon.android.api.requests.accounts.RegisterAccount;
|
import org.joinmastodon.android.api.requests.accounts.RegisterAccount;
|
||||||
import org.joinmastodon.android.api.requests.oauth.CreateOAuthApp;
|
import org.joinmastodon.android.api.requests.oauth.CreateOAuthApp;
|
||||||
import org.joinmastodon.android.api.requests.oauth.GetOauthToken;
|
import org.joinmastodon.android.api.requests.oauth.GetOauthToken;
|
||||||
|
import org.joinmastodon.android.api.session.AccountActivationInfo;
|
||||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
import org.joinmastodon.android.api.session.AccountSessionManager;
|
||||||
import org.joinmastodon.android.model.Account;
|
import org.joinmastodon.android.model.Account;
|
||||||
import org.joinmastodon.android.model.Application;
|
import org.joinmastodon.android.model.Application;
|
||||||
import org.joinmastodon.android.model.Instance;
|
import org.joinmastodon.android.model.Instance;
|
||||||
import org.joinmastodon.android.model.Token;
|
import org.joinmastodon.android.model.Token;
|
||||||
import org.joinmastodon.android.ui.OutlineProviders;
|
|
||||||
import org.joinmastodon.android.ui.utils.SimpleTextWatcher;
|
import org.joinmastodon.android.ui.utils.SimpleTextWatcher;
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
import org.joinmastodon.android.ui.views.FloatingHintEditTextLayout;
|
||||||
import org.parceler.Parcels;
|
import org.parceler.Parcels;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -49,30 +50,28 @@ import me.grishka.appkit.Nav;
|
|||||||
import me.grishka.appkit.api.APIRequest;
|
import me.grishka.appkit.api.APIRequest;
|
||||||
import me.grishka.appkit.api.Callback;
|
import me.grishka.appkit.api.Callback;
|
||||||
import me.grishka.appkit.api.ErrorResponse;
|
import me.grishka.appkit.api.ErrorResponse;
|
||||||
import me.grishka.appkit.fragments.AppKitFragment;
|
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||||
import me.grishka.appkit.imageloader.ViewImageLoader;
|
import me.grishka.appkit.imageloader.ViewImageLoader;
|
||||||
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
public class SignupFragment extends AppKitFragment{
|
public class SignupFragment extends ToolbarFragment{
|
||||||
private static final int AVATAR_RESULT=198;
|
private static final int AVATAR_RESULT=198;
|
||||||
private static final String TAG="SignupFragment";
|
private static final String TAG="SignupFragment";
|
||||||
|
|
||||||
private Instance instance;
|
private Instance instance;
|
||||||
|
|
||||||
private EditText displayName, username, email, password, reason;
|
private EditText displayName, username, email, password, passwordConfirm, reason;
|
||||||
|
private FloatingHintEditTextLayout displayNameWrap, usernameWrap, emailWrap, passwordWrap, passwordConfirmWrap, reasonWrap;
|
||||||
private TextView reasonExplain;
|
private TextView reasonExplain;
|
||||||
private Button btn;
|
private Button btn;
|
||||||
private View buttonBar;
|
private View buttonBar;
|
||||||
private TextWatcher buttonStateUpdater=new SimpleTextWatcher(e->updateButtonState());
|
private TextWatcher buttonStateUpdater=new SimpleTextWatcher(e->updateButtonState());
|
||||||
private ImageView avatar;
|
|
||||||
private APIRequest currentBackgroundRequest;
|
private APIRequest currentBackgroundRequest;
|
||||||
private Application apiApplication;
|
private Application apiApplication;
|
||||||
private Token apiToken;
|
private Token apiToken;
|
||||||
private boolean submitAfterGettingToken;
|
private boolean submitAfterGettingToken;
|
||||||
private ProgressDialog progressDialog;
|
private ProgressDialog progressDialog;
|
||||||
private Uri avatarUri;
|
|
||||||
private File avatarFile;
|
|
||||||
private HashSet<EditText> errorFields=new HashSet<>();
|
private HashSet<EditText> errorFields=new HashSet<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -81,25 +80,30 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
setRetainInstance(true);
|
setRetainInstance(true);
|
||||||
instance=Parcels.unwrap(getArguments().getParcelable("instance"));
|
instance=Parcels.unwrap(getArguments().getParcelable("instance"));
|
||||||
createAppAndGetToken();
|
createAppAndGetToken();
|
||||||
|
setTitle(R.string.signup_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState){
|
public View onCreateContentView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState){
|
||||||
View view=inflater.inflate(R.layout.fragment_onboarding_signup, container, false);
|
View view=inflater.inflate(R.layout.fragment_onboarding_signup, container, false);
|
||||||
|
|
||||||
TextView title=view.findViewById(R.id.title);
|
|
||||||
TextView domain=view.findViewById(R.id.domain);
|
TextView domain=view.findViewById(R.id.domain);
|
||||||
displayName=view.findViewById(R.id.display_name);
|
displayName=view.findViewById(R.id.display_name);
|
||||||
username=view.findViewById(R.id.username);
|
username=view.findViewById(R.id.username);
|
||||||
email=view.findViewById(R.id.email);
|
email=view.findViewById(R.id.email);
|
||||||
password=view.findViewById(R.id.password);
|
password=view.findViewById(R.id.password);
|
||||||
avatar=view.findViewById(R.id.avatar);
|
passwordConfirm=view.findViewById(R.id.password_confirm);
|
||||||
reason=view.findViewById(R.id.reason);
|
reason=view.findViewById(R.id.reason);
|
||||||
reasonExplain=view.findViewById(R.id.reason_explain);
|
reasonExplain=view.findViewById(R.id.reason_explain);
|
||||||
View avaWrap=view.findViewById(R.id.ava_wrap);
|
|
||||||
|
|
||||||
title.setText(getString(R.string.signup_title, instance.uri));
|
displayNameWrap=view.findViewById(R.id.display_name_wrap);
|
||||||
|
usernameWrap=view.findViewById(R.id.username_wrap);
|
||||||
|
emailWrap=view.findViewById(R.id.email_wrap);
|
||||||
|
passwordWrap=view.findViewById(R.id.password_wrap);
|
||||||
|
passwordConfirmWrap=view.findViewById(R.id.password_confirm_wrap);
|
||||||
|
reasonWrap=view.findViewById(R.id.reason_wrap);
|
||||||
|
|
||||||
domain.setText('@'+instance.uri);
|
domain.setText('@'+instance.uri);
|
||||||
|
|
||||||
username.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
|
username.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
|
||||||
@@ -114,23 +118,20 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
btn=view.findViewById(R.id.btn_next);
|
btn=view.findViewById(R.id.btn_next);
|
||||||
btn.setOnClickListener(v->onButtonClick());
|
btn.setOnClickListener(v->onButtonClick());
|
||||||
buttonBar=view.findViewById(R.id.button_bar);
|
buttonBar=view.findViewById(R.id.button_bar);
|
||||||
view.findViewById(R.id.btn_back).setOnClickListener(v->Nav.finish(this));
|
|
||||||
updateButtonState();
|
updateButtonState();
|
||||||
|
|
||||||
username.addTextChangedListener(buttonStateUpdater);
|
username.addTextChangedListener(buttonStateUpdater);
|
||||||
email.addTextChangedListener(buttonStateUpdater);
|
email.addTextChangedListener(buttonStateUpdater);
|
||||||
password.addTextChangedListener(buttonStateUpdater);
|
password.addTextChangedListener(buttonStateUpdater);
|
||||||
|
passwordConfirm.addTextChangedListener(buttonStateUpdater);
|
||||||
reason.addTextChangedListener(buttonStateUpdater);
|
reason.addTextChangedListener(buttonStateUpdater);
|
||||||
|
|
||||||
username.addTextChangedListener(new ErrorClearingListener(username));
|
username.addTextChangedListener(new ErrorClearingListener(username));
|
||||||
email.addTextChangedListener(new ErrorClearingListener(email));
|
email.addTextChangedListener(new ErrorClearingListener(email));
|
||||||
password.addTextChangedListener(new ErrorClearingListener(password));
|
password.addTextChangedListener(new ErrorClearingListener(password));
|
||||||
|
passwordConfirm.addTextChangedListener(new ErrorClearingListener(passwordConfirm));
|
||||||
reason.addTextChangedListener(new ErrorClearingListener(reason));
|
reason.addTextChangedListener(new ErrorClearingListener(reason));
|
||||||
|
|
||||||
avaWrap.setOutlineProvider(OutlineProviders.roundedRect(22));
|
|
||||||
avaWrap.setClipToOutline(true);
|
|
||||||
avaWrap.setOnClickListener(v->onAvatarClick());
|
|
||||||
|
|
||||||
if(!instance.approvalRequired){
|
if(!instance.approvalRequired){
|
||||||
reason.setVisibility(View.GONE);
|
reason.setVisibility(View.GONE);
|
||||||
reasonExplain.setVisibility(View.GONE);
|
reasonExplain.setVisibility(View.GONE);
|
||||||
@@ -142,10 +143,23 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLight));
|
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onUpdateToolbar(){
|
||||||
|
super.onUpdateToolbar();
|
||||||
|
getToolbar().setBackground(null);
|
||||||
|
getToolbar().setElevation(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onButtonClick(){
|
private void onButtonClick(){
|
||||||
|
if(!password.getText().equals(passwordConfirm.getText())){
|
||||||
|
passwordConfirm.setError(getString(R.string.signup_passwords_dont_match));
|
||||||
|
passwordConfirmWrap.setErrorState();
|
||||||
|
return;
|
||||||
|
}
|
||||||
showProgressDialog();
|
showProgressDialog();
|
||||||
if(currentBackgroundRequest!=null){
|
if(currentBackgroundRequest!=null){
|
||||||
submitAfterGettingToken=true;
|
submitAfterGettingToken=true;
|
||||||
@@ -160,32 +174,8 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyAvatar(Runnable onDone){
|
|
||||||
// Need to copy the avatar from the content provider to somewhere accessible in case the app gets killed between signup and account activation
|
|
||||||
Activity activity=getActivity();
|
|
||||||
MastodonAPIController.runInBackground(()->{
|
|
||||||
String origName=UiUtils.getFileName(avatarUri);
|
|
||||||
avatarFile=new File(activity.getCacheDir(), System.currentTimeMillis()+origName.substring(origName.lastIndexOf('.')));
|
|
||||||
try(InputStream in=activity.getContentResolver().openInputStream(avatarUri);
|
|
||||||
FileOutputStream out=new FileOutputStream(avatarFile)){
|
|
||||||
byte[] buf=new byte[10240];
|
|
||||||
int read;
|
|
||||||
while((read=in.read(buf))>0){
|
|
||||||
out.write(buf, 0, read);
|
|
||||||
}
|
|
||||||
}catch(IOException x){
|
|
||||||
Log.w(TAG, "copyAvatar: error copying", x);
|
|
||||||
}
|
|
||||||
activity.runOnUiThread(onDone);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void submit(){
|
private void submit(){
|
||||||
if(avatarUri!=null && (avatarFile==null || !avatarFile.exists())){
|
actuallySubmit();
|
||||||
copyAvatar(this::actuallySubmit);
|
|
||||||
}else{
|
|
||||||
actuallySubmit();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void actuallySubmit(){
|
private void actuallySubmit(){
|
||||||
@@ -204,9 +194,7 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
fakeAccount.acct=fakeAccount.username=username;
|
fakeAccount.acct=fakeAccount.username=username;
|
||||||
fakeAccount.id="tmp"+System.currentTimeMillis();
|
fakeAccount.id="tmp"+System.currentTimeMillis();
|
||||||
fakeAccount.displayName=displayName.getText().toString();
|
fakeAccount.displayName=displayName.getText().toString();
|
||||||
if(avatarFile!=null)
|
AccountSessionManager.getInstance().addAccount(instance, result, fakeAccount, apiApplication, new AccountActivationInfo(email, System.currentTimeMillis()));
|
||||||
fakeAccount.avatar=avatarFile.getAbsolutePath();
|
|
||||||
AccountSessionManager.getInstance().addAccount(instance, result, fakeAccount, apiApplication, false);
|
|
||||||
Bundle args=new Bundle();
|
Bundle args=new Bundle();
|
||||||
args.putString("account", AccountSessionManager.getInstance().getLastActiveAccountID());
|
args.putString("account", AccountSessionManager.getInstance().getLastActiveAccountID());
|
||||||
Nav.goClearingStack(getActivity(), AccountActivationFragment.class, args);
|
Nav.goClearingStack(getActivity(), AccountActivationFragment.class, args);
|
||||||
@@ -225,6 +213,7 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
field.setError(fieldErrors.get(fieldName).stream().map(err->err.description).collect(Collectors.joining("\n")));
|
field.setError(fieldErrors.get(fieldName).stream().map(err->err.description).collect(Collectors.joining("\n")));
|
||||||
|
getFieldWrapByName(fieldName).setErrorState();
|
||||||
errorFields.add(field);
|
errorFields.add(field);
|
||||||
if(first){
|
if(first){
|
||||||
first=false;
|
first=false;
|
||||||
@@ -252,6 +241,16 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private FloatingHintEditTextLayout getFieldWrapByName(String name){
|
||||||
|
return switch(name){
|
||||||
|
case "email" -> emailWrap;
|
||||||
|
case "username" -> usernameWrap;
|
||||||
|
case "password" -> passwordWrap;
|
||||||
|
case "reason" -> reasonWrap;
|
||||||
|
default -> null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private void showProgressDialog(){
|
private void showProgressDialog(){
|
||||||
if(progressDialog==null){
|
if(progressDialog==null){
|
||||||
progressDialog=new ProgressDialog(getActivity());
|
progressDialog=new ProgressDialog(getActivity());
|
||||||
@@ -262,7 +261,7 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtonState(){
|
private void updateButtonState(){
|
||||||
btn.setEnabled(username.length()>0 && email.length()>0 && email.getText().toString().contains("@") && password.length()>=8 && (!instance.approvalRequired || reason.length()>0));
|
btn.setEnabled(username.length()>0 && email.length()>0 && email.getText().toString().contains("@") && password.length()>=8 && passwordConfirm.length()>=8 && (!instance.approvalRequired || reason.length()>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAppAndGetToken(){
|
private void createAppAndGetToken(){
|
||||||
@@ -324,20 +323,6 @@ public class SignupFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data){
|
|
||||||
if(requestCode==AVATAR_RESULT && resultCode==Activity.RESULT_OK){
|
|
||||||
avatarUri=data.getData();
|
|
||||||
if(avatarFile!=null && avatarFile.exists())
|
|
||||||
avatarFile.delete();
|
|
||||||
ViewImageLoader.load(avatar, getResources().getDrawable(R.drawable.default_avatar), new UrlImageLoaderRequest(avatarUri, V.dp(100), V.dp(100)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onAvatarClick(){
|
|
||||||
startActivityForResult(new Intent(Intent.ACTION_GET_CONTENT).setType("image/*").addCategory(Intent.CATEGORY_OPENABLE), AVATAR_RESULT);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class ErrorClearingListener implements TextWatcher{
|
private class ErrorClearingListener implements TextWatcher{
|
||||||
public final EditText editText;
|
public final EditText editText;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.joinmastodon.android.model.catalog;
|
package org.joinmastodon.android.model.catalog;
|
||||||
|
|
||||||
|
import android.graphics.Region;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import org.joinmastodon.android.api.AllFieldsAreRequired;
|
import org.joinmastodon.android.api.AllFieldsAreRequired;
|
||||||
import org.joinmastodon.android.api.ObjectValidationException;
|
import org.joinmastodon.android.api.ObjectValidationException;
|
||||||
import org.joinmastodon.android.model.BaseModel;
|
import org.joinmastodon.android.model.BaseModel;
|
||||||
@@ -7,13 +12,17 @@ import org.joinmastodon.android.model.BaseModel;
|
|||||||
import java.net.IDN;
|
import java.net.IDN;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
||||||
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
@AllFieldsAreRequired
|
@AllFieldsAreRequired
|
||||||
public class CatalogInstance extends BaseModel{
|
public class CatalogInstance extends BaseModel{
|
||||||
public String domain;
|
public String domain;
|
||||||
public String version;
|
public String version;
|
||||||
public String description;
|
public String description;
|
||||||
public List<String> languages;
|
public List<String> languages;
|
||||||
public String region;
|
@SerializedName("region")
|
||||||
|
private String _region;
|
||||||
public List<String> categories;
|
public List<String> categories;
|
||||||
public String proxiedThumbnail;
|
public String proxiedThumbnail;
|
||||||
public int totalUsers;
|
public int totalUsers;
|
||||||
@@ -22,7 +31,9 @@ public class CatalogInstance extends BaseModel{
|
|||||||
public String language;
|
public String language;
|
||||||
public String category;
|
public String category;
|
||||||
|
|
||||||
|
public transient Region region;
|
||||||
public transient String normalizedDomain;
|
public transient String normalizedDomain;
|
||||||
|
public transient UrlImageLoaderRequest thumbnailRequest;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postprocess() throws ObjectValidationException{
|
public void postprocess() throws ObjectValidationException{
|
||||||
@@ -31,6 +42,14 @@ public class CatalogInstance extends BaseModel{
|
|||||||
normalizedDomain=IDN.toUnicode(domain);
|
normalizedDomain=IDN.toUnicode(domain);
|
||||||
else
|
else
|
||||||
normalizedDomain=domain;
|
normalizedDomain=domain;
|
||||||
|
if(!TextUtils.isEmpty(_region)){
|
||||||
|
try{
|
||||||
|
region=Region.valueOf(_region.toUpperCase());
|
||||||
|
}catch(IllegalArgumentException ignore){}
|
||||||
|
}
|
||||||
|
if(!TextUtils.isEmpty(proxiedThumbnail)){
|
||||||
|
thumbnailRequest=new UrlImageLoaderRequest(proxiedThumbnail, 0, V.dp(56));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -50,4 +69,13 @@ public class CatalogInstance extends BaseModel{
|
|||||||
", category='"+category+'\''+
|
", category='"+category+'\''+
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum Region{
|
||||||
|
EUROPE,
|
||||||
|
NORTH_AMERICA,
|
||||||
|
SOUTH_AMERICA,
|
||||||
|
AFRICA,
|
||||||
|
ASIA,
|
||||||
|
OCEANIA
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import org.joinmastodon.android.R;
|
|||||||
import org.joinmastodon.android.api.requests.oauth.RevokeOauthToken;
|
import org.joinmastodon.android.api.requests.oauth.RevokeOauthToken;
|
||||||
import org.joinmastodon.android.api.session.AccountSession;
|
import org.joinmastodon.android.api.session.AccountSession;
|
||||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
import org.joinmastodon.android.api.session.AccountSessionManager;
|
||||||
import org.joinmastodon.android.fragments.onboarding.MegalodonLoginFragment;
|
import org.joinmastodon.android.fragments.onboarding.CustomWelcomeFragment;
|
||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -77,7 +77,7 @@ public class AccountSwitcherSheet extends BottomSheet{
|
|||||||
holder.avatar.setImageResource(R.drawable.ic_fluent_add_circle_24_filled);
|
holder.avatar.setImageResource(R.drawable.ic_fluent_add_circle_24_filled);
|
||||||
holder.avatar.setImageTintList(ColorStateList.valueOf(UiUtils.getThemeColor(activity, android.R.attr.textColorPrimary)));
|
holder.avatar.setImageTintList(ColorStateList.valueOf(UiUtils.getThemeColor(activity, android.R.attr.textColorPrimary)));
|
||||||
adapter.addAdapter(new ClickableSingleViewRecyclerAdapter(holder.itemView, ()->{
|
adapter.addAdapter(new ClickableSingleViewRecyclerAdapter(holder.itemView, ()->{
|
||||||
Nav.go(activity, MegalodonLoginFragment.class, null);
|
Nav.go(activity, CustomWelcomeFragment.class, null);
|
||||||
dismiss();
|
dismiss();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -240,7 +240,10 @@ public class AccountSwitcherSheet extends BottomSheet{
|
|||||||
|
|
||||||
public WrappedAccount(AccountSession session){
|
public WrappedAccount(AccountSession session){
|
||||||
this.session=session;
|
this.session=session;
|
||||||
req=new UrlImageLoaderRequest(GlobalUserPreferences.playGifs ? session.self.avatar : session.self.avatarStatic, V.dp(50), V.dp(50));
|
if(session.self.avatar!=null)
|
||||||
|
req=new UrlImageLoaderRequest(GlobalUserPreferences.playGifs ? session.self.avatar : session.self.avatarStatic, V.dp(50), V.dp(50));
|
||||||
|
else
|
||||||
|
req=null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import android.widget.ImageView;
|
|||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
import org.joinmastodon.android.fragments.BaseStatusListFragment;
|
import org.joinmastodon.android.fragments.BaseStatusListFragment;
|
||||||
import org.joinmastodon.android.model.Account;
|
import org.joinmastodon.android.model.Account;
|
||||||
@@ -23,7 +25,9 @@ import org.joinmastodon.android.ui.utils.CustomEmojiHelper;
|
|||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
import org.joinmastodon.android.ui.views.ProgressBarButton;
|
import org.joinmastodon.android.ui.views.ProgressBarButton;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import me.grishka.appkit.imageloader.ImageLoaderViewHolder;
|
import me.grishka.appkit.imageloader.ImageLoaderViewHolder;
|
||||||
import me.grishka.appkit.imageloader.requests.ImageLoaderRequest;
|
import me.grishka.appkit.imageloader.requests.ImageLoaderRequest;
|
||||||
@@ -154,10 +158,18 @@ public class AccountCardStatusDisplayItem extends StatusDisplayItem{
|
|||||||
|
|
||||||
private void onFollowRequestButtonClick(View v) {
|
private void onFollowRequestButtonClick(View v) {
|
||||||
itemView.setHasTransientState(true);
|
itemView.setHasTransientState(true);
|
||||||
UiUtils.handleFollowRequest((Activity) v.getContext(), item.account, item.parentFragment.getAccountID(), item.notification.id , v == acceptButton, relationship, rel -> {
|
UiUtils.handleFollowRequest((Activity) v.getContext(), item.account, item.parentFragment.getAccountID(), null, v == acceptButton, relationship, rel -> {
|
||||||
itemView.setHasTransientState(false);
|
itemView.setHasTransientState(false);
|
||||||
item.parentFragment.putRelationship(item.account.id, rel);
|
item.parentFragment.putRelationship(item.account.id, rel);
|
||||||
rebind();
|
RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter();
|
||||||
|
if (!rel.requested && !rel.followedBy && adapter != null) {
|
||||||
|
int index = item.parentFragment.getDisplayItems().indexOf(item);
|
||||||
|
item.parentFragment.getDisplayItems().remove(index);
|
||||||
|
item.parentFragment.getDisplayItems().remove(index - 1);
|
||||||
|
adapter.notifyItemRangeRemoved(getLayoutPosition()-1, 2);
|
||||||
|
} else {
|
||||||
|
rebind();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ import android.app.Activity;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.accessibility.AccessibilityNodeInfo;
|
import android.view.accessibility.AccessibilityNodeInfo;
|
||||||
|
import android.view.animation.AlphaAnimation;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.view.animation.AnimationSet;
|
||||||
|
import android.view.animation.ScaleAnimation;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -21,10 +26,8 @@ import org.joinmastodon.android.model.StatusPrivacy;
|
|||||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
import org.parceler.Parcels;
|
import org.parceler.Parcels;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
|
|
||||||
import me.grishka.appkit.Nav;
|
import me.grishka.appkit.Nav;
|
||||||
import me.grishka.appkit.utils.BindableViewHolder;
|
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
public class FooterStatusDisplayItem extends StatusDisplayItem{
|
public class FooterStatusDisplayItem extends StatusDisplayItem{
|
||||||
@@ -46,6 +49,7 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
|||||||
public static class Holder extends StatusDisplayItem.Holder<FooterStatusDisplayItem>{
|
public static class Holder extends StatusDisplayItem.Holder<FooterStatusDisplayItem>{
|
||||||
private final TextView reply, boost, favorite, bookmark;
|
private final TextView reply, boost, favorite, bookmark;
|
||||||
private final ImageView share;
|
private final ImageView share;
|
||||||
|
private static final Animation opacityOut, opacityIn;
|
||||||
|
|
||||||
private final View.AccessibilityDelegate buttonAccessibilityDelegate=new View.AccessibilityDelegate(){
|
private final View.AccessibilityDelegate buttonAccessibilityDelegate=new View.AccessibilityDelegate(){
|
||||||
@Override
|
@Override
|
||||||
@@ -56,6 +60,16 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static {
|
||||||
|
opacityOut = new AlphaAnimation(1, 0.5f);
|
||||||
|
opacityOut.setDuration(200);
|
||||||
|
opacityOut.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
||||||
|
opacityOut.setFillAfter(true);
|
||||||
|
opacityIn = new AlphaAnimation(0.5f, 1);
|
||||||
|
opacityIn.setDuration(150);
|
||||||
|
opacityIn.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
public Holder(Activity activity, ViewGroup parent){
|
public Holder(Activity activity, ViewGroup parent){
|
||||||
super(activity, R.layout.display_item_footer, parent);
|
super(activity, R.layout.display_item_footer, parent);
|
||||||
reply=findViewById(R.id.reply);
|
reply=findViewById(R.id.reply);
|
||||||
@@ -74,14 +88,19 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
|||||||
View favorite=findViewById(R.id.favorite_btn);
|
View favorite=findViewById(R.id.favorite_btn);
|
||||||
View share=findViewById(R.id.share_btn);
|
View share=findViewById(R.id.share_btn);
|
||||||
View bookmark=findViewById(R.id.bookmark_btn);
|
View bookmark=findViewById(R.id.bookmark_btn);
|
||||||
|
reply.setOnTouchListener(this::onButtonTouch);
|
||||||
reply.setOnClickListener(this::onReplyClick);
|
reply.setOnClickListener(this::onReplyClick);
|
||||||
reply.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
reply.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||||
|
boost.setOnTouchListener(this::onButtonTouch);
|
||||||
boost.setOnClickListener(this::onBoostClick);
|
boost.setOnClickListener(this::onBoostClick);
|
||||||
boost.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
boost.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||||
|
favorite.setOnTouchListener(this::onButtonTouch);
|
||||||
favorite.setOnClickListener(this::onFavoriteClick);
|
favorite.setOnClickListener(this::onFavoriteClick);
|
||||||
favorite.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
favorite.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||||
|
bookmark.setOnTouchListener(this::onButtonTouch);
|
||||||
bookmark.setOnClickListener(this::onBookmarkClick);
|
bookmark.setOnClickListener(this::onBookmarkClick);
|
||||||
bookmark.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
bookmark.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||||
|
share.setOnTouchListener(this::onButtonTouch);
|
||||||
share.setOnClickListener(this::onShareClick);
|
share.setOnClickListener(this::onShareClick);
|
||||||
share.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
share.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||||
}
|
}
|
||||||
@@ -115,21 +134,43 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
|||||||
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
|
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean onButtonTouch(View v, MotionEvent event){
|
||||||
|
int action = event.getAction();
|
||||||
|
// 20dp to center in middle of icon, because: (icon width = 24dp) / 2 + (paddingStart = 8dp)
|
||||||
|
v.setPivotX(V.dp(20));
|
||||||
|
if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
|
||||||
|
v.animate().scaleX(1).scaleY(1).setInterpolator(CubicBezierInterpolator.DEFAULT).setDuration(100).start();
|
||||||
|
if (action == MotionEvent.ACTION_UP) v.performClick();
|
||||||
|
} else if (action == MotionEvent.ACTION_DOWN) {
|
||||||
|
v.animate().scaleX(0.85f).scaleY(0.85f).setInterpolator(CubicBezierInterpolator.DEFAULT).setDuration(50).start();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void onBoostClick(View v){
|
private void onBoostClick(View v){
|
||||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setReblogged(item.status, !item.status.reblogged);
|
v.startAnimation(opacityOut);
|
||||||
boost.setSelected(item.status.reblogged);
|
boost.setSelected(!item.status.reblogged);
|
||||||
bindButton(boost, item.status.reblogsCount);
|
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setReblogged(item.status, !item.status.reblogged, r->{
|
||||||
|
v.startAnimation(opacityIn);
|
||||||
|
bindButton(boost, r.reblogsCount);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onFavoriteClick(View v){
|
private void onFavoriteClick(View v){
|
||||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited);
|
v.startAnimation(opacityOut);
|
||||||
favorite.setSelected(item.status.favourited);
|
favorite.setSelected(!item.status.favourited);
|
||||||
bindButton(favorite, item.status.favouritesCount);
|
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited, r->{
|
||||||
|
v.startAnimation(opacityIn);
|
||||||
|
bindButton(favorite, r.favouritesCount);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onBookmarkClick(View v){
|
private void onBookmarkClick(View v){
|
||||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setBookmarked(item.status, !item.status.bookmarked);
|
v.startAnimation(opacityOut);
|
||||||
bookmark.setSelected(item.status.bookmarked);
|
bookmark.setSelected(item.status.bookmarked);
|
||||||
|
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setBookmarked(item.status, !item.status.bookmarked, r->{
|
||||||
|
v.startAnimation(opacityIn);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onShareClick(View v){
|
private void onShareClick(View v){
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
|
|
||||||
translateWrap.setVisibility(item.textSelectable && item.translateEnabled &&
|
translateWrap.setVisibility(item.textSelectable && item.translateEnabled &&
|
||||||
!item.status.visibility.isLessVisibleThan(StatusPrivacy.UNLISTED) &&
|
!item.status.visibility.isLessVisibleThan(StatusPrivacy.UNLISTED) &&
|
||||||
|
item.status.language != null &&
|
||||||
(item.session.preferences == null || !item.status.language.equalsIgnoreCase(item.session.preferences.postingDefaultLanguage))
|
(item.session.preferences == null || !item.status.language.equalsIgnoreCase(item.session.preferences.postingDefaultLanguage))
|
||||||
? View.VISIBLE : View.GONE);
|
? View.VISIBLE : View.GONE);
|
||||||
translateButton.setText(item.translated ? R.string.sk_translate_show_original : R.string.sk_translate_post);
|
translateButton.setText(item.translated ? R.string.sk_translate_show_original : R.string.sk_translate_post);
|
||||||
|
|||||||
@@ -708,6 +708,16 @@ public class UiUtils{
|
|||||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Brown : R.style.Theme_Mastodon_Dark_Brown;
|
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Brown : R.style.Theme_Mastodon_Dark_Brown;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case RED:
|
||||||
|
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||||
|
case AUTO ->
|
||||||
|
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Red : R.style.Theme_Mastodon_AutoLightDark_Red;
|
||||||
|
case LIGHT ->
|
||||||
|
R.style.Theme_Mastodon_Light_Red;
|
||||||
|
case DARK ->
|
||||||
|
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Red : R.style.Theme_Mastodon_Dark_Red;
|
||||||
|
});
|
||||||
|
break;
|
||||||
case YELLOW:
|
case YELLOW:
|
||||||
context.setTheme(switch(GlobalUserPreferences.theme){
|
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||||
case AUTO ->
|
case AUTO ->
|
||||||
@@ -718,6 +728,16 @@ public class UiUtils{
|
|||||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Yellow : R.style.Theme_Mastodon_Dark_Yellow;
|
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Yellow : R.style.Theme_Mastodon_Dark_Yellow;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case MATERIAL3:
|
||||||
|
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||||
|
case AUTO ->
|
||||||
|
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Material3 : R.style.Theme_Mastodon_AutoLightDark_Material3;
|
||||||
|
case LIGHT ->
|
||||||
|
R.style.Theme_Mastodon_Light_Material3;
|
||||||
|
case DARK ->
|
||||||
|
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Material3 : R.style.Theme_Mastodon_Dark_Material3;
|
||||||
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package org.joinmastodon.android.ui.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import org.joinmastodon.android.R;
|
||||||
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
|
||||||
|
import androidx.annotation.DrawableRes;
|
||||||
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
|
public class FilterChipView extends Button{
|
||||||
|
|
||||||
|
private boolean currentlySelected;
|
||||||
|
|
||||||
|
public FilterChipView(Context context){
|
||||||
|
this(context, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterChipView(Context context, AttributeSet attrs){
|
||||||
|
this(context, attrs, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterChipView(Context context, AttributeSet attrs, int defStyle){
|
||||||
|
super(context, attrs, defStyle);
|
||||||
|
setCompoundDrawablePadding(V.dp(8));
|
||||||
|
setBackgroundResource(R.drawable.bg_filter_chip);
|
||||||
|
setTextAppearance(R.style.m3_label_large);
|
||||||
|
setTextColor(getResources().getColorStateList(R.color.filter_chip_text, context.getTheme()));
|
||||||
|
setCompoundDrawableTintList(ColorStateList.valueOf(UiUtils.getThemeColor(context, R.attr.colorM3OnSurface)));
|
||||||
|
updatePadding();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawableStateChanged(){
|
||||||
|
super.drawableStateChanged();
|
||||||
|
if(currentlySelected==isSelected())
|
||||||
|
return;
|
||||||
|
currentlySelected=isSelected();
|
||||||
|
Drawable start=currentlySelected ? getResources().getDrawable(R.drawable.ic_baseline_check_18, getContext().getTheme()) : null;
|
||||||
|
Drawable end=getCompoundDrawablesRelative()[2];
|
||||||
|
setCompoundDrawablesRelativeWithIntrinsicBounds(start, null, end, null);
|
||||||
|
updatePadding();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updatePadding(){
|
||||||
|
int vertical=V.dp(6);
|
||||||
|
Drawable[] drawables=getCompoundDrawablesRelative();
|
||||||
|
setPaddingRelative(V.dp(drawables[0]==null ? 16 : 8), vertical, V.dp(drawables[2]==null ? 16 : 8), vertical);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDrawableEnd(@DrawableRes int drawable){
|
||||||
|
setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, drawable, 0);
|
||||||
|
updatePadding();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,19 +5,34 @@ import android.animation.AnimatorListenerAdapter;
|
|||||||
import android.animation.AnimatorSet;
|
import android.animation.AnimatorSet;
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.ColorFilter;
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.graphics.RectF;
|
||||||
|
import android.graphics.Region;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.graphics.drawable.InsetDrawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.joinmastodon.android.R;
|
import org.joinmastodon.android.R;
|
||||||
import org.joinmastodon.android.ui.utils.SimpleTextWatcher;
|
import org.joinmastodon.android.ui.utils.SimpleTextWatcher;
|
||||||
|
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||||
|
|
||||||
|
import androidx.annotation.Keep;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
@@ -28,6 +43,10 @@ public class FloatingHintEditTextLayout extends FrameLayout{
|
|||||||
private int offsetY;
|
private int offsetY;
|
||||||
private boolean hintVisible;
|
private boolean hintVisible;
|
||||||
private Animator currentAnim;
|
private Animator currentAnim;
|
||||||
|
private float animProgress;
|
||||||
|
private RectF tmpRect=new RectF();
|
||||||
|
private ColorStateList labelColors, origHintColors;
|
||||||
|
private boolean errorState;
|
||||||
|
|
||||||
public FloatingHintEditTextLayout(Context context){
|
public FloatingHintEditTextLayout(Context context){
|
||||||
this(context, null);
|
this(context, null);
|
||||||
@@ -44,7 +63,9 @@ public class FloatingHintEditTextLayout extends FrameLayout{
|
|||||||
TypedArray ta=context.obtainStyledAttributes(attrs, R.styleable.FloatingHintEditTextLayout);
|
TypedArray ta=context.obtainStyledAttributes(attrs, R.styleable.FloatingHintEditTextLayout);
|
||||||
labelTextSize=ta.getDimensionPixelSize(R.styleable.FloatingHintEditTextLayout_android_labelTextSize, V.dp(12));
|
labelTextSize=ta.getDimensionPixelSize(R.styleable.FloatingHintEditTextLayout_android_labelTextSize, V.dp(12));
|
||||||
offsetY=ta.getDimensionPixelOffset(R.styleable.FloatingHintEditTextLayout_editTextOffsetY, 0);
|
offsetY=ta.getDimensionPixelOffset(R.styleable.FloatingHintEditTextLayout_editTextOffsetY, 0);
|
||||||
|
labelColors=ta.getColorStateList(R.styleable.FloatingHintEditTextLayout_labelTextColor);
|
||||||
ta.recycle();
|
ta.recycle();
|
||||||
|
setAddStatesFromChildren(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -58,13 +79,15 @@ public class FloatingHintEditTextLayout extends FrameLayout{
|
|||||||
|
|
||||||
label=new TextView(getContext());
|
label=new TextView(getContext());
|
||||||
label.setTextSize(TypedValue.COMPLEX_UNIT_PX, labelTextSize);
|
label.setTextSize(TypedValue.COMPLEX_UNIT_PX, labelTextSize);
|
||||||
label.setTextColor(edit.getHintTextColors());
|
// label.setTextColor(labelColors==null ? edit.getHintTextColors() : labelColors);
|
||||||
|
origHintColors=edit.getHintTextColors();
|
||||||
label.setText(edit.getHint());
|
label.setText(edit.getHint());
|
||||||
label.setSingleLine();
|
label.setSingleLine();
|
||||||
label.setPivotX(0f);
|
label.setPivotX(0f);
|
||||||
label.setPivotY(0f);
|
label.setPivotY(0f);
|
||||||
|
label.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||||
LayoutParams lp=new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.START | Gravity.TOP);
|
LayoutParams lp=new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.START | Gravity.TOP);
|
||||||
lp.setMarginStart(edit.getPaddingStart());
|
lp.setMarginStart(edit.getPaddingStart()+((LayoutParams)edit.getLayoutParams()).getMarginStart());
|
||||||
addView(label, lp);
|
addView(label, lp);
|
||||||
|
|
||||||
hintVisible=edit.getText().length()==0;
|
hintVisible=edit.getText().length()==0;
|
||||||
@@ -75,6 +98,11 @@ public class FloatingHintEditTextLayout extends FrameLayout{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onTextChanged(Editable text){
|
private void onTextChanged(Editable text){
|
||||||
|
if(errorState){
|
||||||
|
errorState=false;
|
||||||
|
setForeground(getResources().getDrawable(R.drawable.bg_m3_outlined_text_field));
|
||||||
|
refreshDrawableState();
|
||||||
|
}
|
||||||
boolean newHintVisible=text.length()==0;
|
boolean newHintVisible=text.length()==0;
|
||||||
if(newHintVisible==hintVisible)
|
if(newHintVisible==hintVisible)
|
||||||
return;
|
return;
|
||||||
@@ -83,42 +111,210 @@ public class FloatingHintEditTextLayout extends FrameLayout{
|
|||||||
hintVisible=newHintVisible;
|
hintVisible=newHintVisible;
|
||||||
|
|
||||||
label.setAlpha(1);
|
label.setAlpha(1);
|
||||||
float scale=edit.getLineHeight()/(float)label.getLineHeight();
|
edit.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
|
||||||
float transY=edit.getHeight()/2f-edit.getLineHeight()/2f+(edit.getTop()-label.getTop())-(label.getHeight()/2f-label.getLineHeight()/2f);
|
|
||||||
|
|
||||||
AnimatorSet anim=new AnimatorSet();
|
|
||||||
if(hintVisible){
|
|
||||||
anim.playTogether(
|
|
||||||
ObjectAnimator.ofFloat(edit, TRANSLATION_Y, 0),
|
|
||||||
ObjectAnimator.ofFloat(label, SCALE_X, scale),
|
|
||||||
ObjectAnimator.ofFloat(label, SCALE_Y, scale),
|
|
||||||
ObjectAnimator.ofFloat(label, TRANSLATION_Y, transY)
|
|
||||||
);
|
|
||||||
edit.setHintTextColor(0);
|
|
||||||
}else{
|
|
||||||
label.setScaleX(scale);
|
|
||||||
label.setScaleY(scale);
|
|
||||||
label.setTranslationY(transY);
|
|
||||||
anim.playTogether(
|
|
||||||
ObjectAnimator.ofFloat(edit, TRANSLATION_Y, offsetY),
|
|
||||||
ObjectAnimator.ofFloat(label, SCALE_X, 1f),
|
|
||||||
ObjectAnimator.ofFloat(label, SCALE_Y, 1f),
|
|
||||||
ObjectAnimator.ofFloat(label, TRANSLATION_Y, 0f)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
anim.setDuration(150);
|
|
||||||
anim.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
|
||||||
anim.start();
|
|
||||||
anim.addListener(new AnimatorListenerAdapter(){
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation){
|
public boolean onPreDraw(){
|
||||||
currentAnim=null;
|
edit.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||||
|
|
||||||
|
float scale=edit.getLineHeight()/(float)label.getLineHeight();
|
||||||
|
float transY=edit.getHeight()/2f-edit.getLineHeight()/2f+(edit.getTop()-label.getTop())-(label.getHeight()/2f-label.getLineHeight()/2f);
|
||||||
|
|
||||||
|
AnimatorSet anim=new AnimatorSet();
|
||||||
if(hintVisible){
|
if(hintVisible){
|
||||||
label.setAlpha(0);
|
anim.playTogether(
|
||||||
edit.setHintTextColor(label.getTextColors());
|
ObjectAnimator.ofFloat(edit, TRANSLATION_Y, 0),
|
||||||
|
ObjectAnimator.ofFloat(label, SCALE_X, scale),
|
||||||
|
ObjectAnimator.ofFloat(label, SCALE_Y, scale),
|
||||||
|
ObjectAnimator.ofFloat(label, TRANSLATION_Y, transY),
|
||||||
|
ObjectAnimator.ofFloat(FloatingHintEditTextLayout.this, "animProgress", 0f)
|
||||||
|
);
|
||||||
|
edit.setHintTextColor(0);
|
||||||
|
}else{
|
||||||
|
label.setScaleX(scale);
|
||||||
|
label.setScaleY(scale);
|
||||||
|
label.setTranslationY(transY);
|
||||||
|
anim.playTogether(
|
||||||
|
ObjectAnimator.ofFloat(edit, TRANSLATION_Y, offsetY),
|
||||||
|
ObjectAnimator.ofFloat(label, SCALE_X, 1f),
|
||||||
|
ObjectAnimator.ofFloat(label, SCALE_Y, 1f),
|
||||||
|
ObjectAnimator.ofFloat(label, TRANSLATION_Y, 0f),
|
||||||
|
ObjectAnimator.ofFloat(FloatingHintEditTextLayout.this, "animProgress", 1f)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
anim.setDuration(150);
|
||||||
|
anim.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
||||||
|
anim.start();
|
||||||
|
anim.addListener(new AnimatorListenerAdapter(){
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation){
|
||||||
|
currentAnim=null;
|
||||||
|
if(hintVisible){
|
||||||
|
label.setAlpha(0);
|
||||||
|
edit.setHintTextColor(origHintColors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
currentAnim=anim;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
currentAnim=anim;
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
public void setAnimProgress(float progress){
|
||||||
|
animProgress=progress;
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
public float getAnimProgress(){
|
||||||
|
return animProgress;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDrawForeground(Canvas canvas){
|
||||||
|
if(getForeground()!=null && animProgress>0){
|
||||||
|
canvas.save();
|
||||||
|
float width=(label.getWidth()+V.dp(8))*animProgress;
|
||||||
|
float centerX=label.getLeft()+label.getWidth()/2f;
|
||||||
|
tmpRect.set(centerX-width/2f, label.getTop(), centerX+width/2f, label.getBottom());
|
||||||
|
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O)
|
||||||
|
canvas.clipOutRect(tmpRect);
|
||||||
|
else
|
||||||
|
canvas.clipRect(tmpRect, Region.Op.DIFFERENCE);
|
||||||
|
super.onDrawForeground(canvas);
|
||||||
|
canvas.restore();
|
||||||
|
}else{
|
||||||
|
super.onDrawForeground(canvas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setForeground(Drawable foreground){
|
||||||
|
super.setForeground(new PaddedForegroundDrawable(foreground));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Drawable getForeground(){
|
||||||
|
if(super.getForeground() instanceof PaddedForegroundDrawable pfd){
|
||||||
|
return pfd.wrapped;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawableStateChanged(){
|
||||||
|
super.drawableStateChanged();
|
||||||
|
if(label==null || errorState)
|
||||||
|
return;
|
||||||
|
ColorStateList color=labelColors==null ? origHintColors : labelColors;
|
||||||
|
label.setTextColor(color.getColorForState(getDrawableState(), 0xff00ff00));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorState(){
|
||||||
|
if(errorState)
|
||||||
|
return;
|
||||||
|
errorState=true;
|
||||||
|
setForeground(getResources().getDrawable(R.drawable.bg_m3_outlined_text_field_error, getContext().getTheme()));
|
||||||
|
label.setTextColor(UiUtils.getThemeColor(getContext(), R.attr.colorM3Error));
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PaddedForegroundDrawable extends Drawable{
|
||||||
|
private final Drawable wrapped;
|
||||||
|
|
||||||
|
private PaddedForegroundDrawable(Drawable wrapped){
|
||||||
|
this.wrapped=wrapped;
|
||||||
|
wrapped.setCallback(new Callback(){
|
||||||
|
@Override
|
||||||
|
public void invalidateDrawable(@NonNull Drawable who){
|
||||||
|
invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void scheduleDrawable(@NonNull Drawable who, @NonNull Runnable what, long when){
|
||||||
|
scheduleSelf(what, when);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unscheduleDrawable(@NonNull Drawable who, @NonNull Runnable what){
|
||||||
|
unscheduleSelf(what);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(@NonNull Canvas canvas){
|
||||||
|
wrapped.draw(canvas);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setAlpha(int alpha){
|
||||||
|
wrapped.setAlpha(alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setColorFilter(@Nullable ColorFilter colorFilter){
|
||||||
|
wrapped.setColorFilter(colorFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOpacity(){
|
||||||
|
return wrapped.getOpacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean setState(@NonNull int[] stateSet){
|
||||||
|
return wrapped.setState(stateSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLayoutDirection(){
|
||||||
|
return wrapped.getLayoutDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getAlpha(){
|
||||||
|
return wrapped.getAlpha();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public ColorFilter getColorFilter(){
|
||||||
|
return wrapped.getColorFilter();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStateful(){
|
||||||
|
return wrapped.isStateful();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public int[] getState(){
|
||||||
|
return wrapped.getState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Drawable getCurrent(){
|
||||||
|
return wrapped.getCurrent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void applyTheme(@NonNull Resources.Theme t){
|
||||||
|
wrapped.applyTheme(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canApplyTheme(){
|
||||||
|
return wrapped.canApplyTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onBoundsChange(@NonNull Rect bounds){
|
||||||
|
super.onBoundsChange(bounds);
|
||||||
|
LayoutParams lp=(LayoutParams) edit.getLayoutParams();
|
||||||
|
wrapped.setBounds(bounds.left+lp.leftMargin-V.dp(12), bounds.top, bounds.right-lp.rightMargin+V.dp(12), bounds.bottom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="?android:colorPrimary" android:state_enabled="true"/>
|
<item android:color="?attr/colorButtonBackgroundPrimaryDarkOnLight" android:state_enabled="true"/>
|
||||||
<item android:color="?colorPollVoted"/>
|
<item android:color="?colorButtonBackgroundPrimaryDarkOnLightDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="?colorSecondary" android:state_enabled="true"/>
|
<item android:color="?colorButtonBackgroundPrimaryLightOnDark" android:state_enabled="true"/>
|
||||||
<item android:color="?colorPollVoted"/>
|
<item android:color="?colorButtonBackgroundPrimaryLightOnDarkDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="@color/gray_25" android:state_enabled="true"/>
|
<item android:color="?colorButtonBackgroundSecondaryDarkOnLight" android:state_enabled="true"/>
|
||||||
<item android:color="@color/gray_100"/>
|
<item android:color="?colorButtonBackgroundSecondaryDarkOnLightDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="?colorPollVoted" android:state_enabled="true"/>
|
<item android:color="?colorButtonBackgroundSecondaryLightOnDark" android:state_enabled="true"/>
|
||||||
<item android:color="?colorSearchHint"/>
|
<item android:color="?colorButtonBackgroundSecondaryLightOnDarkDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="@color/gray_50" android:state_enabled="true"/>
|
<item android:color="?colorButtonTextPrimaryDarkOnLight" android:state_enabled="true"/>
|
||||||
<item android:color="?colorTabInactive"/>
|
<item android:color="?colorButtonTextPrimaryDarkOnLightDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="@color/gray_800" android:state_enabled="true"/>
|
<item android:color="?colorButtonTextPrimaryLightOnDark" android:state_enabled="true"/>
|
||||||
<item android:color="?colorTabInactive"/>
|
<item android:color="?colorButtonTextPrimaryLightOnDarkDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="?android:colorPrimary" android:state_enabled="true"/>
|
<item android:color="?colorButtonTextSecondaryDarkOnLight" android:state_enabled="true"/>
|
||||||
<item android:color="?colorTabInactive"/>
|
<item android:color="?colorButtonTextSecondaryDarkOnLightDisabled"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="?colorSecondary"/>
|
<item android:color="@color/gray_50"/>
|
||||||
</selector>
|
</selector>
|
||||||
5
mastodon/src/main/res/color/filter_chip_text.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?colorM3OnSecondaryContainer" android:state_selected="true"/>
|
||||||
|
<item android:color="?colorM3OnSurface"/>
|
||||||
|
</selector>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?colorM3OnSecondaryContainer" android:alpha="0.12"/>
|
||||||
|
</selector>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?colorM3OnSurfaceVariant" android:alpha="0.12"/>
|
||||||
|
</selector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?colorM3Primary" android:state_focused="true"/>
|
||||||
|
<item android:color="?colorM3OnSurfaceVariant"/>
|
||||||
|
</selector>
|
||||||
29
mastodon/src/main/res/drawable/bg_filter_chip.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true">
|
||||||
|
<ripple android:color="@color/m3_on_secondary_container_overlay">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="8dp"/>
|
||||||
|
<solid android:color="?colorM3SecondaryContainer"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<ripple android:color="@color/m3_on_surface_variant_overlay">
|
||||||
|
<item android:id="@android:id/mask">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="8dp"/>
|
||||||
|
<solid android:color="#000"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="8dp"/>
|
||||||
|
<stroke android:color="?colorM3Outline" android:width="1dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
19
mastodon/src/main/res/drawable/bg_m3_outlined_text_field.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:left="12dp" android:top="12dp" android:right="12dp" android:bottom="12dp">
|
||||||
|
<selector>
|
||||||
|
<item android:state_focused="true">
|
||||||
|
<shape>
|
||||||
|
<stroke android:color="?colorM3Primary" android:width="2dp"/>
|
||||||
|
<corners android:radius="4dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<stroke android:color="?colorM3Outline" android:width="1dp"/>
|
||||||
|
<corners android:radius="4dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:left="12dp" android:top="12dp" android:right="12dp" android:bottom="12dp">
|
||||||
|
<shape>
|
||||||
|
<stroke android:color="?colorM3Error" android:width="2dp"/>
|
||||||
|
<corners android:radius="4dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
9
mastodon/src/main/res/drawable/bg_onboarding_panel.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<color android:color="?colorM3Background"/>
|
||||||
|
</item>
|
||||||
|
<item android:id="@+id/color_overlay">
|
||||||
|
<color android:color="?colorM3Primary"/>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
5
mastodon/src/main/res/drawable/empty_8dp.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<size android:width="8dp"/>
|
||||||
|
<solid android:color="#00000000"/>
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="18dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M7,10l5,5 5,-5z"/>
|
||||||
|
</vector>
|
||||||
5
mastodon/src/main/res/drawable/ic_baseline_check_18.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="18dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||||
|
</vector>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_selected="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_filled"/>
|
<item android:state_selected="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_very_filled"/>
|
||||||
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_regular"/>
|
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_regular"/>
|
||||||
<item android:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/>
|
<item android:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M9,9.123C7.423,9.123 6.125,10.421 6.125,11.994C6.125,12.523 6.269,13.014 6.514,13.434C6.514,13.435 6.513,13.436 6.514,13.438L6.619,13.607L6.623,13.613C6.666,13.679 6.706,13.747 6.744,13.816L7.787,12.775C9.015,11.549 10.977,11.548 12.205,12.775C12.789,13.359 13.077,14.104 13.105,14.863L15.002,14.863C16.579,14.863 17.875,13.567 17.875,11.992C17.875,11.463 17.731,10.972 17.486,10.553L17.486,10.549L17.381,10.379C17.337,10.311 17.295,10.241 17.256,10.17L16.215,11.211C14.986,12.439 13.025,12.44 11.797,11.213C11.218,10.634 10.931,9.885 10.902,9.123L9,9.123z"
|
||||||
|
android:strokeWidth="3"
|
||||||
|
android:fillColor="#212121"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M20.787,8.06C20.603,7.828 20.319,7.678 20,7.678c-0.552,0 -1,0.447 -1,0.999 0,0.208 0.064,0.401 0.172,0.561C19.695,10.028 20,10.975 20,11.993c0,2.759 -2.238,4.996 -4.999,4.996l-5.586,-0.001 1.294,-1.291 0.084,-0.095c0.281,-0.362 0.279,-0.872 -0.006,-1.231L10.709,14.284 10.614,14.2C10.252,13.92 9.741,13.922 9.382,14.206L9.294,14.284 6.289,17.287 6.206,17.382c-0.281,0.362 -0.279,0.872 0.006,1.231l0.078,0.087 3.005,3.003 0.094,0.083c0.392,0.305 0.96,0.277 1.32,-0.083 0.363,-0.362 0.389,-0.934 0.078,-1.326l-0.078,-0.087 -1.304,-1.303 5.596,0.001 0.241,-0.004C18.996,18.857 22,15.776 22,11.993 22,10.534 21.552,9.178 20.787,8.057Z"
|
||||||
|
android:fillColor="#212121"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M14.712,2.289 L14.625,2.211C14.233,1.901 13.661,1.926 13.298,2.289L13.22,2.376C12.91,2.768 12.936,3.34 13.298,3.702l1.299,1.297 -5.598,0 -0.241,0.004C5.004,5.13 2,8.211 2,11.993c0,1.445 0.438,2.787 1.189,3.898 0.182,0.251 0.477,0.415 0.811,0.415 0.552,0 1,-0.447 1,-0.999C5,15.091 4.931,14.891 4.815,14.729L4.68,14.511C4.248,13.772 4,12.911 4,11.993 4,9.234 6.238,6.998 8.999,6.998L14.595,6.998 13.298,8.295 13.22,8.382c-0.311,0.392 -0.285,0.964 0.078,1.326 0.391,0.39 1.024,0.39 1.414,0L17.718,6.705 17.795,6.618C18.106,6.226 18.08,5.654 17.718,5.292Z"
|
||||||
|
android:strokeWidth="3"
|
||||||
|
android:fillColor="#212121"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M20.11,5.619L20.11,5.619A1.393,0.037 0,0 1,21.503 5.656L21.503,5.656A1.393,0.037 0,0 1,20.11 5.693L20.11,5.693A1.393,0.037 0,0 1,18.717 5.656L18.717,5.656A1.393,0.037 0,0 1,20.11 5.619z"
|
||||||
|
android:strokeWidth="52.513"
|
||||||
|
android:fillColor="#613583"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:fillAlpha="0.0156863"/>
|
||||||
|
</vector>
|
||||||
5
mastodon/src/main/res/drawable/ic_outline_email_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M22,6c0,-1.1 -0.9,-2 -2,-2L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6zM20,6l-8,5 -8,-5h16zM20,18L4,18L4,8l8,5 8,-5v10z"/>
|
||||||
|
</vector>
|
||||||
5
mastodon/src/main/res/drawable/ic_outline_link_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M17,7h-4v2h4c1.65,0 3,1.35 3,3s-1.35,3 -3,3h-4v2h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5zM11,15L7,15c-1.65,0 -3,-1.35 -3,-3s1.35,-3 3,-3h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-2zM8,11h8v2L8,13z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M2,17h20v2H2V17zM3.15,12.95L4,11.47l0.85,1.48l1.3,-0.75L5.3,10.72H7v-1.5H5.3l0.85,-1.47L4.85,7L4,8.47L3.15,7l-1.3,0.75L2.7,9.22H1v1.5h1.7L1.85,12.2L3.15,12.95zM9.85,12.2l1.3,0.75L12,11.47l0.85,1.48l1.3,-0.75l-0.85,-1.48H15v-1.5h-1.7l0.85,-1.47L12.85,7L12,8.47L11.15,7l-1.3,0.75l0.85,1.47H9v1.5h1.7L9.85,12.2zM23,9.22h-1.7l0.85,-1.47L20.85,7L20,8.47L19.15,7l-1.3,0.75l0.85,1.47H17v1.5h1.7l-0.85,1.48l1.3,0.75L20,11.47l0.85,1.48l1.3,-0.75l-0.85,-1.48H23V9.22z"/>
|
||||||
|
</vector>
|
||||||
5
mastodon/src/main/res/drawable/ic_outline_person_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,6c1.1,0 2,0.9 2,2s-0.9,2 -2,2 -2,-0.9 -2,-2 0.9,-2 2,-2m0,10c2.7,0 5.8,1.29 6,2L6,18c0.23,-0.72 3.31,-2 6,-2m0,-12C9.79,4 8,5.79 8,8s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||||
|
</vector>
|
||||||
5
mastodon/src/main/res/drawable/round_rect.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="100dp"/>
|
||||||
|
<solid android:color="#000"/>
|
||||||
|
</shape>
|
||||||
@@ -4,8 +4,7 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:paddingLeft="20dp"
|
android:paddingHorizontal="16dp">
|
||||||
android:paddingRight="20dp">
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/reply_btn"
|
android:id="@+id/reply_btn"
|
||||||
@@ -15,10 +14,11 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/reply"
|
android:id="@+id/reply"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
android:drawableStart="@drawable/ic_fluent_chat_multiple_24_regular"
|
android:drawableStart="@drawable/ic_fluent_chat_multiple_24_regular"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
android:drawableTint="?android:textColorSecondary"
|
android:drawableTint="?android:textColorSecondary"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:textAppearance="@style/m3_label_large"
|
android:textAppearance="@style/m3_label_large"
|
||||||
@@ -38,10 +38,11 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/boost"
|
android:id="@+id/boost"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
android:drawableStart="@drawable/ic_boost"
|
android:drawableStart="@drawable/ic_boost"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
android:drawableTint="@color/boost_icon"
|
android:drawableTint="@color/boost_icon"
|
||||||
android:textColor="@color/boost_icon"
|
android:textColor="@color/boost_icon"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@@ -62,10 +63,11 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/favorite"
|
android:id="@+id/favorite"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
android:drawableStart="@drawable/ic_fluent_star_24_selector"
|
android:drawableStart="@drawable/ic_fluent_star_24_selector"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
android:drawableTint="@color/favorite_icon"
|
android:drawableTint="@color/favorite_icon"
|
||||||
android:textColor="@color/favorite_icon"
|
android:textColor="@color/favorite_icon"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@@ -103,14 +105,14 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/share_btn"
|
android:id="@+id/share_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:minWidth="56dp">
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/share"
|
android:id="@+id/share"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/ic_fluent_share_24_regular"
|
android:src="@drawable/ic_fluent_share_24_regular"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
android:tint="?android:textColorSecondary"
|
android:tint="?android:textColorSecondary"
|
||||||
android:gravity="center_vertical"/>
|
android:gravity="center_vertical"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<me.grishka.appkit.views.FragmentRootLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".fragments.onboarding.AccountActivationFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1">
|
||||||
android:background="?colorBackgroundLight">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -17,40 +17,67 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clipChildren="false">
|
android:clipChildren="false">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_headline_medium"
|
|
||||||
android:minHeight="36dp"
|
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginRight="16dp"
|
|
||||||
android:layout_marginBottom="12dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/confirm_email_title"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subtitle"
|
android:id="@+id/subtitle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginStart="56dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:textAppearance="@style/m3_title_medium"
|
android:layout_marginTop="12dp"
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textAppearance="@style/m3_body_large"
|
||||||
|
android:textColor="?colorM3OnSurface"
|
||||||
android:text="@string/confirm_email_subtitle"/>
|
android:text="@string/confirm_email_subtitle"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="230dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_margin="32dp"
|
android:layout_marginTop="12dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/confirm_email_art"/>
|
android:src="@drawable/confirm_email_art"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<include layout="@layout/button_bar_activation" />
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="center_horizontal">
|
||||||
|
|
||||||
</me.grishka.appkit.views.FragmentRootLinearLayout>
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="@style/m3_label_large"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
android:text="@string/confirm_email_didnt_get"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_resend"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:text="@string/resend"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingLeft="12dp"
|
||||||
|
android:paddingRight="12dp"
|
||||||
|
android:fontFeatureSettings="'tnum'"
|
||||||
|
style="@style/Widget.Mastodon.M3.Button.Text"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:minWidth="145dp"
|
||||||
|
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||||
|
android:text="@string/open_email_app" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -5,14 +5,103 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:id="@+id/appkit_loader_root"
|
android:id="@+id/appkit_loader_root"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
android:background="?colorBackgroundLight">
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:background="@drawable/bg_onboarding_panel">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/search_edit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:elevation="0dp"
|
||||||
|
android:inputType="textFilter|textUri"
|
||||||
|
android:layout_toEndOf="@+id/btn_back"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:textAppearance="@style/m3_body_large"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="40dp"
|
||||||
|
android:drawableStart="@drawable/ic_m3_search"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:drawableTint="?colorM3OnSurfaceVariant"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColorHint="?colorM3OnSurfaceVariant"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
android:background="@drawable/round_rect"
|
||||||
|
android:backgroundTint="?colorM3SurfaceVariant"
|
||||||
|
android:hint="@string/search_communities"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/focus_thing"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:importantForAccessibility="no"/>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_back"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:background="?android:selectableItemBackgroundBorderless"
|
||||||
|
android:tint="?colorM3OnSurface"
|
||||||
|
android:contentDescription="@string/back"
|
||||||
|
android:src="@drawable/ic_arrow_back"/>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/clear"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:background="?android:selectableItemBackgroundBorderless"
|
||||||
|
android:layout_alignEnd="@id/search_edit"
|
||||||
|
android:layout_alignTop="@id/search_edit"
|
||||||
|
android:layout_margin="12dp"
|
||||||
|
android:contentDescription="@string/clear"
|
||||||
|
android:tint="?colorM3OnSurfaceVariant"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:src="@drawable/ic_m3_cancel"/>
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:id="@+id/filters_scroll"
|
||||||
|
android:layout_below="@id/search_edit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:scrollbars="none">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/filters_container"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:showDividers="middle"
|
||||||
|
android:divider="@drawable/empty_8dp">
|
||||||
|
</LinearLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/appkit_loader_content"
|
android:id="@+id/appkit_loader_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0px"
|
android:layout_height="0px"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1"
|
||||||
|
android:background="?colorM3Surface">
|
||||||
|
|
||||||
<include layout="@layout/loading"
|
<include layout="@layout/loading"
|
||||||
android:id="@+id/loading"/>
|
android:id="@+id/loading"/>
|
||||||
@@ -33,32 +122,29 @@
|
|||||||
android:id="@+id/button_bar"
|
android:id="@+id/button_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorBackgroundLight"
|
android:orientation="vertical"
|
||||||
android:outlineProvider="bounds"
|
android:background="@drawable/bg_onboarding_panel">
|
||||||
android:orientation="horizontal"
|
|
||||||
android:elevation="3dp">
|
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/btn_back"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_margin="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:minWidth="145dp"
|
android:layout_marginTop="8dp"
|
||||||
style="?secondaryLargeButtonStyle"
|
android:textAppearance="@style/m3_body_small"
|
||||||
android:text="@string/back"/>
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
android:text="@string/signup_random_server_explain"/>
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_next"
|
android:id="@+id/btn_next"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
android:minWidth="145dp"
|
android:minWidth="145dp"
|
||||||
style="?primaryLargeButtonStyle"
|
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||||
android:text="@string/next" />
|
android:text="@string/next" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -8,39 +8,24 @@
|
|||||||
android:id="@+id/list"
|
android:id="@+id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"/>
|
||||||
android:background="?colorBackgroundLight"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/button_bar"
|
android:id="@+id/button_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorBackgroundLight"
|
android:orientation="horizontal">
|
||||||
android:outlineProvider="bounds"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:elevation="3dp">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_back"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:minWidth="145dp"
|
|
||||||
style="?secondaryLargeButtonStyle"
|
|
||||||
android:text="@string/back"/>
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_next"
|
android:id="@+id/btn_next"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
android:minWidth="145dp"
|
android:minWidth="145dp"
|
||||||
style="?primaryLargeButtonStyle"
|
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||||
android:text="@string/i_agree" />
|
android:text="@string/i_agree" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<me.grishka.appkit.views.FragmentRootLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<me.grishka.appkit.views.FragmentRootLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@@ -8,8 +9,7 @@
|
|||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1">
|
||||||
android:background="?colorBackgroundLight">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -17,68 +17,58 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clipChildren="false">
|
android:clipChildren="false">
|
||||||
|
|
||||||
<TextView
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
android:id="@+id/title"
|
android:id="@+id/display_name_wrap"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="80dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:paddingTop="4dp"
|
||||||
android:textAppearance="@style/m3_headline_medium"
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
android:minHeight="36dp"
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginRight="16dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
tools:text="@string/signup_title"/>
|
|
||||||
|
|
||||||
<FrameLayout
|
<EditText
|
||||||
android:id="@+id/ava_wrap"
|
android:id="@+id/display_name"
|
||||||
android:layout_width="88dp"
|
|
||||||
android:layout_height="88dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="24dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/avatar"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="56dp"
|
||||||
android:scaleType="centerCrop"
|
android:layout_marginStart="56dp"
|
||||||
android:src="@drawable/default_avatar"/>
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:elevation="0dp"
|
||||||
|
android:inputType="textPersonName|textCapWords"
|
||||||
|
android:autofillHints="name"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:hint="@string/display_name"/>
|
||||||
|
|
||||||
<TextView
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="24dp"
|
||||||
android:layout_height="22dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="start|top"
|
||||||
android:gravity="center"
|
android:layout_marginStart="16dp"
|
||||||
android:background="@color/gray_800t"
|
android:layout_marginTop="12dp"
|
||||||
android:textAppearance="@style/m3_label_large"
|
android:backgroundTint="?colorM3OnSurfaceVariant"
|
||||||
android:textColor="#eee"
|
android:background="@drawable/ic_outline_person_24"/>
|
||||||
android:text="@string/edit_photo"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
<EditText
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
android:id="@+id/display_name"
|
android:id="@+id/username_wrap"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="80dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:paddingTop="4dp"
|
||||||
android:layout_marginRight="16dp"
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
android:inputType="textPersonName|textCapWords"
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
android:autofillHints="name"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:hint="@string/display_name"/>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginRight="16dp">
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/username"
|
android:id="@+id/username"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginStart="56dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:elevation="0dp"
|
||||||
android:inputType="textFilter|textNoSuggestions"
|
android:inputType="textFilter|textNoSuggestions"
|
||||||
android:autofillHints="username"
|
android:autofillHints="username"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
@@ -89,70 +79,152 @@
|
|||||||
android:id="@+id/domain"
|
android:id="@+id/domain"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="5dp"
|
|
||||||
android:layout_gravity="right|center_vertical"
|
android:layout_gravity="right|center_vertical"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:textAppearance="@style/m3_title_medium"
|
android:textAppearance="@style/m3_body_large"
|
||||||
tools:text="\@mastodon.social"/>
|
tools:text="\@mastodon.social"/>
|
||||||
|
|
||||||
</FrameLayout>
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
<EditText
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
android:id="@+id/email"
|
android:id="@+id/email_wrap"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="80dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:paddingTop="4dp"
|
||||||
android:layout_marginRight="16dp"
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
android:layout_marginBottom="8dp"
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
android:inputType="textEmailAddress"
|
|
||||||
android:autofillHints="emailAddress"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:hint="@string/email"/>
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/password"
|
android:id="@+id/email"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginStart="56dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:elevation="0dp"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:autofillHints="emailAddress"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:hint="@string/email"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="start|top"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:backgroundTint="?colorM3OnSurfaceVariant"
|
||||||
|
android:background="@drawable/ic_outline_email_24"/>
|
||||||
|
|
||||||
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
|
android:id="@+id/password_wrap"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="80dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:paddingTop="4dp"
|
||||||
android:layout_marginRight="16dp"
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
android:inputType="textPassword"
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
android:autofillHints="password"
|
|
||||||
android:singleLine="true"
|
<EditText
|
||||||
android:fontFamily="sans-serif"
|
android:id="@+id/password"
|
||||||
android:hint="@string/password"/>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginStart="56dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:elevation="0dp"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:autofillHints="password"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:fontFamily="sans-serif"
|
||||||
|
android:hint="@string/password"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="start|top"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:backgroundTint="?colorM3OnSurfaceVariant"
|
||||||
|
android:background="@drawable/ic_outline_password_24"/>
|
||||||
|
|
||||||
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
|
android:id="@+id/password_confirm_wrap"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/password_confirm"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginStart="56dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:elevation="0dp"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:autofillHints="password"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:fontFamily="sans-serif"
|
||||||
|
android:hint="@string/confirm_password"/>
|
||||||
|
|
||||||
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginStart="56dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginRight="16dp"
|
android:textAppearance="@style/m3_body_small"
|
||||||
android:layout_marginBottom="16dp"
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
android:textAppearance="@style/m3_body_medium"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:text="@string/password_note"/>
|
android:text="@string/password_note"/>
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/reason"
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
|
android:id="@+id/reason_wrap"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:paddingTop="4dp"
|
||||||
android:layout_marginLeft="16dp"
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
android:layout_marginRight="16dp"
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
android:inputType="textCapSentences|textMultiLine"
|
|
||||||
android:hint="@string/signup_reason"/>
|
<EditText
|
||||||
|
android:id="@+id/reason"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="56dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:elevation="0dp"
|
||||||
|
android:inputType="textCapSentences|textMultiLine"
|
||||||
|
android:hint="@string/signup_reason"/>
|
||||||
|
|
||||||
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/reason_explain"
|
android:id="@+id/reason_explain"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginStart="56dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginRight="16dp"
|
android:textAppearance="@style/m3_body_small"
|
||||||
android:layout_marginBottom="16dp"
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
android:textAppearance="@style/m3_body_medium"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:text="@string/signup_reason_note"/>
|
android:text="@string/signup_reason_note"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -163,32 +235,18 @@
|
|||||||
android:id="@+id/button_bar"
|
android:id="@+id/button_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorBackgroundLight"
|
android:orientation="horizontal">
|
||||||
android:outlineProvider="bounds"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:elevation="3dp">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_back"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:minWidth="145dp"
|
|
||||||
style="?secondaryLargeButtonStyle"
|
|
||||||
android:text="@string/back"/>
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_next"
|
android:id="@+id/btn_next"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
android:minWidth="145dp"
|
android:minWidth="145dp"
|
||||||
style="?primaryLargeButtonStyle"
|
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||||
android:text="@string/next" />
|
android:text="@string/next" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/posts_btn"
|
android:id="@+id/posts_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="56dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/following_btn"
|
android:id="@+id/following_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="56dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/followers_btn"
|
android:id="@+id/followers_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="56dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="12dp"
|
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginLeft="19dp"
|
|
||||||
android:layout_marginRight="19dp"
|
|
||||||
android:textAppearance="@style/m3_headline_medium"
|
|
||||||
android:minHeight="36dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/instance_catalog_title"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subtitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="19dp"
|
|
||||||
android:layout_marginRight="19dp"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
android:textAppearance="@style/m3_title_medium"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:text="@string/instance_catalog_subtitle"/>
|
|
||||||
|
|
||||||
<org.joinmastodon.android.ui.tabs.TabLayout
|
|
||||||
android:id="@+id/categories_list"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="72dp"
|
|
||||||
android:background="@drawable/bg_catalog_tabs"
|
|
||||||
app:tabIndicator="@drawable/mtrl_tabs_default_indicator"
|
|
||||||
app:tabIndicatorAnimationMode="elastic"
|
|
||||||
app:tabIndicatorColor="?android:textColorPrimary"
|
|
||||||
app:tabMinWidth="120dp"
|
|
||||||
app:tabMaxWidth="120dp"
|
|
||||||
app:tabMode="scrollable"/>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/search_edit"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textFilter|textNoSuggestions"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:imeOptions="actionGo"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginRight="16dp"
|
|
||||||
android:layout_marginTop="19dp"
|
|
||||||
android:layout_marginBottom="3dp"
|
|
||||||
android:drawableStart="@drawable/ic_fluent_search_20_regular"
|
|
||||||
android:drawablePadding="8dp"
|
|
||||||
android:drawableTint="?android:textColorSecondary"
|
|
||||||
android:hint="@string/search_communities"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -3,73 +3,60 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp">
|
android:paddingStart="16dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/radiobtn"
|
android:id="@+id/radiobtn"
|
||||||
android:layout_width="24dp"
|
android:layout_width="28dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_marginStart="-3dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:button="@drawable/ic_round_checkbox"
|
android:buttonTint="@color/m3_radiobutton_tint"
|
||||||
android:buttonTint="?android:textColorSecondary"
|
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:clickable="false"/>
|
android:clickable="false"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:layout_toEndOf="@id/radiobtn"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
tools:src="#0f0"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toEndOf="@id/radiobtn"
|
android:layout_toEndOf="@id/image"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginBottom="4dp"
|
android:textAppearance="@style/m3_body_large"
|
||||||
android:textAppearance="@style/m3_title_medium"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:minHeight="24dp"
|
android:minHeight="24dp"
|
||||||
|
android:textColor="?colorM3OnSurface"
|
||||||
tools:text="mastodon.social"/>
|
tools:text="mastodon.social"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/description"
|
android:id="@+id/description"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toEndOf="@id/radiobtn"
|
android:layout_toEndOf="@id/image"
|
||||||
android:layout_below="@id/title"
|
android:layout_below="@id/title"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:textAppearance="@style/m3_body_medium"
|
android:textAppearance="@style/m3_body_medium"
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
android:lineSpacingExtra="4sp"
|
||||||
tools:text="General-purpose server run by the lead developer of Mastodon"/>
|
tools:text="General-purpose server run by the lead developer of Mastodon"/>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/user_count"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toEndOf="@id/radiobtn"
|
|
||||||
android:layout_below="@id/description"
|
|
||||||
android:textAppearance="@style/m3_label_medium"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:drawableStart="@drawable/ic_fluent_people_community_16_regular"
|
|
||||||
android:drawableTint="?android:textColorSecondary"
|
|
||||||
android:drawablePadding="8dp"
|
|
||||||
tools:text="588.8K"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lang"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toEndOf="@id/user_count"
|
|
||||||
android:layout_below="@id/description"
|
|
||||||
android:layout_marginStart="24dp"
|
|
||||||
android:textAppearance="@style/m3_label_medium"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:drawableStart="@drawable/ic_fluent_local_language_16_regular"
|
|
||||||
android:drawableTint="?android:textColorSecondary"
|
|
||||||
android:drawablePadding="8dp"
|
|
||||||
tools:text="EN"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
98
mastodon/src/main/res/layout/item_instance_custom.xml
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="8dp">
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_search_field">
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radiobtn"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:button="@drawable/ic_round_checkbox"
|
||||||
|
android:buttonTint="?android:textColorSecondary"
|
||||||
|
android:background="@null"
|
||||||
|
android:focusable="false"
|
||||||
|
android:clickable="false"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:layout_toEndOf="@id/radiobtn"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:src="#0f0"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toEndOf="@id/radiobtn"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:textAppearance="@style/m3_title_medium"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:minHeight="24dp"
|
||||||
|
tools:text="mastodon.social"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toEndOf="@id/radiobtn"
|
||||||
|
android:layout_below="@id/title"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:textAppearance="@style/m3_body_medium"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:text="General-purpose server run by the lead developer of Mastodon"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/user_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toEndOf="@id/radiobtn"
|
||||||
|
android:layout_below="@id/description"
|
||||||
|
android:textAppearance="@style/m3_label_medium"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:drawableStart="@drawable/ic_fluent_people_community_16_regular"
|
||||||
|
android:drawableTint="?android:textColorSecondary"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
tools:text="588.8K"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lang"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toEndOf="@id/user_count"
|
||||||
|
android:layout_below="@id/description"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:textAppearance="@style/m3_label_medium"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:drawableStart="@drawable/ic_fluent_local_language_16_regular"
|
||||||
|
android:drawableTint="?android:textColorSecondary"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
tools:text="EN"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
</FrameLayout>
|
||||||
12
mastodon/src/main/res/layout/item_list_header_simple.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="@style/m3_body_large"
|
||||||
|
android:textColor="?colorM3OnSurface"
|
||||||
|
android:paddingStart="56dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
</TextView>
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:paddingVertical="8dp">
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/bg_search_field">
|
|
||||||
<include layout="@layout/item_instance_catalog" />
|
|
||||||
</FrameLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
@@ -1,44 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
android:paddingTop="12dp"
|
||||||
android:elevation="3dp"
|
android:paddingEnd="24dp"
|
||||||
android:background="?colorBackgroundLightest"
|
android:paddingBottom="12dp"
|
||||||
android:foreground="?android:selectableItemBackground">
|
android:paddingStart="16dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="?colorM3Primary"
|
||||||
|
android:drawableStart="@drawable/ic_outline_link_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:drawableTint="?colorM3Primary"
|
||||||
|
tools:text="Privacy Policy - example.social">
|
||||||
|
|
||||||
<ImageView
|
</TextView>
|
||||||
android:id="@+id/favicon"
|
|
||||||
android:layout_width="16dp"
|
|
||||||
android:layout_height="16dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:importantForAccessibility="no"
|
|
||||||
tools:src="#0f0"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/domain"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:layout_toEndOf="@id/favicon"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:textAppearance="@style/m3_title_small"
|
|
||||||
android:textColor="?android:textColorPrimary"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
tools:text="joinmastodon.org"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_below="@id/domain"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:textAppearance="@style/m3_title_medium"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
tools:text="Mastodon for Android privacy policy"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
34
mastodon/src/main/res/layout/item_server_rule.xml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:baselineAligned="false">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/number"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:textColor="?colorM3Primary"
|
||||||
|
android:fontFamily="sans-serif-condensed"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="22dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
tools:text="1"/>
|
||||||
|
|
||||||
|
<org.joinmastodon.android.ui.views.LinkedTextView
|
||||||
|
android:id="@+id/text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top"
|
||||||
|
android:textAppearance="@style/m3_body_large"
|
||||||
|
tools:text="No discrimination, including (but not limited to) racism, sexism, homophobia or transphobia."/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:id="@+id/m3_color" android:title="@string/sk_color_theme_material3"/>
|
||||||
<item android:id="@+id/pink_color" android:title="@string/sk_color_theme_pink"/>
|
<item android:id="@+id/pink_color" android:title="@string/sk_color_theme_pink"/>
|
||||||
<item android:id="@+id/purple_color" android:title="@string/sk_color_theme_purple"/>
|
<item android:id="@+id/purple_color" android:title="@string/sk_color_theme_purple"/>
|
||||||
<item android:id="@+id/green_color" android:title="@string/sk_color_theme_green"/>
|
<item android:id="@+id/green_color" android:title="@string/sk_color_theme_green"/>
|
||||||
<item android:id="@+id/blue_color" android:title="@string/sk_color_theme_blue"/>
|
<item android:id="@+id/blue_color" android:title="@string/sk_color_theme_blue"/>
|
||||||
<item android:id="@+id/brown_color" android:title="@string/sk_color_theme_brown"/>
|
<item android:id="@+id/brown_color" android:title="@string/sk_color_theme_brown"/>
|
||||||
|
<item android:id="@+id/red_color" android:title="@string/sk_color_theme_red"/>
|
||||||
<item android:id="@+id/yellow_color" android:title="@string/sk_color_theme_yellow"/>
|
<item android:id="@+id/yellow_color" android:title="@string/sk_color_theme_yellow"/>
|
||||||
</menu>
|
</menu>
|
||||||
@@ -56,4 +56,8 @@
|
|||||||
<string name="sk_language_name">%s (%s)</string>
|
<string name="sk_language_name">%s (%s)</string>
|
||||||
<string name="sk_confirm_clear_recent_languages">¿Confirma que quiere vaciar sus idiomas usados recientemente\?</string>
|
<string name="sk_confirm_clear_recent_languages">¿Confirma que quiere vaciar sus idiomas usados recientemente\?</string>
|
||||||
<string name="sk_clear_recent_languages">Vaciar idiomas usados recientemente</string>
|
<string name="sk_clear_recent_languages">Vaciar idiomas usados recientemente</string>
|
||||||
|
<string name="sk_welcome_text">¡El tiburón te saluda! Para empezar, introduzca a continuación el nombre del dominio de su instancia de origen.</string>
|
||||||
|
<string name="sk_example_domain">example.social</string>
|
||||||
|
<string name="sk_welcome_title">¡Bienvenidos!</string>
|
||||||
|
<string name="sk_color_theme_material3">Sistema</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -56,4 +56,8 @@
|
|||||||
<string name="sk_language_name">%s (%s)</string>
|
<string name="sk_language_name">%s (%s)</string>
|
||||||
<string name="sk_confirm_clear_recent_languages">Êtes-vous sûr de vouloir effacer vos langues récemment utilisées \?</string>
|
<string name="sk_confirm_clear_recent_languages">Êtes-vous sûr de vouloir effacer vos langues récemment utilisées \?</string>
|
||||||
<string name="sk_clear_recent_languages">Effacer les langues récemment utilisées</string>
|
<string name="sk_clear_recent_languages">Effacer les langues récemment utilisées</string>
|
||||||
|
<string name="sk_example_domain">exemple.social</string>
|
||||||
|
<string name="sk_welcome_title">Bienvenue !</string>
|
||||||
|
<string name="sk_welcome_text">Le requin vous salue ! Pour commencer, veuillez entrer le nom de domaine de votre instance personnelle ci-dessous.</string>
|
||||||
|
<string name="sk_color_theme_material3">Système</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -47,4 +47,17 @@
|
|||||||
<string name="sk_settings_show_federated_timeline">Mostra timeline federata</string>
|
<string name="sk_settings_show_federated_timeline">Mostra timeline federata</string>
|
||||||
<string name="sk_disable_marquee">Disabilita scorrimento titoli</string>
|
<string name="sk_disable_marquee">Disabilita scorrimento titoli</string>
|
||||||
<string name="sk_reject_follow_request">Rifiuta richiesta di seguirti</string>
|
<string name="sk_reject_follow_request">Rifiuta richiesta di seguirti</string>
|
||||||
|
<string name="sk_translate_post">Traduci</string>
|
||||||
|
<string name="sk_translate_show_original">Mostra originale</string>
|
||||||
|
<string name="sk_translated_using">Tradotto con</string>
|
||||||
|
<string name="sk_post_language">Lingua: %s</string>
|
||||||
|
<string name="sk_language_name">%s (%s)</string>
|
||||||
|
<string name="sk_confirm_clear_recent_languages">Sei sicuro di voler cancellare le lingue usate di recente\?</string>
|
||||||
|
<string name="sk_clear_recent_languages">Cancella lingue usate di recente</string>
|
||||||
|
<string name="sk_welcome_title">Benvenuto!</string>
|
||||||
|
<string name="sk_example_domain">example.social</string>
|
||||||
|
<string name="sk_poll_allow_multiple">Consenti scelte multiple</string>
|
||||||
|
<string name="sk_available_languages">Lingue disponibili</string>
|
||||||
|
<string name="sk_welcome_text">Lo squalo ti saluta! Per iniziare inserisci il dominio dell\'istanza a cui sei iscritto.</string>
|
||||||
|
<string name="sk_color_theme_material3">Sistema</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -56,4 +56,7 @@
|
|||||||
<string name="sk_available_languages">모든 언어</string>
|
<string name="sk_available_languages">모든 언어</string>
|
||||||
<string name="sk_clear_recent_languages">최근 사용한 언어 지우기</string>
|
<string name="sk_clear_recent_languages">최근 사용한 언어 지우기</string>
|
||||||
<string name="sk_confirm_clear_recent_languages">정말로 최근 사용한 언어를 지우시겠습니까\?</string>
|
<string name="sk_confirm_clear_recent_languages">정말로 최근 사용한 언어를 지우시겠습니까\?</string>
|
||||||
|
<string name="sk_example_domain">example.social</string>
|
||||||
|
<string name="sk_welcome_title">환영합니다!</string>
|
||||||
|
<string name="sk_welcome_text">상어가 당신을 맞이합니다! 시작하기 위해, 아래에 사용하시는 인스턴스의 도메인 이름을 입력해주세요.</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -17,4 +17,10 @@
|
|||||||
|
|
||||||
<style name="Theme.Mastodon.AutoLightDark.Yellow" parent="Theme.Mastodon.Dark.Yellow"/>
|
<style name="Theme.Mastodon.AutoLightDark.Yellow" parent="Theme.Mastodon.Dark.Yellow"/>
|
||||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Yellow" parent="Theme.Mastodon.Dark.TrueBlack.Yellow"/>
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Yellow" parent="Theme.Mastodon.Dark.TrueBlack.Yellow"/>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.Red" parent="Theme.Mastodon.Dark.Red"/>
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Red" parent="Theme.Mastodon.Dark.Red"/>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.Material3" parent="Theme.Mastodon.Dark.Material3"/>
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Material3" parent="Theme.Mastodon.Dark.TrueBlack.Material3"/>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<string name="sk_mark_media_as_sensitive">Oznacz jako wrażliwe</string>
|
<string name="sk_mark_media_as_sensitive">Oznacz jako wrażliwe</string>
|
||||||
<string name="sk_user_post_notifications_on">Włączono powiadomienia dla postu %s</string>
|
<string name="sk_user_post_notifications_on">Włączono powiadomienia dla postu %s</string>
|
||||||
<string name="sk_user_post_notifications_off">Wyłączono powiadomienia dla postu %s</string>
|
<string name="sk_user_post_notifications_off">Wyłączono powiadomienia dla postu %s</string>
|
||||||
<string name="sk_federated_timeline">Globalne</string>
|
<string name="sk_federated_timeline">fediwersum</string>
|
||||||
<string name="sk_federated_timeline_info_banner">To są najnowsze post ze znanej sieci fediwersum dla twojego serwera.</string>
|
<string name="sk_federated_timeline_info_banner">To są najnowsze post ze znanej sieci fediwersum dla twojego serwera.</string>
|
||||||
<string name="sk_update_available">Megalodon %s jest dostępny do pobrania.</string>
|
<string name="sk_update_available">Megalodon %s jest dostępny do pobrania.</string>
|
||||||
<string name="sk_update_ready">Megalodon %s został pobrany i jest gotowy do instalacji.</string>
|
<string name="sk_update_ready">Megalodon %s został pobrany i jest gotowy do instalacji.</string>
|
||||||
@@ -56,4 +56,7 @@
|
|||||||
<string name="sk_language_name">%s (%s)</string>
|
<string name="sk_language_name">%s (%s)</string>
|
||||||
<string name="sk_confirm_clear_recent_languages">Czy na pewno chcesz wyczyścić ostatnio użyte języki\?</string>
|
<string name="sk_confirm_clear_recent_languages">Czy na pewno chcesz wyczyścić ostatnio użyte języki\?</string>
|
||||||
<string name="sk_clear_recent_languages">Wyczyść ostatnio użyte języki</string>
|
<string name="sk_clear_recent_languages">Wyczyść ostatnio użyte języki</string>
|
||||||
|
<string name="sk_example_domain">przykład.social</string>
|
||||||
|
<string name="sk_welcome_title">Witaj!</string>
|
||||||
|
<string name="sk_welcome_text">Rekin się kłania! Aby zacząć, wpisz adres swojej instancji poniżej.</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -54,4 +54,5 @@
|
|||||||
<string name="sk_language_name">%s (%s)</string>
|
<string name="sk_language_name">%s (%s)</string>
|
||||||
<string name="sk_confirm_clear_recent_languages">Tem certeza de que deseja limpar os idiomas usados recentemente\?</string>
|
<string name="sk_confirm_clear_recent_languages">Tem certeza de que deseja limpar os idiomas usados recentemente\?</string>
|
||||||
<string name="sk_clear_recent_languages">Limpar idiomas usados recentemente</string>
|
<string name="sk_clear_recent_languages">Limpar idiomas usados recentemente</string>
|
||||||
|
<string name="sk_notify_posts">Notificações de posts</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -15,4 +15,42 @@
|
|||||||
<string name="sk_visibility_unlisted">Скрытый</string>
|
<string name="sk_visibility_unlisted">Скрытый</string>
|
||||||
<string name="sk_mark_media_as_sensitive">Отметить медиафайл как деликатный</string>
|
<string name="sk_mark_media_as_sensitive">Отметить медиафайл как деликатный</string>
|
||||||
<string name="sk_settings_app_version">Megalodon v%1$s (%2$d)</string>
|
<string name="sk_settings_app_version">Megalodon v%1$s (%2$d)</string>
|
||||||
|
<string name="sk_notification_type_status">Публикации</string>
|
||||||
|
<string name="sk_notify_posts">Отправляет публикацию</string>
|
||||||
|
<string name="sk_settings_color_picker">Цветовая схема</string>
|
||||||
|
<string name="sk_color_theme_pink">Розовый</string>
|
||||||
|
<string name="sk_color_theme_purple">Фиолетовый</string>
|
||||||
|
<string name="sk_color_theme_brown">Коричневый</string>
|
||||||
|
<string name="sk_color_theme_yellow">Жёлтый</string>
|
||||||
|
<string name="sk_translate_show_original">Показать оригинальную публикацию</string>
|
||||||
|
<string name="sk_translated_using">Переведено через %s</string>
|
||||||
|
<string name="sk_available_languages">Доступные языки</string>
|
||||||
|
<string name="sk_language_name">%s (%s)</string>
|
||||||
|
<string name="sk_welcome_title">Добро пожаловать!</string>
|
||||||
|
<string name="sk_example_domain">example.social</string>
|
||||||
|
<string name="sk_settings_load_new_posts">Автоматически загружать новые публикации</string>
|
||||||
|
<string name="sk_settings_show_replies">Показывать ответы на публикации</string>
|
||||||
|
<string name="sk_federated_timeline">Федерация</string>
|
||||||
|
<string name="sk_update_available">Megalodon %s готов к скачиванию.</string>
|
||||||
|
<string name="sk_update_ready">Megalodon %s скачан и готов к установке новой версии.</string>
|
||||||
|
<string name="sk_check_for_update">Проверить обновления</string>
|
||||||
|
<string name="sk_follow_requests">Запросы на подписку</string>
|
||||||
|
<string name="sk_lists_with_user">Списки с %s</string>
|
||||||
|
<string name="sk_confirm_unpin_post">Вы точно хотите открепить эту публикацию от профиля\?</string>
|
||||||
|
<string name="sk_unpinning">Открепление публикации…</string>
|
||||||
|
<string name="sk_federated_timeline_info_banner">Это самые последние публикации людей из вашей федерации.</string>
|
||||||
|
<string name="sk_no_update_available">Обновление отсутствует</string>
|
||||||
|
<string name="sk_list_timelines">Списки</string>
|
||||||
|
<string name="sk_accept_follow_request">Принять запрос на подписку</string>
|
||||||
|
<string name="sk_reject_follow_request">Отклонить заявку на подписку</string>
|
||||||
|
<string name="sk_settings_always_reveal_content_warnings">Всегда раскрывать предупреждения о непристойном контенте</string>
|
||||||
|
<string name="sk_settings_contribute">Внести свой код в Megalodon</string>
|
||||||
|
<string name="sk_settings_show_federated_timeline">Показывать федеративную временную шкалу</string>
|
||||||
|
<string name="sk_color_theme_green">Зелёный</string>
|
||||||
|
<string name="sk_color_theme_blue">Синий</string>
|
||||||
|
<string name="sk_translate_post">Перевести</string>
|
||||||
|
<string name="sk_post_language">Язык: %s</string>
|
||||||
|
<string name="sk_clear_recent_languages">Очистить недавно использованные языки</string>
|
||||||
|
<string name="sk_confirm_clear_recent_languages">Вы точно хотите очистить недавно использованные языки\?</string>
|
||||||
|
<string name="sk_welcome_text">Акула приветствует вас! Чтобы начать, пожалуйста, введите домен своего домашнего сервера (инстанса) ниже.</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -56,4 +56,7 @@
|
|||||||
<string name="sk_no_update_available">Немає доступних оновлень</string>
|
<string name="sk_no_update_available">Немає доступних оновлень</string>
|
||||||
<string name="sk_list_timelines">Списки</string>
|
<string name="sk_list_timelines">Списки</string>
|
||||||
<string name="sk_settings_show_federated_timeline">Показувати федеративну стрічку</string>
|
<string name="sk_settings_show_federated_timeline">Показувати федеративну стрічку</string>
|
||||||
|
<string name="sk_example_domain">example.social</string>
|
||||||
|
<string name="sk_welcome_title">Вітаємо!</string>
|
||||||
|
<string name="sk_welcome_text">Акулка вас вітає! Щоб розпочати, введіть нижче доменне ім’я вашого інстансу.</string>
|
||||||
</resources>
|
</resources>
|
||||||
8
mastodon/src/main/res/values-v24/styles.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="Widget.Mastodon.Toolbar" parent="android:Widget.Material.Toolbar">
|
||||||
|
<item name="android:contentInsetStartWithNavigation">0dp</item>
|
||||||
|
<item name="android:titleMarginEnd">0dp</item>
|
||||||
|
<item name="android:titleMarginStart">0dp</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -2,6 +2,35 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<!-- M3 dynamic colors -->
|
<!-- M3 dynamic colors -->
|
||||||
|
|
||||||
|
<color name="m3_navigation_bar_bg">@android:color/system_neutral1_50</color>
|
||||||
|
|
||||||
|
<color name="m3_gray_900">@android:color/system_neutral1_900</color>
|
||||||
|
<color name="m3_gray_800t">@android:color/system_neutral1_800</color>
|
||||||
|
<color name="m3_gray_800">@android:color/system_neutral1_800</color>
|
||||||
|
<color name="m3_gray_700">@android:color/system_neutral1_700</color>
|
||||||
|
<color name="m3_gray_600">@android:color/system_neutral1_600</color>
|
||||||
|
<color name="m3_gray_500">@android:color/system_neutral1_500</color>
|
||||||
|
<color name="m3_gray_400">@android:color/system_neutral1_400</color>
|
||||||
|
<color name="m3_gray_300">@android:color/system_neutral1_300</color>
|
||||||
|
<color name="m3_gray_200">@android:color/system_neutral1_200</color>
|
||||||
|
<color name="m3_gray_100">@android:color/system_neutral1_100</color>
|
||||||
|
<color name="m3_gray_50t">@android:color/system_neutral1_50</color>
|
||||||
|
<color name="m3_gray_50">@android:color/system_neutral1_50</color>
|
||||||
|
<color name="m3_gray_25">@android:color/system_neutral1_10</color>
|
||||||
|
|
||||||
|
<color name="m3_primary_25">@android:color/system_accent1_10</color>
|
||||||
|
<color name="m3_primary_50">@android:color/system_accent1_50</color>
|
||||||
|
<color name="m3_primary_100">@android:color/system_accent1_100</color>
|
||||||
|
<color name="m3_primary_200">@android:color/system_accent1_200</color>
|
||||||
|
<color name="m3_primary_300">@android:color/system_accent1_300</color>
|
||||||
|
<color name="m3_primary_400">@android:color/system_accent1_400</color>
|
||||||
|
<color name="m3_primary_500">@android:color/system_accent1_500</color>
|
||||||
|
<color name="m3_primary_600">@android:color/system_accent1_600</color>
|
||||||
|
<color name="m3_primary_700">@android:color/system_accent1_700</color>
|
||||||
|
<color name="m3_primary_800">@android:color/system_accent1_800</color>
|
||||||
|
<color name="m3_primary_900">@android:color/system_accent1_900</color>
|
||||||
|
|
||||||
|
|
||||||
<!-- light theme -->
|
<!-- light theme -->
|
||||||
<color name="m3_sys_light_primary">@android:color/system_accent1_600</color>
|
<color name="m3_sys_light_primary">@android:color/system_accent1_600</color>
|
||||||
<color name="m3_sys_light_on_primary">#FFF</color>
|
<color name="m3_sys_light_on_primary">#FFF</color>
|
||||||
|
|||||||
@@ -17,6 +17,26 @@
|
|||||||
<attr name="colorTabInactive" format="color"/>
|
<attr name="colorTabInactive" format="color"/>
|
||||||
<attr name="colorAccentLightest" format="color"/>
|
<attr name="colorAccentLightest" format="color"/>
|
||||||
<attr name="profileHeaderBackground" format="color"/>
|
<attr name="profileHeaderBackground" format="color"/>
|
||||||
|
|
||||||
|
<attr name="colorButtonBackgroundPrimaryDarkOnLight" format="color"/>
|
||||||
|
<attr name="colorButtonBackgroundPrimaryDarkOnLightDisabled" format="color"/>
|
||||||
|
<attr name="colorButtonTextPrimaryDarkOnLight" format="color"/>
|
||||||
|
<attr name="colorButtonTextPrimaryDarkOnLightDisabled" format="color"/>
|
||||||
|
|
||||||
|
<attr name="colorButtonBackgroundPrimaryLightOnDark" format="color"/>
|
||||||
|
<attr name="colorButtonBackgroundPrimaryLightOnDarkDisabled" format="color"/>
|
||||||
|
<attr name="colorButtonTextPrimaryLightOnDark" format="color"/>
|
||||||
|
<attr name="colorButtonTextPrimaryLightOnDarkDisabled" format="color"/>
|
||||||
|
|
||||||
|
<attr name="colorButtonBackgroundSecondaryDarkOnLight" format="color"/>
|
||||||
|
<attr name="colorButtonBackgroundSecondaryDarkOnLightDisabled" format="color"/>
|
||||||
|
<attr name="colorButtonTextSecondaryDarkOnLight" format="color"/>
|
||||||
|
<attr name="colorButtonTextSecondaryDarkOnLightDisabled" format="color"/>
|
||||||
|
|
||||||
|
<attr name="colorButtonBackgroundSecondaryLightOnDark" format="color"/>
|
||||||
|
<attr name="colorButtonBackgroundSecondaryLightOnDarkDisabled" format="color"/>
|
||||||
|
<attr name="colorButtonTextSecondaryLightOnDark" format="color"/>
|
||||||
|
<attr name="colorButtonTextSecondaryLightOnDarkDisabled" format="color"/>
|
||||||
|
|
||||||
<attr name="colorM3Primary" format="color"/>
|
<attr name="colorM3Primary" format="color"/>
|
||||||
<attr name="colorM3OnPrimary" format="color"/>
|
<attr name="colorM3OnPrimary" format="color"/>
|
||||||
@@ -39,6 +59,10 @@
|
|||||||
<attr name="colorM3Outline" format="color"/>
|
<attr name="colorM3Outline" format="color"/>
|
||||||
<attr name="colorM3DisabledBackground" format="color"/>
|
<attr name="colorM3DisabledBackground" format="color"/>
|
||||||
<attr name="colorM3PressedOverlay" format="color"/>
|
<attr name="colorM3PressedOverlay" format="color"/>
|
||||||
|
<attr name="colorM3Error" format="color"/>
|
||||||
|
<attr name="colorM3OnError" format="color"/>
|
||||||
|
<attr name="colorM3ErrorContainer" format="color"/>
|
||||||
|
<attr name="colorM3OnErrorContainer" format="color"/>
|
||||||
|
|
||||||
<attr name="primaryLargeButtonStyle" format="reference"/>
|
<attr name="primaryLargeButtonStyle" format="reference"/>
|
||||||
<attr name="secondaryLargeButtonStyle" format="reference"/>
|
<attr name="secondaryLargeButtonStyle" format="reference"/>
|
||||||
@@ -50,5 +74,6 @@
|
|||||||
<declare-styleable name="FloatingHintEditTextLayout">
|
<declare-styleable name="FloatingHintEditTextLayout">
|
||||||
<attr name="editTextOffsetY" format="dimension"/>
|
<attr name="editTextOffsetY" format="dimension"/>
|
||||||
<attr name="android:labelTextSize" format="dimension"/>
|
<attr name="android:labelTextSize" format="dimension"/>
|
||||||
|
<attr name="labelTextColor" format="color"/>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -5,12 +5,13 @@
|
|||||||
|
|
||||||
<color name="fluent_default_icon_tint">?android:textColorPrimary</color>
|
<color name="fluent_default_icon_tint">?android:textColorPrimary</color>
|
||||||
|
|
||||||
<color name="gray_900">#121029</color>
|
<color name="gray_900">#110c10</color>
|
||||||
<color name="gray_800t">#cc2b2938</color>
|
<color name="gray_800t">#cc191417</color>
|
||||||
<color name="gray_800">#2b2938</color>
|
<color name="gray_800">#191417</color>
|
||||||
<color name="gray_700">#353454</color>
|
<color name="gray_700">#231f22</color>
|
||||||
<color name="gray_600">#464666</color>
|
<color name="gray_600">#3b373a</color>
|
||||||
<color name="gray_500">#696685</color>
|
<color name="gray_500">#625d60</color>
|
||||||
|
|
||||||
<color name="gray_400">#9998b3</color>
|
<color name="gray_400">#9998b3</color>
|
||||||
<color name="gray_300">#d1d1de</color>
|
<color name="gray_300">#d1d1de</color>
|
||||||
<color name="gray_200">#e6e6ed</color>
|
<color name="gray_200">#e6e6ed</color>
|
||||||
@@ -31,6 +32,13 @@
|
|||||||
<color name="primary_800">#ae218a</color>
|
<color name="primary_800">#ae218a</color>
|
||||||
<color name="primary_900">#6d1556</color>
|
<color name="primary_900">#6d1556</color>
|
||||||
|
|
||||||
|
<!-- <color name="original_gray_900">#121029</color> -->
|
||||||
|
<!-- <color name="original_gray_800t">#cc2b2938</color> -->
|
||||||
|
<!-- <color name="original_gray_800">#2b2938</color> -->
|
||||||
|
<!-- <color name="original_gray_700">#353454</color> -->
|
||||||
|
<!-- <color name="original_gray_600">#464666</color> -->
|
||||||
|
<!-- <color name="original_gray_500">#696685</color> -->
|
||||||
|
|
||||||
<color name="original_primary_25">#fafaff</color>
|
<color name="original_primary_25">#fafaff</color>
|
||||||
<color name="original_primary_50">#f4f3ff</color>
|
<color name="original_primary_50">#f4f3ff</color>
|
||||||
<color name="original_primary_100">#ebebff</color>
|
<color name="original_primary_100">#ebebff</color>
|
||||||
@@ -91,13 +99,6 @@
|
|||||||
<color name="yellow_primary_800">#3c2f00</color>
|
<color name="yellow_primary_800">#3c2f00</color>
|
||||||
<color name="yellow_primary_900">#231b00</color>
|
<color name="yellow_primary_900">#231b00</color>
|
||||||
|
|
||||||
<color name="custom_gray_900">#000000</color>
|
|
||||||
<color name="custom_gray_800t">#cc171717</color>
|
|
||||||
<color name="custom_gray_800">#171717</color>
|
|
||||||
<color name="custom_gray_700">#191919</color>
|
|
||||||
<color name="custom_gray_600">#212121</color>
|
|
||||||
<color name="custom_gray_500">#242424</color>
|
|
||||||
|
|
||||||
<color name="green_gray_400">#a2b095</color>
|
<color name="green_gray_400">#a2b095</color>
|
||||||
<color name="green_gray_300">#bdcbaf</color>
|
<color name="green_gray_300">#bdcbaf</color>
|
||||||
<color name="green_gray_200">#d9e7ca</color>
|
<color name="green_gray_200">#d9e7ca</color>
|
||||||
@@ -199,6 +200,33 @@
|
|||||||
<color name="shortcut_icon_foreground">@color/primary_700</color>
|
<color name="shortcut_icon_foreground">@color/primary_700</color>
|
||||||
|
|
||||||
<!-- M3 dynamic colors -->
|
<!-- M3 dynamic colors -->
|
||||||
|
<color name="m3_navigation_bar_bg">@color/gray_50</color>
|
||||||
|
|
||||||
|
<color name="m3_gray_900">@color/gray_900</color>
|
||||||
|
<color name="m3_gray_800t">@color/gray_800t</color>
|
||||||
|
<color name="m3_gray_800">@color/gray_800</color>
|
||||||
|
<color name="m3_gray_700">@color/gray_700</color>
|
||||||
|
<color name="m3_gray_600">@color/gray_600</color>
|
||||||
|
<color name="m3_gray_500">@color/gray_500</color>
|
||||||
|
<color name="m3_gray_400">@color/gray_400</color>
|
||||||
|
<color name="m3_gray_300">@color/gray_300</color>
|
||||||
|
<color name="m3_gray_200">@color/gray_200</color>
|
||||||
|
<color name="m3_gray_100">@color/gray_100</color>
|
||||||
|
<color name="m3_gray_50t">@color/gray_50t</color>
|
||||||
|
<color name="m3_gray_50">@color/gray_50</color>
|
||||||
|
<color name="m3_gray_25">@color/gray_25</color>
|
||||||
|
|
||||||
|
<color name="m3_primary_25">@color/primary_25</color>
|
||||||
|
<color name="m3_primary_50">@color/primary_50</color>
|
||||||
|
<color name="m3_primary_100">@color/primary_100</color>
|
||||||
|
<color name="m3_primary_200">@color/primary_200</color>
|
||||||
|
<color name="m3_primary_300">@color/primary_300</color>
|
||||||
|
<color name="m3_primary_400">@color/primary_400</color>
|
||||||
|
<color name="m3_primary_500">@color/primary_500</color>
|
||||||
|
<color name="m3_primary_600">@color/primary_600</color>
|
||||||
|
<color name="m3_primary_700">@color/primary_700</color>
|
||||||
|
<color name="m3_primary_800">@color/primary_800</color>
|
||||||
|
<color name="m3_primary_900">@color/primary_900</color>
|
||||||
|
|
||||||
<!-- light theme -->
|
<!-- light theme -->
|
||||||
<color name="m3_sys_light_primary">#6750A4</color>
|
<color name="m3_sys_light_primary">#6750A4</color>
|
||||||
|
|||||||
@@ -179,15 +179,16 @@
|
|||||||
<string name="back">Back</string>
|
<string name="back">Back</string>
|
||||||
<string name="instance_catalog_title">Mastodon is made of users on different servers.</string>
|
<string name="instance_catalog_title">Mastodon is made of users on different servers.</string>
|
||||||
<string name="instance_catalog_subtitle">Pick a server based on your interests, region, or a general purpose one. You can still connect with everyone, regardless of server.</string>
|
<string name="instance_catalog_subtitle">Pick a server based on your interests, region, or a general purpose one. You can still connect with everyone, regardless of server.</string>
|
||||||
<string name="search_communities">Search servers or enter URL</string>
|
<string name="search_communities">Server name or URL</string>
|
||||||
<string name="instance_rules_title">Some ground rules</string>
|
<string name="instance_rules_title">Server Rules</string>
|
||||||
<string name="instance_rules_subtitle">Take a minute to review the rules set and enforced by %s admins.</string>
|
<string name="instance_rules_subtitle">By continuing, you agree to follow by the following rules set and enforced by the %s moderators.</string>
|
||||||
<string name="signup_title">Let\'s get you set up on %s</string>
|
<string name="signup_title">Create Account</string>
|
||||||
<string name="edit_photo">edit</string>
|
<string name="edit_photo">edit</string>
|
||||||
<string name="display_name">display name</string>
|
<string name="display_name">Name</string>
|
||||||
<string name="username">username</string>
|
<string name="username">Username</string>
|
||||||
<string name="email">email</string>
|
<string name="email">Email</string>
|
||||||
<string name="password">password</string>
|
<string name="password">Password</string>
|
||||||
|
<string name="confirm_password">Confirm password</string>
|
||||||
<string name="password_note">Include capital letters, special characters, and numbers to increase your password strength.</string>
|
<string name="password_note">Include capital letters, special characters, and numbers to increase your password strength.</string>
|
||||||
<string name="category_academia">Academia</string>
|
<string name="category_academia">Academia</string>
|
||||||
<string name="category_activism">Activism</string>
|
<string name="category_activism">Activism</string>
|
||||||
@@ -202,8 +203,10 @@
|
|||||||
<string name="category_music">Music</string>
|
<string name="category_music">Music</string>
|
||||||
<string name="category_regional">Regional</string>
|
<string name="category_regional">Regional</string>
|
||||||
<string name="category_tech">Tech</string>
|
<string name="category_tech">Tech</string>
|
||||||
<string name="confirm_email_title">One last thing</string>
|
<string name="confirm_email_title">Check Your Inbox</string>
|
||||||
<string name="confirm_email_subtitle">Tap the link we emailed to you to verify your account.</string>
|
<!-- %s is the email address -->
|
||||||
|
<string name="confirm_email_subtitle">Tap the link we sent you to verify %s. We\'ll wait right here.</string>
|
||||||
|
<string name="confirm_email_didnt_get">Didn\'t get a link?</string>
|
||||||
<string name="resend">Resend</string>
|
<string name="resend">Resend</string>
|
||||||
<string name="open_email_app">Open email app</string>
|
<string name="open_email_app">Open email app</string>
|
||||||
<string name="resent_email">Confirmation email sent</string>
|
<string name="resent_email">Confirmation email sent</string>
|
||||||
@@ -291,7 +294,7 @@
|
|||||||
<string name="open_in_browser">Open in browser</string>
|
<string name="open_in_browser">Open in browser</string>
|
||||||
<string name="hide_boosts_from_user">Hide reblogs from %s</string>
|
<string name="hide_boosts_from_user">Hide reblogs from %s</string>
|
||||||
<string name="show_boosts_from_user">Show reblogs from %s</string>
|
<string name="show_boosts_from_user">Show reblogs from %s</string>
|
||||||
<string name="signup_reason">why do you want to join?</string>
|
<string name="signup_reason">Why do you want to join?</string>
|
||||||
<string name="signup_reason_note">This will help us review your application.</string>
|
<string name="signup_reason_note">This will help us review your application.</string>
|
||||||
<string name="clear">Clear</string>
|
<string name="clear">Clear</string>
|
||||||
<string name="profile_header">Header image</string>
|
<string name="profile_header">Header image</string>
|
||||||
@@ -385,7 +388,7 @@
|
|||||||
<!-- %s is file size -->
|
<!-- %s is file size -->
|
||||||
<string name="download_update">Download (%s)</string>
|
<string name="download_update">Download (%s)</string>
|
||||||
<string name="install_update">Install</string>
|
<string name="install_update">Install</string>
|
||||||
<string name="privacy_policy_title">Mastodon and your privacy</string>
|
<string name="privacy_policy_title">Your Privacy</string>
|
||||||
<string name="privacy_policy_subtitle">Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your server\'s privacy policy.</string>
|
<string name="privacy_policy_subtitle">Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your server\'s privacy policy.</string>
|
||||||
<string name="i_agree">I Agree</string>
|
<string name="i_agree">I Agree</string>
|
||||||
<string name="empty_list">This list is empty</string>
|
<string name="empty_list">This list is empty</string>
|
||||||
@@ -405,4 +408,18 @@
|
|||||||
<string name="welcome_page2_text">Your handle might be @gothgirl654@example.social, but you can still follow, reblog, and chat with @fallout5ever@example.online.</string>
|
<string name="welcome_page2_text">Your handle might be @gothgirl654@example.social, but you can still follow, reblog, and chat with @fallout5ever@example.online.</string>
|
||||||
<string name="welcome_page3_title">How do I pick a server?</string>
|
<string name="welcome_page3_title">How do I pick a server?</string>
|
||||||
<string name="welcome_page3_text">Different people choose different servers for any number of reasons. art.example is a great place for artists, while glasgow.example might be a good pick for Scots.\n\nYou can’t go wrong with any of our recommend servers, so regardless of which one you pick (or if you enter your own in the server search bar), you’ll never miss a beat anywhere.</string>
|
<string name="welcome_page3_text">Different people choose different servers for any number of reasons. art.example is a great place for artists, while glasgow.example might be a good pick for Scots.\n\nYou can’t go wrong with any of our recommend servers, so regardless of which one you pick (or if you enter your own in the server search bar), you’ll never miss a beat anywhere.</string>
|
||||||
|
<string name="signup_random_server_explain">We\'ll pick a server based on your language if you continue without making a selection.</string>
|
||||||
|
<string name="server_filter_any_language">Any Language</string>
|
||||||
|
<string name="server_filter_instant_signup">Instant Sign-up</string>
|
||||||
|
<string name="server_filter_manual_review">Manual Review</string>
|
||||||
|
<string name="server_filter_any_signup_speed">Any Sign-up Speed</string>
|
||||||
|
<string name="server_filter_region_europe">Europe</string>
|
||||||
|
<string name="server_filter_region_north_america">North America</string>
|
||||||
|
<string name="server_filter_region_south_america">South America</string>
|
||||||
|
<string name="server_filter_region_africa">Africa</string>
|
||||||
|
<string name="server_filter_region_asia">Asia</string>
|
||||||
|
<string name="server_filter_region_oceania">Oceania</string>
|
||||||
|
<string name="not_accepting_new_members">Not accepting new members</string>
|
||||||
|
<string name="category_special_interests">Special Interests</string>
|
||||||
|
<string name="signup_passwords_dont_match">Passwords don\'t match</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -41,11 +41,13 @@
|
|||||||
<string name="sk_notification_type_status">Posts</string>
|
<string name="sk_notification_type_status">Posts</string>
|
||||||
<string name="sk_notify_posts">Post notifications</string>
|
<string name="sk_notify_posts">Post notifications</string>
|
||||||
<string name="sk_settings_color_picker">Color theme</string>
|
<string name="sk_settings_color_picker">Color theme</string>
|
||||||
|
<string name="sk_color_theme_material3">System</string>
|
||||||
<string name="sk_color_theme_pink">Pink</string>
|
<string name="sk_color_theme_pink">Pink</string>
|
||||||
<string name="sk_color_theme_purple">Purple</string>
|
<string name="sk_color_theme_purple">Purple</string>
|
||||||
<string name="sk_color_theme_green">Green</string>
|
<string name="sk_color_theme_green">Green</string>
|
||||||
<string name="sk_color_theme_blue">Blue</string>
|
<string name="sk_color_theme_blue">Blue</string>
|
||||||
<string name="sk_color_theme_brown">Brown</string>
|
<string name="sk_color_theme_brown">Brown</string>
|
||||||
|
<string name="sk_color_theme_red">Red</string>
|
||||||
<string name="sk_color_theme_yellow">Yellow</string>
|
<string name="sk_color_theme_yellow">Yellow</string>
|
||||||
<string name="sk_poll_allow_multiple">Allow multiple choices</string>
|
<string name="sk_poll_allow_multiple">Allow multiple choices</string>
|
||||||
<string name="sk_translate_post">Translate</string>
|
<string name="sk_translate_post">Translate</string>
|
||||||
@@ -59,4 +61,5 @@
|
|||||||
<string name="sk_welcome_title">Welcome!</string>
|
<string name="sk_welcome_title">Welcome!</string>
|
||||||
<string name="sk_welcome_text">The shark salutes you! To get started, please enter your home instance’s domain name below.</string>
|
<string name="sk_welcome_text">The shark salutes you! To get started, please enter your home instance’s domain name below.</string>
|
||||||
<string name="sk_example_domain">example.social</string>
|
<string name="sk_example_domain">example.social</string>
|
||||||
</resources>
|
<string name="sk_app_username" translatable="false">\@megalodon</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
@@ -38,6 +38,27 @@
|
|||||||
<item name="colorAccentLightest">@color/primary_100</item>
|
<item name="colorAccentLightest">@color/primary_100</item>
|
||||||
<item name="profileHeaderBackground">@color/gray_500</item>
|
<item name="profileHeaderBackground">@color/gray_500</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
<item name="buttonBackground">@drawable/bg_button_primary_dark_on_light</item>
|
<item name="buttonBackground">@drawable/bg_button_primary_dark_on_light</item>
|
||||||
<item name="android:editTextBackground">@drawable/bg_edittext_light</item>
|
<item name="android:editTextBackground">@drawable/bg_edittext_light</item>
|
||||||
|
|
||||||
@@ -68,6 +89,10 @@
|
|||||||
<item name="colorM3Outline">@color/m3_sys_light_outline</item>
|
<item name="colorM3Outline">@color/m3_sys_light_outline</item>
|
||||||
<item name="colorM3DisabledBackground">#1F1F1F1F</item>
|
<item name="colorM3DisabledBackground">#1F1F1F1F</item>
|
||||||
<item name="colorM3PressedOverlay">@color/m3_sys_light_on_primary</item>
|
<item name="colorM3PressedOverlay">@color/m3_sys_light_on_primary</item>
|
||||||
|
<item name="colorM3Error">#B3261E</item>
|
||||||
|
<item name="colorM3OnError">#FFF</item>
|
||||||
|
<item name="colorM3ErrorContainer">#F9DEDC</item>
|
||||||
|
<item name="colorM3OnErrorContainer">#410E0B</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -111,6 +136,27 @@
|
|||||||
<item name="colorSearchField">@color/gray_700</item>
|
<item name="colorSearchField">@color/gray_700</item>
|
||||||
<item name="colorSearchHint">@color/gray_300</item>
|
<item name="colorSearchHint">@color/gray_300</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/gray_400</item>
|
||||||
|
|
||||||
<item name="buttonBackground">@drawable/bg_button_primary_light_on_dark</item>
|
<item name="buttonBackground">@drawable/bg_button_primary_light_on_dark</item>
|
||||||
<item name="android:editTextBackground">@drawable/bg_edittext_dark</item>
|
<item name="android:editTextBackground">@drawable/bg_edittext_dark</item>
|
||||||
|
|
||||||
@@ -141,6 +187,10 @@
|
|||||||
<item name="colorM3Outline">@color/m3_sys_dark_outline</item>
|
<item name="colorM3Outline">@color/m3_sys_dark_outline</item>
|
||||||
<item name="colorM3DisabledBackground">#1FE3E3E3</item>
|
<item name="colorM3DisabledBackground">#1FE3E3E3</item>
|
||||||
<item name="colorM3PressedOverlay">@color/m3_sys_dark_primary</item>
|
<item name="colorM3PressedOverlay">@color/m3_sys_dark_primary</item>
|
||||||
|
<item name="colorM3Error">#F2B8B5</item>
|
||||||
|
<item name="colorM3OnError">#601410</item>
|
||||||
|
<item name="colorM3ErrorContainer">#8C1D18</item>
|
||||||
|
<item name="colorM3OnErrorContainer">#F9DEDC</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack">
|
<style name="Theme.Mastodon.Dark.TrueBlack">
|
||||||
@@ -157,6 +207,7 @@
|
|||||||
<item name="colorWindowBackground">@color/black</item>
|
<item name="colorWindowBackground">@color/black</item>
|
||||||
|
|
||||||
<item name="colorM3Background">#000</item>
|
<item name="colorM3Background">#000</item>
|
||||||
|
<!-- <item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_900</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.AutoLightDark" parent="Theme.Mastodon.Light"/>
|
<style name="Theme.Mastodon.AutoLightDark" parent="Theme.Mastodon.Light"/>
|
||||||
@@ -164,37 +215,37 @@
|
|||||||
|
|
||||||
<style name="Theme.Mastodon.Light.CustomBase" parent="Theme.Mastodon.Light">
|
<style name="Theme.Mastodon.Light.CustomBase" parent="Theme.Mastodon.Light">
|
||||||
<!-- needed to disable scrim on API 29+ -->
|
<!-- needed to disable scrim on API 29+ -->
|
||||||
<item name="android:colorPrimary">@color/custom_gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_500</item>
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
<item name="colorDarkIcon">@color/custom_gray_900</item>
|
<item name="colorDarkIcon">@color/gray_900</item>
|
||||||
<item name="colorSearchHint">@color/custom_gray_600</item>
|
<item name="colorSearchHint">@color/gray_600</item>
|
||||||
<item name="profileHeaderBackground">@color/custom_gray_500</item>
|
<item name="profileHeaderBackground">@color/gray_500</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.CustomBase" parent="Theme.Mastodon.Dark">
|
<style name="Theme.Mastodon.Dark.CustomBase" parent="Theme.Mastodon.Dark">
|
||||||
<!-- needed to disable scrim on API 29+ -->
|
<!-- needed to disable scrim on API 29+ -->
|
||||||
<item name="android:colorBackground">@color/custom_gray_700</item>
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
<item name="colorButtonText">@color/custom_gray_800</item>
|
<item name="colorButtonText">@color/gray_800</item>
|
||||||
<item name="colorBackgroundLight">@color/custom_gray_700</item>
|
<item name="colorBackgroundLight">@color/gray_700</item>
|
||||||
<item name="colorBackgroundLightest">@color/custom_gray_900</item>
|
<item name="colorBackgroundLightest">@color/gray_900</item>
|
||||||
<item name="colorBackgroundPopup">@color/custom_gray_900</item>
|
<item name="colorBackgroundPopup">@color/gray_900</item>
|
||||||
<item name="colorDarkIcon">@color/gray_25</item>
|
<item name="colorDarkIcon">@color/gray_25</item>
|
||||||
<item name="colorWindowBackground">@color/custom_gray_800</item>
|
<item name="colorWindowBackground">@color/gray_800</item>
|
||||||
<item name="android:statusBarColor">@color/custom_gray_800</item>
|
<item name="android:statusBarColor">@color/gray_800</item>
|
||||||
<item name="android:navigationBarColor">@color/custom_gray_800</item>
|
<item name="android:navigationBarColor">@color/gray_800</item>
|
||||||
<item name="colorPollVoted">@color/custom_gray_600</item>
|
<item name="colorPollVoted">@color/gray_600</item>
|
||||||
<item name="profileHeaderBackground">?colorWindowBackground</item>
|
<item name="profileHeaderBackground">?colorWindowBackground</item>
|
||||||
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.Dark.CustomBase</item>
|
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.Dark.CustomBase</item>
|
||||||
|
|
||||||
<!-- TODO dark colors -->
|
<!-- TODO dark colors -->
|
||||||
<item name="colorSearchField">@color/custom_gray_700</item>
|
<item name="colorSearchField">@color/gray_700</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack.CustomBase">
|
<style name="Theme.Mastodon.Dark.TrueBlack.CustomBase">
|
||||||
<item name="colorPollVoted">@color/custom_gray_800</item>
|
<item name="colorPollVoted">@color/gray_800</item>
|
||||||
<item name="colorSearchField">@color/custom_gray_900</item>
|
<item name="colorSearchField">@color/gray_900</item>
|
||||||
<item name="colorBackgroundPopup">@color/custom_gray_900</item>
|
<item name="colorBackgroundPopup">@color/gray_900</item>
|
||||||
<item name="android:navigationBarColor">@color/black</item>
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
<item name="android:colorBackground">@color/black</item>
|
<item name="android:colorBackground">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/black</item>
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
@@ -205,6 +256,166 @@
|
|||||||
<item name="colorBackgroundLightest">@color/black</item>
|
<item name="colorBackgroundLightest">@color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Light.Material3" parent="Theme.Mastodon.Light">
|
||||||
|
<!-- needed to disable scrim on API 29+ -->
|
||||||
|
<item name="android:colorPrimary">@color/m3_gray_800</item>
|
||||||
|
<item name="android:textColorPrimary">@color/m3_gray_800</item>
|
||||||
|
<item name="android:textColorSecondary">@color/m3_gray_500</item>
|
||||||
|
<item name="colorDarkIcon">@color/m3_gray_900</item>
|
||||||
|
<item name="colorSearchHint">@color/m3_gray_700</item>
|
||||||
|
<item name="profileHeaderBackground">@color/m3_gray_500</item>
|
||||||
|
|
||||||
|
<item name="android:colorAccent">@color/m3_primary_700</item>
|
||||||
|
<item name="android:colorBackground">@color/m3_gray_50</item>
|
||||||
|
<item name="colorButtonText">@color/m3_gray_50</item>
|
||||||
|
<item name="colorBackgroundLight">@color/m3_gray_50</item>
|
||||||
|
<item name="colorBackgroundLightest">@color/m3_gray_25</item>
|
||||||
|
<item name="android:statusBarColor">@color/m3_gray_50</item>
|
||||||
|
<item name="android:navigationBarColor">@color/m3_navigation_bar_bg</item>
|
||||||
|
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.M3</item>
|
||||||
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.M3</item>
|
||||||
|
<item name="colorPollMostVoted">@color/m3_primary_500</item>
|
||||||
|
<item name="colorPollVoted">@color/m3_gray_200</item>
|
||||||
|
<item name="colorAccentLight">@color/m3_primary_600</item>
|
||||||
|
<item name="colorSearchField">@color/m3_gray_100</item>
|
||||||
|
<item name="colorTabInactive">@color/m3_gray_400</item>
|
||||||
|
<item name="colorAccentLightest">@color/m3_primary_100</item>
|
||||||
|
<item name="colorSecondary">@color/m3_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/m3_gray_200</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/m3_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/m3_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/m3_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/m3_gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/m3_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/m3_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/m3_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/m3_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/m3_gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/m3_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/m3_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/m3_gray_400</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dark.Material3" parent="Theme.Mastodon.Dark">
|
||||||
|
<!-- needed to disable scrim on API 29+ -->
|
||||||
|
<item name="android:colorBackground">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonText">@color/m3_gray_800</item>
|
||||||
|
<item name="colorBackgroundLight">@color/m3_gray_800</item>
|
||||||
|
<item name="colorBackgroundLightest">@color/m3_gray_900</item>
|
||||||
|
<item name="colorBackgroundPopup">@color/m3_gray_900</item>
|
||||||
|
<item name="colorDarkIcon">@color/gray_25</item>
|
||||||
|
<item name="colorWindowBackground">@color/m3_gray_900</item>
|
||||||
|
<item name="android:statusBarColor">@color/m3_gray_900</item>
|
||||||
|
<item name="android:navigationBarColor">@color/m3_gray_900</item>
|
||||||
|
<item name="colorPollVoted">@color/m3_gray_700</item>
|
||||||
|
<item name="profileHeaderBackground">?colorWindowBackground</item>
|
||||||
|
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.Dark.Material3</item>
|
||||||
|
|
||||||
|
<item name="android:colorAccent">@color/m3_primary_400</item>
|
||||||
|
<item name="android:colorPrimary">@color/m3_gray_50</item>
|
||||||
|
<item name="android:textColorPrimary">@color/m3_gray_50</item>
|
||||||
|
<item name="android:textColorSecondary">@color/m3_gray_400</item>
|
||||||
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.Dark.M3</item>
|
||||||
|
<item name="colorPollMostVoted">@color/m3_primary_700</item>
|
||||||
|
<item name="colorAccentLight">@color/m3_primary_600</item>
|
||||||
|
<item name="colorAccentLightest">@color/m3_primary_800</item>
|
||||||
|
<item name="colorTabInactive">@color/m3_gray_400</item>
|
||||||
|
<item name="colorSearchHint">@color/m3_gray_300</item>
|
||||||
|
<item name="colorSecondary">@color/m3_gray_50</item>
|
||||||
|
|
||||||
|
<!-- TODO dark colors -->
|
||||||
|
<item name="colorSearchField">@color/m3_gray_700</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/m3_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/m3_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/m3_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/m3_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/m3_gray_700</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/m3_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/m3_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/m3_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/m3_gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/m3_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/m3_gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/m3_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/m3_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/m3_gray_400</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dark.TrueBlack.Material3" parent="Theme.Mastodon.Dark.Material3">
|
||||||
|
<item name="android:colorAccent">@color/m3_primary_400</item>
|
||||||
|
<item name="colorPollMostVoted">@color/m3_primary_700</item>
|
||||||
|
<item name="colorAccentLight">@color/m3_primary_600</item>
|
||||||
|
<item name="colorAccentLightest">@color/m3_primary_800</item>
|
||||||
|
<item name="colorSecondary">@color/m3_gray_50</item>
|
||||||
|
|
||||||
|
<item name="colorPollVoted">@color/m3_gray_800</item>
|
||||||
|
<item name="colorSearchField">@color/m3_gray_900</item>
|
||||||
|
<item name="colorBackgroundPopup">@color/m3_gray_900</item>
|
||||||
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
|
<item name="android:colorBackground">@color/black</item>
|
||||||
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
|
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.Dark.TrueBlack</item>
|
||||||
|
<item name="colorBackgroundLight">@color/black</item>
|
||||||
|
<item name="colorWindowBackground">@color/black</item>
|
||||||
|
<item name="colorButtonText">@color/black</item>
|
||||||
|
<item name="colorBackgroundLightest">@color/black</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/m3_gray_900</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.Material3" parent="Theme.Mastodon.Light.Material3"/>
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Material3" parent="Theme.Mastodon.Light.Material3"/>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dialog.Alert.Dark.M3" parent="android:Theme.Material.Dialog.Alert">
|
||||||
|
<item name="android:windowTitleStyle">@style/alert_title</item>
|
||||||
|
<item name="android:dialogPreferredPadding">24dp</item>
|
||||||
|
<item name="android:windowBackground">@drawable/bg_alert</item>
|
||||||
|
<item name="android:buttonBarButtonStyle">@style/Widget.Mastodon.ButtonBarButton</item>
|
||||||
|
|
||||||
|
<!-- colors -->
|
||||||
|
<item name="android:colorAccent">@color/m3_primary_600</item>
|
||||||
|
<item name="android:colorPrimary">@color/m3_gray_50</item>
|
||||||
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
|
<item name="android:textColorPrimary">@color/m3_gray_50</item>
|
||||||
|
<item name="android:textColorSecondary">@color/m3_gray_400</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dialog.Alert.M3" parent="android:Theme.Material.Light.Dialog.Alert">
|
||||||
|
<item name="android:windowTitleStyle">@style/alert_title</item>
|
||||||
|
<item name="android:dialogPreferredPadding">24dp</item>
|
||||||
|
<item name="android:windowBackground">@drawable/bg_alert</item>
|
||||||
|
<item name="android:buttonBarButtonStyle">@style/Widget.Mastodon.ButtonBarButton</item>
|
||||||
|
|
||||||
|
<!-- colors -->
|
||||||
|
<item name="android:colorAccent">@color/m3_primary_700</item>
|
||||||
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
|
<item name="android:colorBackground">@color/m3_gray_100</item>
|
||||||
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Toolbar.M3" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
|
<item name="android:colorPrimary">@color/m3_gray_50</item>
|
||||||
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
|
<item name="android:textColorSecondary">@color/gray_800</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Light.Green" parent="Theme.Mastodon.Light.CustomBase">
|
<style name="Theme.Mastodon.Light.Green" parent="Theme.Mastodon.Light.CustomBase">
|
||||||
<item name="android:colorAccent">@color/green_primary_700</item>
|
<item name="android:colorAccent">@color/green_primary_700</item>
|
||||||
<item name="android:colorBackground">@color/green_gray_100</item>
|
<item name="android:colorBackground">@color/green_gray_100</item>
|
||||||
@@ -222,6 +433,27 @@
|
|||||||
<item name="colorTabInactive">@color/green_gray_400</item>
|
<item name="colorTabInactive">@color/green_gray_400</item>
|
||||||
<item name="colorAccentLightest">@color/green_primary_100</item>
|
<item name="colorAccentLightest">@color/green_primary_100</item>
|
||||||
<item name="colorSecondary">@color/green_gray_50</item>
|
<item name="colorSecondary">@color/green_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/green_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/green_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/green_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/green_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/green_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/green_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/green_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/green_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/green_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/green_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/green_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.Green" parent="Theme.Mastodon.Dark.CustomBase">
|
<style name="Theme.Mastodon.Dark.Green" parent="Theme.Mastodon.Dark.CustomBase">
|
||||||
@@ -236,6 +468,27 @@
|
|||||||
<item name="colorTabInactive">@color/green_gray_400</item>
|
<item name="colorTabInactive">@color/green_gray_400</item>
|
||||||
<item name="colorSearchHint">@color/green_gray_300</item>
|
<item name="colorSearchHint">@color/green_gray_300</item>
|
||||||
<item name="colorSecondary">@color/green_gray_50</item>
|
<item name="colorSecondary">@color/green_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/green_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/green_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/green_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/green_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/green_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/green_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/green_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/green_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/green_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/green_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/green_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack.Green" parent="Theme.Mastodon.Dark.Green">
|
<style name="Theme.Mastodon.Dark.TrueBlack.Green" parent="Theme.Mastodon.Dark.Green">
|
||||||
@@ -245,9 +498,9 @@
|
|||||||
<item name="colorAccentLightest">@color/green_primary_800</item>
|
<item name="colorAccentLightest">@color/green_primary_800</item>
|
||||||
<item name="colorSecondary">@color/green_gray_50</item>
|
<item name="colorSecondary">@color/green_gray_50</item>
|
||||||
|
|
||||||
<item name="colorPollVoted">@color/custom_gray_800</item>
|
<item name="colorPollVoted">@color/gray_800</item>
|
||||||
<item name="colorSearchField">@color/custom_gray_900</item>
|
<item name="colorSearchField">@color/gray_900</item>
|
||||||
<item name="colorBackgroundPopup">@color/custom_gray_900</item>
|
<item name="colorBackgroundPopup">@color/gray_900</item>
|
||||||
<item name="android:navigationBarColor">@color/black</item>
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
<item name="android:colorBackground">@color/black</item>
|
<item name="android:colorBackground">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/black</item>
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
@@ -270,7 +523,7 @@
|
|||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/green_primary_600</item>
|
<item name="android:colorAccent">@color/green_primary_600</item>
|
||||||
<item name="android:colorPrimary">@color/green_gray_50</item>
|
<item name="android:colorPrimary">@color/green_gray_50</item>
|
||||||
<item name="android:colorBackground">@color/custom_gray_700</item>
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
<item name="android:textColorPrimary">@color/green_gray_50</item>
|
<item name="android:textColorPrimary">@color/green_gray_50</item>
|
||||||
<item name="android:textColorSecondary">@color/green_gray_400</item>
|
<item name="android:textColorSecondary">@color/green_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -283,16 +536,16 @@
|
|||||||
|
|
||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/green_primary_700</item>
|
<item name="android:colorAccent">@color/green_primary_700</item>
|
||||||
<item name="android:colorPrimary">@color/custom_gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:colorBackground">@color/green_gray_100</item>
|
<item name="android:colorBackground">@color/green_gray_100</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_500</item>
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Green" parent="android:ThemeOverlay.Material.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Green" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/green_gray_50</item>
|
<item name="android:colorPrimary">@color/green_gray_50</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_800</item>
|
<item name="android:textColorSecondary">@color/gray_800</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -313,6 +566,27 @@
|
|||||||
<item name="colorTabInactive">@color/blue_gray_400</item>
|
<item name="colorTabInactive">@color/blue_gray_400</item>
|
||||||
<item name="colorAccentLightest">@color/blue_primary_100</item>
|
<item name="colorAccentLightest">@color/blue_primary_100</item>
|
||||||
<item name="colorSecondary">@color/blue_gray_50</item>
|
<item name="colorSecondary">@color/blue_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/blue_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/blue_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/blue_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/blue_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/blue_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/blue_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/blue_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/blue_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/blue_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/blue_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/blue_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.Blue" parent="Theme.Mastodon.Dark.CustomBase">
|
<style name="Theme.Mastodon.Dark.Blue" parent="Theme.Mastodon.Dark.CustomBase">
|
||||||
@@ -327,6 +601,27 @@
|
|||||||
<item name="colorTabInactive">@color/blue_gray_400</item>
|
<item name="colorTabInactive">@color/blue_gray_400</item>
|
||||||
<item name="colorSearchHint">@color/blue_gray_300</item>
|
<item name="colorSearchHint">@color/blue_gray_300</item>
|
||||||
<item name="colorSecondary">@color/blue_gray_50</item>
|
<item name="colorSecondary">@color/blue_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/blue_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/blue_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/blue_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/blue_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/blue_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/blue_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/blue_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/blue_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/blue_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/blue_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/blue_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack.Blue" parent="Theme.Mastodon.Dark.Blue">
|
<style name="Theme.Mastodon.Dark.TrueBlack.Blue" parent="Theme.Mastodon.Dark.Blue">
|
||||||
@@ -336,9 +631,9 @@
|
|||||||
<item name="colorAccentLightest">@color/blue_primary_800</item>
|
<item name="colorAccentLightest">@color/blue_primary_800</item>
|
||||||
<item name="colorSecondary">@color/blue_gray_50</item>
|
<item name="colorSecondary">@color/blue_gray_50</item>
|
||||||
|
|
||||||
<item name="colorPollVoted">@color/custom_gray_800</item>
|
<item name="colorPollVoted">@color/gray_800</item>
|
||||||
<item name="colorSearchField">@color/custom_gray_900</item>
|
<item name="colorSearchField">@color/gray_900</item>
|
||||||
<item name="colorBackgroundPopup">@color/custom_gray_900</item>
|
<item name="colorBackgroundPopup">@color/gray_900</item>
|
||||||
<item name="android:navigationBarColor">@color/black</item>
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
<item name="android:colorBackground">@color/black</item>
|
<item name="android:colorBackground">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/black</item>
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
@@ -361,7 +656,7 @@
|
|||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/blue_primary_600</item>
|
<item name="android:colorAccent">@color/blue_primary_600</item>
|
||||||
<item name="android:colorPrimary">@color/blue_gray_50</item>
|
<item name="android:colorPrimary">@color/blue_gray_50</item>
|
||||||
<item name="android:colorBackground">@color/custom_gray_700</item>
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
<item name="android:textColorPrimary">@color/blue_gray_50</item>
|
<item name="android:textColorPrimary">@color/blue_gray_50</item>
|
||||||
<item name="android:textColorSecondary">@color/blue_gray_400</item>
|
<item name="android:textColorSecondary">@color/blue_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -374,16 +669,16 @@
|
|||||||
|
|
||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/blue_primary_700</item>
|
<item name="android:colorAccent">@color/blue_primary_700</item>
|
||||||
<item name="android:colorPrimary">@color/custom_gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:colorBackground">@color/blue_gray_100</item>
|
<item name="android:colorBackground">@color/blue_gray_100</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_500</item>
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Blue" parent="android:ThemeOverlay.Material.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Blue" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/blue_gray_50</item>
|
<item name="android:colorPrimary">@color/blue_gray_50</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_800</item>
|
<item name="android:textColorSecondary">@color/gray_800</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Light.Brown" parent="Theme.Mastodon.Light.CustomBase">
|
<style name="Theme.Mastodon.Light.Brown" parent="Theme.Mastodon.Light.CustomBase">
|
||||||
@@ -403,6 +698,27 @@
|
|||||||
<item name="colorTabInactive">@color/brown_gray_400</item>
|
<item name="colorTabInactive">@color/brown_gray_400</item>
|
||||||
<item name="colorAccentLightest">@color/brown_primary_100</item>
|
<item name="colorAccentLightest">@color/brown_primary_100</item>
|
||||||
<item name="colorSecondary">@color/brown_gray_50</item>
|
<item name="colorSecondary">@color/brown_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/brown_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/brown_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/brown_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/brown_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/brown_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/brown_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/brown_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/brown_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/brown_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/brown_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/brown_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.Brown" parent="Theme.Mastodon.Dark.CustomBase">
|
<style name="Theme.Mastodon.Dark.Brown" parent="Theme.Mastodon.Dark.CustomBase">
|
||||||
@@ -417,6 +733,27 @@
|
|||||||
<item name="colorTabInactive">@color/brown_gray_400</item>
|
<item name="colorTabInactive">@color/brown_gray_400</item>
|
||||||
<item name="colorSearchHint">@color/brown_gray_300</item>
|
<item name="colorSearchHint">@color/brown_gray_300</item>
|
||||||
<item name="colorSecondary">@color/brown_gray_50</item>
|
<item name="colorSecondary">@color/brown_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/brown_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/brown_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/brown_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/brown_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/brown_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/brown_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/brown_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/brown_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/brown_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/brown_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/brown_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack.Brown" parent="Theme.Mastodon.Dark.Brown">
|
<style name="Theme.Mastodon.Dark.TrueBlack.Brown" parent="Theme.Mastodon.Dark.Brown">
|
||||||
@@ -426,9 +763,9 @@
|
|||||||
<item name="colorAccentLightest">@color/brown_primary_800</item>
|
<item name="colorAccentLightest">@color/brown_primary_800</item>
|
||||||
<item name="colorSecondary">@color/brown_gray_50</item>
|
<item name="colorSecondary">@color/brown_gray_50</item>
|
||||||
|
|
||||||
<item name="colorPollVoted">@color/custom_gray_800</item>
|
<item name="colorPollVoted">@color/gray_800</item>
|
||||||
<item name="colorSearchField">@color/custom_gray_900</item>
|
<item name="colorSearchField">@color/gray_900</item>
|
||||||
<item name="colorBackgroundPopup">@color/custom_gray_900</item>
|
<item name="colorBackgroundPopup">@color/gray_900</item>
|
||||||
<item name="android:navigationBarColor">@color/black</item>
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
<item name="android:colorBackground">@color/black</item>
|
<item name="android:colorBackground">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/black</item>
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
@@ -451,7 +788,7 @@
|
|||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/brown_primary_600</item>
|
<item name="android:colorAccent">@color/brown_primary_600</item>
|
||||||
<item name="android:colorPrimary">@color/brown_gray_50</item>
|
<item name="android:colorPrimary">@color/brown_gray_50</item>
|
||||||
<item name="android:colorBackground">@color/custom_gray_700</item>
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
<item name="android:textColorPrimary">@color/brown_gray_50</item>
|
<item name="android:textColorPrimary">@color/brown_gray_50</item>
|
||||||
<item name="android:textColorSecondary">@color/brown_gray_400</item>
|
<item name="android:textColorSecondary">@color/brown_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -464,16 +801,16 @@
|
|||||||
|
|
||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/brown_primary_700</item>
|
<item name="android:colorAccent">@color/brown_primary_700</item>
|
||||||
<item name="android:colorPrimary">@color/custom_gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:colorBackground">@color/brown_gray_100</item>
|
<item name="android:colorBackground">@color/brown_gray_100</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_500</item>
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Brown" parent="android:ThemeOverlay.Material.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Brown" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/brown_gray_50</item>
|
<item name="android:colorPrimary">@color/brown_gray_50</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_800</item>
|
<item name="android:textColorSecondary">@color/gray_800</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -494,6 +831,27 @@
|
|||||||
<item name="colorTabInactive">@color/yellow_gray_400</item>
|
<item name="colorTabInactive">@color/yellow_gray_400</item>
|
||||||
<item name="colorAccentLightest">@color/yellow_primary_100</item>
|
<item name="colorAccentLightest">@color/yellow_primary_100</item>
|
||||||
<item name="colorSecondary">@color/yellow_gray_50</item>
|
<item name="colorSecondary">@color/yellow_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/yellow_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/yellow_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/yellow_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/yellow_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/yellow_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/yellow_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/yellow_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/yellow_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/yellow_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/yellow_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/yellow_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.Yellow" parent="Theme.Mastodon.Dark.CustomBase">
|
<style name="Theme.Mastodon.Dark.Yellow" parent="Theme.Mastodon.Dark.CustomBase">
|
||||||
@@ -508,6 +866,27 @@
|
|||||||
<item name="colorTabInactive">@color/yellow_gray_400</item>
|
<item name="colorTabInactive">@color/yellow_gray_400</item>
|
||||||
<item name="colorSearchHint">@color/yellow_gray_300</item>
|
<item name="colorSearchHint">@color/yellow_gray_300</item>
|
||||||
<item name="colorSecondary">@color/yellow_gray_50</item>
|
<item name="colorSecondary">@color/yellow_gray_50</item>
|
||||||
|
|
||||||
|
<!-- colors for button_bg|text_primary|secondary_dark|light_on_light|dark.xml -->
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryDarkOnLightDisabled">@color/yellow_gray_300</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLight">@color/yellow_gray_50</item>
|
||||||
|
<item name="colorButtonTextPrimaryDarkOnLightDisabled">@color/yellow_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDark">@color/yellow_gray_100</item>
|
||||||
|
<item name="colorButtonBackgroundPrimaryLightOnDarkDisabled">@color/gray_500</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDark">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextPrimaryLightOnDarkDisabled">@color/yellow_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLight">@color/yellow_gray_25</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryDarkOnLightDisabled">@color/yellow_gray_100</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLight">@color/gray_800</item>
|
||||||
|
<item name="colorButtonTextSecondaryDarkOnLightDisabled">@color/yellow_gray_400</item>
|
||||||
|
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDark">@color/gray_600</item>
|
||||||
|
<item name="colorButtonBackgroundSecondaryLightOnDarkDisabled">@color/yellow_gray_300</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDark">@color/yellow_gray_50</item>
|
||||||
|
<item name="colorButtonTextSecondaryLightOnDarkDisabled">@color/yellow_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack.Yellow" parent="Theme.Mastodon.Dark.Yellow">
|
<style name="Theme.Mastodon.Dark.TrueBlack.Yellow" parent="Theme.Mastodon.Dark.Yellow">
|
||||||
@@ -517,9 +896,9 @@
|
|||||||
<item name="colorAccentLightest">@color/yellow_primary_800</item>
|
<item name="colorAccentLightest">@color/yellow_primary_800</item>
|
||||||
<item name="colorSecondary">@color/yellow_gray_50</item>
|
<item name="colorSecondary">@color/yellow_gray_50</item>
|
||||||
|
|
||||||
<item name="colorPollVoted">@color/custom_gray_800</item>
|
<item name="colorPollVoted">@color/gray_800</item>
|
||||||
<item name="colorSearchField">@color/custom_gray_900</item>
|
<item name="colorSearchField">@color/gray_900</item>
|
||||||
<item name="colorBackgroundPopup">@color/custom_gray_900</item>
|
<item name="colorBackgroundPopup">@color/gray_900</item>
|
||||||
<item name="android:navigationBarColor">@color/black</item>
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
<item name="android:colorBackground">@color/black</item>
|
<item name="android:colorBackground">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/black</item>
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
@@ -542,7 +921,7 @@
|
|||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/yellow_primary_600</item>
|
<item name="android:colorAccent">@color/yellow_primary_600</item>
|
||||||
<item name="android:colorPrimary">@color/yellow_gray_50</item>
|
<item name="android:colorPrimary">@color/yellow_gray_50</item>
|
||||||
<item name="android:colorBackground">@color/custom_gray_700</item>
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
<item name="android:textColorPrimary">@color/yellow_gray_50</item>
|
<item name="android:textColorPrimary">@color/yellow_gray_50</item>
|
||||||
<item name="android:textColorSecondary">@color/yellow_gray_400</item>
|
<item name="android:textColorSecondary">@color/yellow_gray_400</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -555,24 +934,50 @@
|
|||||||
|
|
||||||
<!-- colors -->
|
<!-- colors -->
|
||||||
<item name="android:colorAccent">@color/yellow_primary_700</item>
|
<item name="android:colorAccent">@color/yellow_primary_700</item>
|
||||||
<item name="android:colorPrimary">@color/custom_gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:colorBackground">@color/yellow_gray_100</item>
|
<item name="android:colorBackground">@color/yellow_gray_100</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_500</item>
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Yellow" parent="android:ThemeOverlay.Material.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Yellow" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/yellow_gray_50</item>
|
<item name="android:colorPrimary">@color/yellow_gray_50</item>
|
||||||
<item name="android:textColorPrimary">@color/custom_gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/custom_gray_800</item>
|
<item name="android:textColorSecondary">@color/gray_800</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dark.Red" parent="Theme.Mastodon.Dark">
|
||||||
|
<item name="android:colorAccent">@color/error_400</item>
|
||||||
|
<item name="colorPollMostVoted">@color/error_700</item>
|
||||||
|
<item name="colorAccentLight">@color/error_600</item>
|
||||||
|
<item name="colorAccentLightest">@color/error_800</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dark.TrueBlack.Red" parent="Theme.Mastodon.Dark.TrueBlack">
|
||||||
|
<item name="android:colorAccent">@color/error_400</item>
|
||||||
|
<item name="colorPollMostVoted">@color/error_700</item>
|
||||||
|
<item name="colorAccentLight">@color/error_600</item>
|
||||||
|
<item name="colorAccentLightest">@color/error_800</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Light.Red" parent="Theme.Mastodon.Light">
|
||||||
|
<item name="android:colorAccent">@color/error_700</item>
|
||||||
|
<item name="colorPollMostVoted">@color/error_800</item>
|
||||||
|
<item name="colorAccentLight">@color/error_600</item>
|
||||||
|
<item name="colorAccentLightest">@color/error_800</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.Red" parent="Theme.Mastodon.Light.Red"/>
|
||||||
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Red" parent="Theme.Mastodon.Light.Red"/>
|
||||||
|
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.Original" parent="Theme.Mastodon.Dark">
|
<style name="Theme.Mastodon.Dark.Original" parent="Theme.Mastodon.Dark">
|
||||||
<item name="android:colorAccent">@color/original_primary_400</item>
|
<item name="android:colorAccent">@color/original_primary_400</item>
|
||||||
<item name="colorPollMostVoted">@color/original_primary_700</item>
|
<item name="colorPollMostVoted">@color/original_primary_700</item>
|
||||||
<item name="colorAccentLight">@color/original_primary_600</item>
|
<item name="colorAccentLight">@color/original_primary_600</item>
|
||||||
<item name="colorAccentLightest">@color/original_primary_800</item>
|
<item name="colorAccentLightest">@color/original_primary_800</item>
|
||||||
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.Dark.Original</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack.Original" parent="Theme.Mastodon.Dark.TrueBlack">
|
<style name="Theme.Mastodon.Dark.TrueBlack.Original" parent="Theme.Mastodon.Dark.TrueBlack">
|
||||||
@@ -580,6 +985,7 @@
|
|||||||
<item name="colorPollMostVoted">@color/original_primary_700</item>
|
<item name="colorPollMostVoted">@color/original_primary_700</item>
|
||||||
<item name="colorAccentLight">@color/original_primary_600</item>
|
<item name="colorAccentLight">@color/original_primary_600</item>
|
||||||
<item name="colorAccentLightest">@color/original_primary_800</item>
|
<item name="colorAccentLightest">@color/original_primary_800</item>
|
||||||
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.Dark.Original</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Light.Original" parent="Theme.Mastodon.Light">
|
<style name="Theme.Mastodon.Light.Original" parent="Theme.Mastodon.Light">
|
||||||
@@ -587,17 +993,45 @@
|
|||||||
<item name="colorPollMostVoted">@color/original_primary_700</item>
|
<item name="colorPollMostVoted">@color/original_primary_700</item>
|
||||||
<item name="colorAccentLight">@color/original_primary_600</item>
|
<item name="colorAccentLight">@color/original_primary_600</item>
|
||||||
<item name="colorAccentLightest">@color/original_primary_800</item>
|
<item name="colorAccentLightest">@color/original_primary_800</item>
|
||||||
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.Original</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.AutoLightDark.Original" parent="Theme.Mastodon.Light.Original"/>
|
<style name="Theme.Mastodon.AutoLightDark.Original" parent="Theme.Mastodon.Light.Original"/>
|
||||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Original" parent="Theme.Mastodon.Light.Original"/>
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Original" parent="Theme.Mastodon.Light.Original"/>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dialog.Alert.Dark.Original" parent="android:Theme.Material.Dialog.Alert">
|
||||||
|
<item name="android:windowTitleStyle">@style/alert_title</item>
|
||||||
|
<item name="android:dialogPreferredPadding">24dp</item>
|
||||||
|
<item name="android:windowBackground">@drawable/bg_alert</item>
|
||||||
|
<item name="android:buttonBarButtonStyle">@style/Widget.Mastodon.ButtonBarButton</item>
|
||||||
|
|
||||||
|
<!-- colors -->
|
||||||
|
<item name="android:colorAccent">@color/original_primary_600</item>
|
||||||
|
<item name="android:colorPrimary">@color/gray_50</item>
|
||||||
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
|
<item name="android:textColorPrimary">@color/gray_50</item>
|
||||||
|
<item name="android:textColorSecondary">@color/gray_400</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Dialog.Alert.Original" parent="android:Theme.Material.Light.Dialog.Alert">
|
||||||
|
<item name="android:windowTitleStyle">@style/alert_title</item>
|
||||||
|
<item name="android:dialogPreferredPadding">24dp</item>
|
||||||
|
<item name="android:windowBackground">@drawable/bg_alert</item>
|
||||||
|
<item name="android:buttonBarButtonStyle">@style/Widget.Mastodon.ButtonBarButton</item>
|
||||||
|
|
||||||
|
<!-- colors -->
|
||||||
|
<item name="android:colorAccent">@color/original_primary_700</item>
|
||||||
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
|
<item name="android:colorBackground">@color/gray_100</item>
|
||||||
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
|
<item name="android:textColorSecondary">@color/gray_500</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar" parent="android:ThemeOverlay.Material.ActionBar">
|
<style name="Theme.Mastodon.Toolbar" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/gray_50</item>
|
<item name="android:colorPrimary">@color/gray_50</item>
|
||||||
|
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
||||||
<item name="android:textColorPrimary">@color/gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorSecondary">@color/gray_800</item>
|
<item name="android:textColorSecondary">@color/gray_800</item>
|
||||||
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Dark" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Dark" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
||||||
@@ -607,18 +1041,18 @@
|
|||||||
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Mastodon.Toolbar" parent="android:Widget.Material.Toolbar">
|
|
||||||
<item name="android:contentInsetStartWithNavigation">0dp</item>
|
|
||||||
<item name="android:titleMarginEnd">0dp</item>
|
|
||||||
<item name="android:titleMarginStart">0dp</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Dark.CustomBase" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Dark.CustomBase" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/custom_gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:textColorPrimary">@color/gray_50</item>
|
<item name="android:textColorPrimary">@color/gray_50</item>
|
||||||
<item name="android:textColorSecondary">@color/gray_50</item>
|
<item name="android:textColorSecondary">@color/gray_50</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Mastodon.Toolbar.Dark.Material3" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
||||||
|
<item name="android:colorPrimary">@color/m3_gray_900</item>
|
||||||
|
<item name="android:textColorPrimary">@color/m3_gray_50</item>
|
||||||
|
<item name="android:textColorSecondary">@color/m3_gray_50</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Dark.TrueBlack" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
<style name="Theme.Mastodon.Toolbar.Dark.TrueBlack" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/black</item>
|
<item name="android:colorPrimary">@color/black</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -779,6 +1213,12 @@
|
|||||||
<item name="android:lineSpacingExtra">4dp</item>
|
<item name="android:lineSpacingExtra">4dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="m3_body_small">
|
||||||
|
<item name="android:textSize">12dp</item>
|
||||||
|
<item name="android:textColor">?android:textColorSecondary</item>
|
||||||
|
<item name="android:lineSpacingExtra">2dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="m3_title_medium">
|
<style name="m3_title_medium">
|
||||||
<item name="android:fontFamily">sans-serif-medium</item>
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
<item name="android:textSize">16dp</item>
|
<item name="android:textSize">16dp</item>
|
||||||
|
|||||||
5
metadata/de-DE/changelogs/61.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- Neue Farbschemata: Material You und Rot
|
||||||
|
- Neue dunkle Grautöne für alle Schemata
|
||||||
|
- Boost-Symbol nun besser auseinanderhaltbar
|
||||||
|
- Animationen für Interaktions-Buttons
|
||||||
|
- Fehlerbehebungen (Absturz bei manchen Posts, "Listen mit", Standard-Sprache für neue Beiträge)
|
||||||
@@ -9,3 +9,7 @@ Megalodon ist eine modifizierte Version der <a href="https://github.com/mastodon
|
|||||||
- <b>Hashtags folgen</b>: Bringt neue Beiträge bestimmter Hashtags direkt in deine Home-Timeline.
|
- <b>Hashtags folgen</b>: Bringt neue Beiträge bestimmter Hashtags direkt in deine Home-Timeline.
|
||||||
- <b>Folgeanfragen beantworten</b>: Folgeanfragen lassen sich nun direkt über die Benachrichtigungen-Liste oder über die Folgeanfragen-Liste akzeptieren oder ablehnen.
|
- <b>Folgeanfragen beantworten</b>: Folgeanfragen lassen sich nun direkt über die Benachrichtigungen-Liste oder über die Folgeanfragen-Liste akzeptieren oder ablehnen.
|
||||||
- <b>Beiträge löschen und neu erstellen</b>: Das beliebte Feature, das das Bearbeiten von Beiträgen ohne tatsächliche Bearbeit-Funktion möglich gemacht hat.
|
- <b>Beiträge löschen und neu erstellen</b>: Das beliebte Feature, das das Bearbeiten von Beiträgen ohne tatsächliche Bearbeit-Funktion möglich gemacht hat.
|
||||||
|
- <b>Sprachauswahl</b>: Wähle mühelos die Sprache für jeden deiner Beiträge, damit diese richtig gefiltert und übersetzt werden können.
|
||||||
|
- <b>Übersetzung</b>: Beiträge können nun direkt in Megalodon übersetzt werden – aber nur, wenn deine Instanz dies auch unterstützt.
|
||||||
|
- <b>Sichtbarkeits-Indikator</b>: Beim Öffnen oder Antworten auf einen Beitrag zeigt ein Symbol die Sichtbarkeit des Beitrags an.
|
||||||
|
- <b>Farb-Schemata</b>: Wem das Standard-Pink nicht gefällt (der Hai verurteilt dich stillschweigend), dem verschaffen die Farb-Schemata von Moshidon Abhilfe.
|
||||||
5
metadata/en-US/changelogs/61.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- New color themes: Material You and Red
|
||||||
|
- New dark gray tones for all themes
|
||||||
|
- More distinct filled boost icon
|
||||||
|
- Animations for interaction buttons
|
||||||
|
- Bugfixes (Crash on some posts, "Lists with", default posting language)
|
||||||
@@ -9,3 +9,7 @@ Megalodon is a modified version of the <a href="https://github.com/mastodon/mast
|
|||||||
- <b>Follow hashtags</b>: See new posts from specific hashtags directly in your home timeline by following them.
|
- <b>Follow hashtags</b>: See new posts from specific hashtags directly in your home timeline by following them.
|
||||||
- <b>Answering follow requests</b>: Accept or decline follow requests from your notifications or the dedicated Follow requests list.
|
- <b>Answering follow requests</b>: Accept or decline follow requests from your notifications or the dedicated Follow requests list.
|
||||||
- <b>Delete and re-draft</b>: The much-loved feature that made editing possible without an actual editing function.
|
- <b>Delete and re-draft</b>: The much-loved feature that made editing possible without an actual editing function.
|
||||||
|
- <b>Language selector</b>: Painlessly select the language for every post you make so filters and translation are working correctly.
|
||||||
|
- <b>Translation</b>: Easily translate posts right inside Megalodon! Only works if the feature is also available on your Mastodon Web.
|
||||||
|
- <b>Post visibility indicator</b>: When opening or replying to a post, a handy icon indicating the post’s visibility will be displayed.
|
||||||
|
- <b>Color themes</b>: Should you not like the default Pink color them (the shark is silently judging you), Moshidon’s color themes got you covered.
|
||||||
|
Before Width: | Height: | Size: 641 KiB After Width: | Height: | Size: 611 KiB |
|
Before Width: | Height: | Size: 767 KiB After Width: | Height: | Size: 850 KiB |
|
Before Width: | Height: | Size: 414 KiB After Width: | Height: | Size: 438 KiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 278 KiB |
BIN
metadata/en-US/images/phoneScreenshots/7.jpg
Normal file
|
After Width: | Height: | Size: 240 KiB |
@@ -1,5 +1,6 @@
|
|||||||
- Se añadió un selector de idiomas
|
- Agregado un selector de idiomas
|
||||||
- Se incluye una función para traducir
|
- Agregada una función de traducción
|
||||||
- Mejora la semántica para votar en encuestas (botones de opción y casillas)
|
- Mejorar la semántica para votar en encuestas (botones de radio y casillas de verificación)
|
||||||
- Permite votar por varias opciones en las encuestas
|
- Agregada la opción para permitir votar por múltiples opciones en las encuestas
|
||||||
- Corrige varios defectos
|
- Nueva pantalla de inicio de sesión
|
||||||
|
- Corrección de errores
|
||||||
|
|||||||
@@ -9,3 +9,7 @@ Megalodon es una versión modificada de la <a href="https://github.com/mastodon/
|
|||||||
- <b>Seguir etiquetas</b>: vea envíos etiquetados directamente en su cronología de inicio siguiéndolas.
|
- <b>Seguir etiquetas</b>: vea envíos etiquetados directamente en su cronología de inicio siguiéndolas.
|
||||||
- <b>Respuesta a solicitudes de seguimiento</b>: acepte o rechace solicitudes de seguimiento desde sus notificaciones o desde la lista dedicada.
|
- <b>Respuesta a solicitudes de seguimiento</b>: acepte o rechace solicitudes de seguimiento desde sus notificaciones o desde la lista dedicada.
|
||||||
- <b>Eliminar y reescribir</b>: la tan querida función que hizo posible editar los envíos ante la falta de una función Editar propiamente dicha.
|
- <b>Eliminar y reescribir</b>: la tan querida función que hizo posible editar los envíos ante la falta de una función Editar propiamente dicha.
|
||||||
|
- <b>Selector de idioma</b>: seleccione fácilmente el idioma de cada publicación que realice para que los filtros y la traducción funcionen correctamente.
|
||||||
|
- <b>Traducción</b>: ¡Traduce fácilmente las publicaciones dentro de Megalodon! Solo funciona si la función también está disponible en su Mastodon Web.
|
||||||
|
- <b>Indicador de visibilidad de publicación</b>: al abrir o responder a una publicación, se mostrará un ícono útil que indica la visibilidad de la publicación.
|
||||||
|
- <b>Temas de color</b>: si no te gusta el color rosa predeterminado (el tiburón te está juzgando en silencio), los temas de color de Moshidon te ayudarán.
|
||||||
|
|||||||