Use thin divider in transaction history page. Set font for action bar title.
This commit is contained in:
parent
5e1fc9dbd8
commit
6c60d299af
6 changed files with 26 additions and 29 deletions
|
@ -17,6 +17,7 @@ import android.content.res.Configuration;
|
|||
import android.content.res.TypedArray;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
|
@ -26,7 +27,10 @@ import android.os.Handler;
|
|||
import android.provider.MediaStore;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import android.text.Editable;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.style.TypefaceSpan;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
|
@ -62,6 +66,7 @@ import androidx.core.app.NotificationManagerCompat;
|
|||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.core.graphics.TypefaceCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.core.view.OnApplyWindowInsetsListener;
|
||||
|
@ -539,6 +544,15 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
|||
}
|
||||
}
|
||||
|
||||
public void setActionBarTitle(int stringResourceId) {
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
SpannableString spannable = new SpannableString(getString(stringResourceId));
|
||||
spannable.setSpan(new TypefaceSpan("inter"), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
actionBar.setTitle(spannable);
|
||||
}
|
||||
}
|
||||
|
||||
public void addScreenOrientationListener(ScreenOrientationListener listener) {
|
||||
if (!screenOrientationListeners.contains(listener)) {
|
||||
screenOrientationListeners.add(listener);
|
||||
|
|
|
@ -503,10 +503,8 @@ public class ChannelFormFragment extends BaseFragment implements
|
|||
activity.addFilePickerListener(this);
|
||||
activity.addWalletBalanceListener(this);
|
||||
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(editMode ? R.string.edit_channel : R.string.create_a_channel);
|
||||
}
|
||||
activity.setActionBarTitle(editMode ? R.string.edit_channel : R.string.create_a_channel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -544,10 +542,7 @@ public class ChannelFormFragment extends BaseFragment implements
|
|||
LbryAnalytics.setCurrentScreen(activity, "Channel Form", "ChannelForm");
|
||||
activity.addStoragePermissionListener(this);
|
||||
if (editMode) {
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.edit_channel);
|
||||
}
|
||||
activity.setActionBarTitle(R.string.edit_channel);
|
||||
}
|
||||
}
|
||||
String filterText = Helper.getValue(inputTagFilter.getText());
|
||||
|
|
|
@ -180,10 +180,7 @@ public class AboutFragment extends BaseFragment implements SdkStatusListener {
|
|||
activity.lockDrawer();
|
||||
activity.hideFloatingWalletBalance();
|
||||
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.about_lbry);
|
||||
}
|
||||
activity.setActionBarTitle(R.string.about_lbry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,10 +35,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
|
|||
activity.lockDrawer();
|
||||
activity.hideFloatingWalletBalance();
|
||||
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.settings);
|
||||
}
|
||||
activity.setActionBarTitle(R.string.settings);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -499,10 +499,7 @@ public class PublishFormFragment extends BaseFragment implements
|
|||
activity.addFilePickerListener(this);
|
||||
activity.addWalletBalanceListener(this);
|
||||
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(editMode ? R.string.edit_content : R.string.new_publish);
|
||||
}
|
||||
activity.setActionBarTitle(editMode ? R.string.edit_content : R.string.new_publish);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -889,10 +886,7 @@ public class PublishFormFragment extends BaseFragment implements
|
|||
LbryAnalytics.setCurrentScreen(activity, "Channel Form", "ChannelForm");
|
||||
activity.addStoragePermissionListener(this);
|
||||
if (editMode) {
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.edit_content);
|
||||
}
|
||||
activity.setActionBarTitle(R.string.edit_content);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import android.widget.ProgressBar;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -48,7 +49,9 @@ public class TransactionHistoryFragment extends BaseFragment implements Transact
|
|||
Context context = getContext();
|
||||
LinearLayoutManager llm = new LinearLayoutManager(context);
|
||||
transactionList.setLayoutManager(llm);
|
||||
transactionList.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
|
||||
DividerItemDecoration itemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
||||
itemDecoration.setDrawable(ContextCompat.getDrawable(context, R.drawable.thin_divider));
|
||||
transactionList.addItemDecoration(itemDecoration);
|
||||
|
||||
transactionList.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
|
@ -133,10 +136,7 @@ public class TransactionHistoryFragment extends BaseFragment implements Transact
|
|||
activity.showNavigationBackIcon();
|
||||
activity.lockDrawer();
|
||||
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.transaction_history);
|
||||
}
|
||||
activity.setActionBarTitle(R.string.transaction_history);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue