Allow to enable or disable the cardview presentation in settings
This commit is contained in:
parent
49df8bda8c
commit
6fa23d1bc3
|
@ -68,6 +68,11 @@ public class AccountAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
|
||||
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) context).get(AccountsVM.class);
|
||||
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
accountViewHolder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
accountViewHolder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
accountViewHolder.binding.avatar.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(context, ProfileActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
|
@ -78,6 +83,8 @@ public class AccountAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
});
|
||||
|
||||
|
||||
accountViewHolder.binding.followAction.setIconResource(R.drawable.ic_baseline_person_add_24);
|
||||
if (account.relationShip != null) {
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ package app.fedilab.android.ui.drawer;
|
|||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -27,6 +28,7 @@ import androidx.core.app.ActivityOptionsCompat;
|
|||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -69,6 +71,14 @@ public class AccountFollowRequestAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
|
||||
Account account = accountList.get(position);
|
||||
ViewHolderFollow holderFollow = (ViewHolderFollow) viewHolder;
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holderFollow.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holderFollow.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
MastodonHelper.loadPPMastodon(holderFollow.binding.avatar, account);
|
||||
holderFollow.binding.displayName.setText(account.display_name);
|
||||
holderFollow.binding.username.setText(String.format("@%s", account.acct));
|
||||
|
|
|
@ -16,14 +16,17 @@ package app.fedilab.android.ui.drawer;
|
|||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
@ -35,6 +38,7 @@ import app.fedilab.android.R;
|
|||
import app.fedilab.android.client.entities.api.Account;
|
||||
import app.fedilab.android.client.entities.api.MastodonList;
|
||||
import app.fedilab.android.databinding.DrawerAccountListBinding;
|
||||
import app.fedilab.android.helper.Helper;
|
||||
import app.fedilab.android.helper.MastodonHelper;
|
||||
import app.fedilab.android.helper.ThemeHelper;
|
||||
import app.fedilab.android.viewmodel.mastodon.TimelinesVM;
|
||||
|
@ -78,6 +82,12 @@ public class AccountListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||
|
||||
account = getItem(position);
|
||||
AccountListViewHolder holder = (AccountListViewHolder) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
MastodonHelper.loadPPMastodon(holder.binding.avatar, account);
|
||||
holder.binding.displayName.setText(
|
||||
account.getSpanDisplayName(context,
|
||||
|
|
|
@ -19,6 +19,7 @@ import static android.content.Context.INPUT_METHOD_SERVICE;
|
|||
import static app.fedilab.android.BaseMainActivity.emojis;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -30,6 +31,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
@ -80,6 +82,14 @@ public class AnnouncementAdapter extends RecyclerView.Adapter<AnnouncementAdapte
|
|||
@Override
|
||||
public void onBindViewHolder(@NonNull AnnouncementHolder holder, int position) {
|
||||
Announcement announcement = announcements.get(position);
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
if (announcement.reactions != null && announcement.reactions.size() > 0) {
|
||||
ReactionAdapter reactionAdapter = new ReactionAdapter(announcement.id, announcement.reactions);
|
||||
holder.binding.layoutReactions.reactionsView.setAdapter(reactionAdapter);
|
||||
|
|
|
@ -90,7 +90,10 @@ public class ConversationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
ConversationHolder holder = (ConversationHolder) viewHolder;
|
||||
|
||||
final SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//--- Profile Pictures for participants ---
|
||||
holder.binding.participantsList.removeAllViews();
|
||||
|
|
|
@ -15,13 +15,16 @@ package app.fedilab.android.ui.drawer;
|
|||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -61,6 +64,13 @@ public class DomainBlockAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
|
||||
String domain = domainList.get(position);
|
||||
DomainBlockViewHolder holder = (DomainBlockViewHolder) viewHolder;
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
holder.binding.domainName.setText(domain);
|
||||
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) context).get(AccountsVM.class);
|
||||
holder.binding.unblockDomain.setOnClickListener(v -> {
|
||||
|
|
|
@ -16,11 +16,13 @@ package app.fedilab.android.ui.drawer;
|
|||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
@ -46,6 +48,11 @@ public class InstanceRegAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||
JoinMastodonInstance joinMastodonInstance = joinMastodonInstanceList.get(position);
|
||||
|
||||
ViewHolder holder = (ViewHolder) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
holder.binding.instanceCountUser.setText(context.getString(R.string.users, Helper.withSuffix(joinMastodonInstance.total_users)));
|
||||
holder.binding.instanceDescription.setText(joinMastodonInstance.description);
|
||||
holder.binding.instanceHost.setText(joinMastodonInstance.domain);
|
||||
|
|
|
@ -149,6 +149,11 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
Notification notification = notificationList.get(position);
|
||||
if (getItemViewType(position) == TYPE_FOLLOW || getItemViewType(position) == TYPE_FOLLOW_REQUEST || getItemViewType(position) == TYPE_ADMIN_REPORT || getItemViewType(position) == TYPE_ADMIN_SIGNUP) {
|
||||
ViewHolderFollow holderFollow = (ViewHolderFollow) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holderFollow.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holderFollow.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
MastodonHelper.loadPPMastodon(holderFollow.binding.avatar, notification.account);
|
||||
holderFollow.binding.displayName.setText(
|
||||
notification.account.getSpanDisplayName(context,
|
||||
|
@ -227,6 +232,11 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
}
|
||||
} else if (getItemViewType(position) == TYPE_FILERED) {
|
||||
StatusAdapter.StatusViewHolder holder = (StatusAdapter.StatusViewHolder) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
holder.bindingFiltered.filteredText.setText(context.getString(R.string.filtered_by, notification.filteredByApp.title));
|
||||
holder.bindingFiltered.displayButton.setOnClickListener(v -> {
|
||||
notification.filteredByApp = null;
|
||||
|
@ -234,6 +244,11 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
});
|
||||
} else {
|
||||
StatusAdapter.StatusViewHolder holderStatus = (StatusAdapter.StatusViewHolder) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holderStatus.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holderStatus.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setVisibility(View.VISIBLE);
|
||||
|
||||
if (getItemViewType(position) == TYPE_MENTION) {
|
||||
|
@ -294,7 +309,6 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
} else {
|
||||
holderStatus.bindingNotification.status.mainContainer.setAlpha(.7f);
|
||||
holderStatus.bindingNotification.status.mainContainer.setVisibility(View.VISIBLE);
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean displayMedia = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_MEDIA_NOTIFICATION), true);
|
||||
if (displayMedia && notification.status != null && notification.status.media_attachments != null && notification.status.media_attachments.size() > 0) {
|
||||
holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -2164,12 +2164,21 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Status status = statusList.get(position);
|
||||
if (viewHolder.getItemViewType() == STATUS_VISIBLE) {
|
||||
StatusViewHolder holder = (StatusViewHolder) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
StatusesVM statusesVM = new ViewModelProvider((ViewModelStoreOwner) context).get(StatusesVM.class);
|
||||
SearchVM searchVM = new ViewModelProvider((ViewModelStoreOwner) context).get(SearchVM.class);
|
||||
statusManagement(context, statusesVM, searchVM, holder, mRecyclerView, this, statusList, status, timelineType, minified, canBeFederated, checkRemotely, fetchMoreCallBack);
|
||||
} else if (viewHolder.getItemViewType() == STATUS_FILTERED_HIDE) {
|
||||
StatusViewHolder holder = (StatusViewHolder) viewHolder;
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
if (status.isFetchMore && fetchMoreCallBack != null) {
|
||||
holder.bindingFilteredHide.layoutFetchMore.fetchMoreContainer.setVisibility(View.VISIBLE);
|
||||
holder.bindingFilteredHide.layoutFetchMore.fetchMoreMin.setOnClickListener(v -> {
|
||||
|
@ -2203,7 +2212,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
|
||||
} else if (viewHolder.getItemViewType() == STATUS_FILTERED) {
|
||||
StatusViewHolder holder = (StatusViewHolder) viewHolder;
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
holder.bindingFiltered.filteredText.setText(context.getString(R.string.filtered_by, status.filteredByApp.title));
|
||||
holder.bindingFiltered.displayButton.setOnClickListener(v -> {
|
||||
status.filteredByApp = null;
|
||||
|
@ -2243,6 +2256,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
|
||||
} else if (viewHolder.getItemViewType() == STATUS_ART) {
|
||||
StatusViewHolder holder = (StatusViewHolder) viewHolder;
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
MastodonHelper.loadPPMastodon(holder.bindingArt.artPp, status.account);
|
||||
if (status.art_attachment != null) {
|
||||
|
||||
|
|
|
@ -17,12 +17,15 @@ package app.fedilab.android.ui.drawer;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -68,6 +71,12 @@ public class StatusDraftAdapter extends RecyclerView.Adapter<StatusDraftAdapter.
|
|||
public void onBindViewHolder(@NonNull StatusDraftHolder holder, int position) {
|
||||
StatusDraft statusDraft = statusDrafts.get(position);
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//--- MAIN CONTENT ---
|
||||
if (statusDraft.statusDraftList != null && statusDraft.statusDraftList.size() > 0) {
|
||||
holder.binding.statusContent.setText(statusDraft.statusDraftList.get(0).text, TextView.BufferType.SPANNABLE);
|
||||
|
@ -87,7 +96,7 @@ public class StatusDraftAdapter extends RecyclerView.Adapter<StatusDraftAdapter.
|
|||
//--- DATE ---
|
||||
holder.binding.date.setText(Helper.dateDiff(context, statusDraft.created_ad));
|
||||
|
||||
holder.binding.container.setOnClickListener(v -> {
|
||||
holder.binding.cardviewContainer.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(context, ComposeActivity.class);
|
||||
intent.putExtra(Helper.ARG_STATUS_DRAFT, statusDraft);
|
||||
context.startActivity(intent);
|
||||
|
|
|
@ -121,7 +121,7 @@ public class StatusScheduledAdapter extends RecyclerView.Adapter<StatusScheduled
|
|||
holder.binding.statusContent.setText(statusContent);
|
||||
}
|
||||
|
||||
holder.binding.container.setOnClickListener(v -> {
|
||||
holder.binding.cardviewContainer.setOnClickListener(v -> {
|
||||
if (statusDraft != null) {
|
||||
Intent intent = new Intent(context, ComposeActivity.class);
|
||||
intent.putExtra(Helper.ARG_STATUS_DRAFT, statusDraft);
|
||||
|
|
|
@ -18,6 +18,7 @@ package app.fedilab.android.ui.drawer;
|
|||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -28,6 +29,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.core.app.ActivityOptionsCompat;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
@ -76,7 +78,11 @@ public class SuggestionAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
SuggestionViewHolder holder = (SuggestionViewHolder) viewHolder;
|
||||
MastodonHelper.loadPPMastodon(holder.binding.avatar, account);
|
||||
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) context).get(AccountsVM.class);
|
||||
|
||||
holder.binding.avatar.setOnClickListener(v -> {
|
||||
|
|
|
@ -16,11 +16,14 @@ package app.fedilab.android.ui.drawer;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.github.mikephil.charting.components.Description;
|
||||
|
@ -52,6 +55,13 @@ public class TagAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|||
public static void tagManagement(Context context, TagViewHolder tagViewHolder, Tag tag) {
|
||||
tagViewHolder.binding.tagName.setText(String.format("#%s", tag.name));
|
||||
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
tagViewHolder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
tagViewHolder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
List<Entry> trendsEntry = new ArrayList<>();
|
||||
|
||||
List<History> historyList = tag.history;
|
||||
|
|
|
@ -17,16 +17,20 @@ package app.fedilab.android.ui.drawer.admin;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import app.fedilab.android.R;
|
||||
import app.fedilab.android.activities.admin.AdminAccountActivity;
|
||||
import app.fedilab.android.client.entities.api.admin.AdminAccount;
|
||||
import app.fedilab.android.databinding.DrawerAdminAccountBinding;
|
||||
|
@ -63,8 +67,15 @@ public class AdminAccountAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
|
||||
AdminAccount adminAccount = adminAccountList.get(position);
|
||||
AccountAdminViewHolder holder = (AccountAdminViewHolder) viewHolder;
|
||||
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {
|
||||
holder.binding.cardviewContainer.setCardElevation(Helper.convertDpToPixel(5, context));
|
||||
holder.binding.dividerCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
MastodonHelper.loadPPMastodon(holder.binding.pp, adminAccount.account);
|
||||
holder.binding.adminAccountContainer.setOnClickListener(v -> {
|
||||
holder.binding.cardviewContainer.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(context, AdminAccountActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, adminAccount);
|
||||
|
|
|
@ -14,16 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp">
|
||||
android:layout_marginTop="6dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -154,4 +159,4 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,15 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="12dp">
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -71,14 +77,14 @@
|
|||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/list_action"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="6dp"
|
||||
android:padding="0dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:icon="@drawable/ic_baseline_person_add_alt_1_24"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -86,4 +92,4 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/admin_account_container"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp">
|
||||
android:layout_marginTop="6dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -140,5 +147,5 @@
|
|||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
|
|
@ -14,19 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -96,4 +98,4 @@
|
|||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,17 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="6dp">
|
||||
android:layout_marginTop="6dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -115,4 +119,4 @@
|
|||
tools:visibility="visible" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,13 +14,20 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp">
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -51,4 +58,4 @@
|
|||
android:padding="6dp"
|
||||
app:icon="@drawable/ic_baseline_delete_24" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -14,15 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin">
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -128,4 +134,4 @@
|
|||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,14 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp">
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -49,7 +56,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineMedium"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/instance_pp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -99,4 +106,4 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -14,7 +14,7 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cardview_container"
|
||||
|
@ -22,9 +22,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/main_container"
|
||||
|
@ -41,6 +42,7 @@
|
|||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -738,4 +740,4 @@
|
|||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,15 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp">
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -106,4 +112,4 @@
|
|||
</HorizontalScrollView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cardview_container"
|
||||
|
@ -23,9 +23,12 @@
|
|||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -78,4 +81,4 @@
|
|||
tools:visibility="visible" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -14,7 +14,7 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cardview_container"
|
||||
|
@ -23,9 +23,12 @@
|
|||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -47,4 +50,4 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -14,17 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView 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:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -100,4 +104,4 @@
|
|||
tools:text="@tools:sample/lorem/random" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -14,15 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp">
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -96,4 +102,4 @@
|
|||
</HorizontalScrollView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,17 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView 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:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -98,4 +102,4 @@
|
|||
tools:text="@tools:sample/lorem/random" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -14,15 +14,21 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp">
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -107,4 +113,4 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -14,12 +14,20 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cardview_container"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorOutline" />
|
||||
|
@ -64,4 +72,4 @@
|
|||
android:layout_width="100dp"
|
||||
android:layout_height="50dp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -1297,6 +1297,7 @@
|
|||
<string name="SET_CAPITALIZE" translatable="false">SET_CAPITALIZE</string>
|
||||
<string name="SET_THEME_BASE" translatable="false">SET_THEME_BASE</string>
|
||||
<string name="SET_DYNAMICCOLOR" translatable="false">SET_DYNAMICCOLOR</string>
|
||||
<string name="SET_CARDVIEW" translatable="false">SET_CARDVIEW</string>
|
||||
<string name="SET_THEME_DEFAULT_LIGHT" translatable="false">SET_THEME_DEFAULT_LIGHT</string>
|
||||
<string name="SET_THEME_DEFAULT_DARK" translatable="false">SET_THEME_DEFAULT_DARK</string>
|
||||
|
||||
|
@ -2015,4 +2016,6 @@
|
|||
<string name="set_dynamic_color_indication">Align tonally with the color scheme of your personal wallpaper.</string>
|
||||
<string name="type_default_theme_light">Default light theme</string>
|
||||
<string name="type_default_theme_dark">Default dark theme</string>
|
||||
<string name="set_cardview">Use card view presentation</string>
|
||||
<string name="set_cardview_indication">When enabled, items in timelines will have a shadow and an elevation.</string>
|
||||
</resources>
|
|
@ -44,4 +44,13 @@
|
|||
app:title="@string/type_default_theme_dark"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/SET_CARDVIEW"
|
||||
app:singleLineTitle="false"
|
||||
app:summary="@string/set_cardview_indication"
|
||||
app:title="@string/set_cardview" />
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
|
Loading…
Reference in New Issue