video cache
This commit is contained in:
parent
d5ef4f05a1
commit
dd26a6aeb5
|
@ -60,10 +60,10 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||||
import com.google.android.exoplayer2.SimpleExoPlayer;
|
import com.google.android.exoplayer2.SimpleExoPlayer;
|
||||||
import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
|
||||||
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
|
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
|
||||||
import com.google.android.exoplayer2.ui.PlaybackControlView;
|
import com.google.android.exoplayer2.ui.PlayerControlView;
|
||||||
import com.google.android.exoplayer2.ui.SimpleExoPlayerView;
|
import com.google.android.exoplayer2.ui.PlayerView;
|
||||||
import com.google.android.exoplayer2.upstream.DataSource;
|
import com.google.android.exoplayer2.upstream.DataSource;
|
||||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
|
@ -96,6 +96,7 @@ import app.fedilab.android.client.Entities.Status;
|
||||||
import app.fedilab.android.client.Entities.StatusDrawerParams;
|
import app.fedilab.android.client.Entities.StatusDrawerParams;
|
||||||
import app.fedilab.android.client.TLSSocketFactory;
|
import app.fedilab.android.client.TLSSocketFactory;
|
||||||
import app.fedilab.android.drawers.StatusListAdapter;
|
import app.fedilab.android.drawers.StatusListAdapter;
|
||||||
|
import app.fedilab.android.helper.CacheDataSourceFactory;
|
||||||
import app.fedilab.android.helper.CrossActions;
|
import app.fedilab.android.helper.CrossActions;
|
||||||
import app.fedilab.android.helper.FullScreenMediaController;
|
import app.fedilab.android.helper.FullScreenMediaController;
|
||||||
import app.fedilab.android.helper.Helper;
|
import app.fedilab.android.helper.Helper;
|
||||||
|
@ -130,7 +131,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
private ScrollView peertube_information_container;
|
private ScrollView peertube_information_container;
|
||||||
private Peertube peertube;
|
private Peertube peertube;
|
||||||
private TextView toolbar_title;
|
private TextView toolbar_title;
|
||||||
private SimpleExoPlayerView playerView;
|
private PlayerView playerView;
|
||||||
private SimpleExoPlayer player;
|
private SimpleExoPlayer player;
|
||||||
private boolean fullScreenMode;
|
private boolean fullScreenMode;
|
||||||
private Dialog fullScreenDialog;
|
private Dialog fullScreenDialog;
|
||||||
|
@ -278,7 +279,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
peertube_information_container.setVisibility(View.VISIBLE);
|
peertube_information_container.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
|
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
if (user_agent != null) {
|
if (user_agent != null) {
|
||||||
webview_video.getSettings().setUserAgentString(user_agent);
|
webview_video.getSettings().setUserAgentString(user_agent);
|
||||||
}
|
}
|
||||||
|
@ -369,40 +370,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
case R.id.action_comment:
|
case R.id.action_comment:
|
||||||
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
|
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
|
||||||
Toasty.info(PeertubeActivity.this, getString(R.string.retrieve_remote_status), Toast.LENGTH_LONG).show();
|
Toasty.info(PeertubeActivity.this, getString(R.string.retrieve_remote_status), Toast.LENGTH_LONG).show();
|
||||||
new AsyncTask<Void, Void, Void>() {
|
new commentTask(new WeakReference<>(PeertubeActivity.this), peertube).execute();
|
||||||
|
|
||||||
private List<app.fedilab.android.client.Entities.Status> remoteStatuses;
|
|
||||||
private WeakReference<Context> contextReference = new WeakReference<>(PeertubeActivity.this);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground(Void... voids) {
|
|
||||||
|
|
||||||
if (peertube != null) {
|
|
||||||
APIResponse search = new API(contextReference.get()).search("https://" + peertube.getAccount().getHost() + "/videos/watch/" + peertube.getUuid());
|
|
||||||
if (search != null && search.getResults() != null) {
|
|
||||||
remoteStatuses = search.getResults().getStatuses();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostExecute(Void result) {
|
|
||||||
Intent intent = new Intent(contextReference.get(), TootActivity.class);
|
|
||||||
Bundle b = new Bundle();
|
|
||||||
if (remoteStatuses == null || remoteStatuses.size() == 0) {
|
|
||||||
Toasty.error(contextReference.get(), getString(R.string.toast_error), Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (remoteStatuses.get(0).getReblog() != null) {
|
|
||||||
b.putParcelable("tootReply", remoteStatuses.get(0).getReblog());
|
|
||||||
} else {
|
|
||||||
b.putParcelable("tootReply", remoteStatuses.get(0));
|
|
||||||
}
|
|
||||||
intent.putExtras(b); //Put your id to your next Intent
|
|
||||||
contextReference.get().startActivity(intent);
|
|
||||||
}
|
|
||||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
} else if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
} else if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
||||||
if (!peertube.isCommentsEnabled()) {
|
if (!peertube.isCommentsEnabled()) {
|
||||||
Toasty.info(PeertubeActivity.this, getString(R.string.comment_no_allowed_peertube), Toast.LENGTH_LONG).show();
|
Toasty.info(PeertubeActivity.this, getString(R.string.comment_no_allowed_peertube), Toast.LENGTH_LONG).show();
|
||||||
|
@ -443,6 +411,52 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class commentTask extends AsyncTask<Void, Void, app.fedilab.android.client.Entities.Status>{
|
||||||
|
|
||||||
|
private WeakReference<Context> contextReference;
|
||||||
|
private Peertube peertube;
|
||||||
|
|
||||||
|
commentTask(WeakReference<Context> contextReference, Peertube peertube){
|
||||||
|
this.peertube = peertube;
|
||||||
|
this.contextReference = contextReference;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected app.fedilab.android.client.Entities.Status doInBackground(Void... voids) {
|
||||||
|
|
||||||
|
List<app.fedilab.android.client.Entities.Status> remoteStatuses = null;
|
||||||
|
if (peertube != null) {
|
||||||
|
APIResponse search = new API(contextReference.get()).search("https://" + peertube.getAccount().getHost() + "/videos/watch/" + peertube.getUuid());
|
||||||
|
if (search != null && search.getResults() != null) {
|
||||||
|
remoteStatuses = search.getResults().getStatuses();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( remoteStatuses != null && remoteStatuses.size() > 0) {
|
||||||
|
return remoteStatuses.get(0);
|
||||||
|
}else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostExecute(app.fedilab.android.client.Entities.Status remoteStatuses) {
|
||||||
|
Intent intent = new Intent(contextReference.get(), TootActivity.class);
|
||||||
|
Bundle b = new Bundle();
|
||||||
|
if (remoteStatuses == null) {
|
||||||
|
Toasty.error(contextReference.get(), contextReference.get().getString(R.string.toast_error), Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (remoteStatuses.getReblog() != null) {
|
||||||
|
b.putParcelable("tootReply", remoteStatuses.getReblog());
|
||||||
|
} else {
|
||||||
|
b.putParcelable("tootReply", remoteStatuses);
|
||||||
|
}
|
||||||
|
intent.putExtras(b); //Put your id to your next Intent
|
||||||
|
contextReference.get().startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public FullScreenMediaController.fullscreen getFullscreen() {
|
public FullScreenMediaController.fullscreen getFullscreen() {
|
||||||
return fullscreen;
|
return fullscreen;
|
||||||
}
|
}
|
||||||
|
@ -583,16 +597,24 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
|
|
||||||
if (mode == Helper.VIDEO_MODE_DIRECT) {
|
if (mode == Helper.VIDEO_MODE_DIRECT) {
|
||||||
|
|
||||||
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
|
|
||||||
Util.getUserAgent(PeertubeActivity.this, "Mastalab"), null);
|
|
||||||
|
|
||||||
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
|
String userAgent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
|
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
|
||||||
|
ProgressiveMediaSource videoSource;
|
||||||
|
if( video_cache == 0) {
|
||||||
|
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
|
||||||
|
Util.getUserAgent(PeertubeActivity.this, userAgent), null);
|
||||||
|
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
|
||||||
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, apiResponse.getPeertubes().get(0).isStreamService())));
|
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, apiResponse.getPeertubes().get(0).isStreamService())));
|
||||||
|
}else{
|
||||||
|
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this, video_cache * 1024 * 1024, 5 * 1024 * 1024);
|
||||||
|
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
|
||||||
|
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, apiResponse.getPeertubes().get(0).isStreamService())));
|
||||||
|
}
|
||||||
|
|
||||||
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
|
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
|
||||||
playerView.setPlayer(player);
|
playerView.setPlayer(player);
|
||||||
loader.setVisibility(View.GONE);
|
loader.setVisibility(View.GONE);
|
||||||
|
|
||||||
player.prepare(videoSource);
|
player.prepare(videoSource);
|
||||||
player.setPlayWhenReady(true);
|
player.setPlayWhenReady(true);
|
||||||
}
|
}
|
||||||
|
@ -777,7 +799,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
if (playerView != null) {
|
if (playerView != null) {
|
||||||
loader.setVisibility(View.VISIBLE);
|
loader.setVisibility(View.VISIBLE);
|
||||||
long position = player.getCurrentPosition();
|
long position = player.getCurrentPosition();
|
||||||
PlaybackControlView controlView = playerView.findViewById(R.id.exo_controller);
|
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
|
||||||
resolution = controlView.findViewById(R.id.resolution);
|
resolution = controlView.findViewById(R.id.resolution);
|
||||||
resolution.setText(String.format("%sp", res));
|
resolution.setText(String.format("%sp", res));
|
||||||
if (mode == Helper.VIDEO_MODE_DIRECT) {
|
if (mode == Helper.VIDEO_MODE_DIRECT) {
|
||||||
|
@ -786,11 +808,19 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
|
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
|
||||||
playerView.setPlayer(player);
|
playerView.setPlayer(player);
|
||||||
loader.setVisibility(View.GONE);
|
loader.setVisibility(View.GONE);
|
||||||
|
String userAgent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
|
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
|
||||||
|
ProgressiveMediaSource videoSource;
|
||||||
|
if( video_cache == 0) {
|
||||||
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
|
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
|
||||||
Util.getUserAgent(PeertubeActivity.this, "Mastalab"), null);
|
Util.getUserAgent(PeertubeActivity.this, userAgent), null);
|
||||||
|
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
|
||||||
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
|
|
||||||
.createMediaSource(Uri.parse(peertube.getFileUrl(res, peertube.isStreamService())));
|
.createMediaSource(Uri.parse(peertube.getFileUrl(res, peertube.isStreamService())));
|
||||||
|
}else{
|
||||||
|
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this, video_cache * 1024 * 1024, 5 * 1024 * 1024);
|
||||||
|
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
|
||||||
|
.createMediaSource(Uri.parse(peertube.getFileUrl(res, peertube.isStreamService())));
|
||||||
|
}
|
||||||
player.prepare(videoSource);
|
player.prepare(videoSource);
|
||||||
player.seekTo(0, position);
|
player.seekTo(0, position);
|
||||||
player.setPlayWhenReady(true);
|
player.setPlayWhenReady(true);
|
||||||
|
@ -842,7 +872,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
|
|
||||||
private void initFullscreenButton() {
|
private void initFullscreenButton() {
|
||||||
|
|
||||||
PlaybackControlView controlView = playerView.findViewById(R.id.exo_controller);
|
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
|
||||||
fullScreenIcon = controlView.findViewById(R.id.exo_fullscreen_icon);
|
fullScreenIcon = controlView.findViewById(R.id.exo_fullscreen_icon);
|
||||||
View fullScreenButton = controlView.findViewById(R.id.exo_fullscreen_button);
|
View fullScreenButton = controlView.findViewById(R.id.exo_fullscreen_button);
|
||||||
fullScreenButton.setOnClickListener(v -> {
|
fullScreenButton.setOnClickListener(v -> {
|
||||||
|
@ -854,7 +884,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initResolution() {
|
private void initResolution() {
|
||||||
PlaybackControlView controlView = playerView.findViewById(R.id.exo_controller);
|
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
|
||||||
resolution = controlView.findViewById(R.id.resolution);
|
resolution = controlView.findViewById(R.id.resolution);
|
||||||
resolution.setText(String.format("%sp", peertube.getResolution().get(0)));
|
resolution.setText(String.format("%sp", peertube.getResolution().get(0)));
|
||||||
resolution.setOnClickListener(v -> displayResolution());
|
resolution.setOnClickListener(v -> displayResolution());
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class WebviewConnectActivity extends BaseActivity {
|
||||||
webView = findViewById(R.id.webviewConnect);
|
webView = findViewById(R.id.webviewConnect);
|
||||||
clearCookies(WebviewConnectActivity.this);
|
clearCookies(WebviewConnectActivity.this);
|
||||||
webView.getSettings().setJavaScriptEnabled(true);
|
webView.getSettings().setJavaScriptEnabled(true);
|
||||||
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
|
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
if (user_agent != null) {
|
if (user_agent != null) {
|
||||||
webView.getSettings().setUserAgentString(user_agent);
|
webView.getSettings().setUserAgentString(user_agent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ import java.util.List;
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
|
||||||
import app.fedilab.android.R;
|
import app.fedilab.android.R;
|
||||||
import app.fedilab.android.helper.Helper;
|
|
||||||
import app.fedilab.android.sqlite.DomainBlockDAO;
|
import app.fedilab.android.sqlite.DomainBlockDAO;
|
||||||
import app.fedilab.android.sqlite.Sqlite;
|
import app.fedilab.android.sqlite.Sqlite;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
|
@ -3699,6 +3699,7 @@ public class API {
|
||||||
if (apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0) {
|
if (apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0) {
|
||||||
for (Status status : apiResponse.getStatuses()) {
|
for (Status status : apiResponse.getStatuses()) {
|
||||||
if (status.getMedia_attachments() != null) {
|
if (status.getMedia_attachments() != null) {
|
||||||
|
try {
|
||||||
String statusSerialized = Helper.statusToStringStorage(status);
|
String statusSerialized = Helper.statusToStringStorage(status);
|
||||||
for (Attachment attachment : status.getMedia_attachments()) {
|
for (Attachment attachment : status.getMedia_attachments()) {
|
||||||
Status newStatus = Helper.restoreStatusFromString(statusSerialized);
|
Status newStatus = Helper.restoreStatusFromString(statusSerialized);
|
||||||
|
@ -3707,6 +3708,7 @@ public class API {
|
||||||
newStatus.setArt_attachment(attachment);
|
newStatus.setArt_attachment(attachment);
|
||||||
apiResponseReply.getStatuses().add(newStatus);
|
apiResponseReply.getStatuses().add(newStatus);
|
||||||
}
|
}
|
||||||
|
}catch (Exception ignored){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -500,12 +500,13 @@ public class ManageTimelines {
|
||||||
if (mPageReferenceMap != null) {
|
if (mPageReferenceMap != null) {
|
||||||
FragmentTransaction fragTransaction = ((MainActivity) context).getSupportFragmentManager().beginTransaction();
|
FragmentTransaction fragTransaction = ((MainActivity) context).getSupportFragmentManager().beginTransaction();
|
||||||
DisplayStatusFragment displayStatusFragment = (DisplayStatusFragment) mPageReferenceMap.get(tl.getPosition());
|
DisplayStatusFragment displayStatusFragment = (DisplayStatusFragment) mPageReferenceMap.get(tl.getPosition());
|
||||||
assert displayStatusFragment != null;
|
if (displayStatusFragment != null) {
|
||||||
fragTransaction.detach(displayStatusFragment);
|
fragTransaction.detach(displayStatusFragment);
|
||||||
fragTransaction.attach(displayStatusFragment);
|
fragTransaction.attach(displayStatusFragment);
|
||||||
fragTransaction.commit();
|
fragTransaction.commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
popup.setOnMenuItemClickListener(item -> {
|
popup.setOnMenuItemClickListener(item -> {
|
||||||
changes[0] = true;
|
changes[0] = true;
|
||||||
|
|
|
@ -310,6 +310,17 @@ public class Status implements Parcelable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
matcher = Helper.bibliogramPattern.matcher(content);
|
||||||
|
boolean bibliogram = sharedpreferences.getBoolean(Helper.SET_BIBLIOGRAM, false);
|
||||||
|
if (bibliogram) {
|
||||||
|
while (matcher.find()) {
|
||||||
|
final String bibliogram_directory = matcher.group(2);
|
||||||
|
String bibliogramHost = sharedpreferences.getString(Helper.SET_BIBLIOGRAM_HOST, Helper.DEFAULT_BIBLIOGRAM_HOST).toLowerCase();
|
||||||
|
content = content.replaceAll("https://" + Pattern.quote(matcher.group()), Matcher.quoteReplacement("https://" + bibliogramHost + bibliogram_directory));
|
||||||
|
content = content.replaceAll(">" + Pattern.quote(matcher.group()), Matcher.quoteReplacement(">" + bibliogramHost + bibliogram_directory));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
matcher = Helper.ouichesPattern.matcher(content);
|
matcher = Helper.ouichesPattern.matcher(content);
|
||||||
|
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
|
|
@ -2289,6 +2289,15 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
url = url.replaceAll("https://" + Pattern.quote(matcher.group()), Matcher.quoteReplacement("https://" + nitterHost + nitter_directory));
|
url = url.replaceAll("https://" + Pattern.quote(matcher.group()), Matcher.quoteReplacement("https://" + nitterHost + nitter_directory));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
boolean bibliogram = sharedpreferences.getBoolean(Helper.SET_BIBLIOGRAM, false);
|
||||||
|
if (bibliogram) {
|
||||||
|
Matcher matcher = Helper.bibliogramPattern.matcher(url);
|
||||||
|
while (matcher.find()) {
|
||||||
|
final String bibliogram_directory = matcher.group(2);
|
||||||
|
String bibliogramHost = sharedpreferences.getString(Helper.SET_BIBLIOGRAM_HOST, Helper.DEFAULT_BIBLIOGRAM_HOST).toLowerCase();
|
||||||
|
url = url.replaceAll("https://" + Pattern.quote(matcher.group()), Matcher.quoteReplacement("https://" + bibliogramHost + bibliogram_directory));
|
||||||
|
}
|
||||||
|
}
|
||||||
Helper.openBrowser(context, url);
|
Helper.openBrowser(context, url);
|
||||||
});
|
});
|
||||||
} else if (card.getType().toLowerCase().equals("video") && (display_video_preview || (type == RetrieveFeedsAsyncTask.Type.CONTEXT && viewHolder.getAdapterPosition() == conversationPosition))) {
|
} else if (card.getType().toLowerCase().equals("video") && (display_video_preview || (type == RetrieveFeedsAsyncTask.Type.CONTEXT && viewHolder.getAdapterPosition() == conversationPosition))) {
|
||||||
|
@ -2298,7 +2307,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
.into(holder.webview_preview_card);
|
.into(holder.webview_preview_card);
|
||||||
holder.status_cardview.setVisibility(View.GONE);
|
holder.status_cardview.setVisibility(View.GONE);
|
||||||
holder.status_cardview_video.setVisibility(View.VISIBLE);
|
holder.status_cardview_video.setVisibility(View.VISIBLE);
|
||||||
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
|
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
if (user_agent != null) {
|
if (user_agent != null) {
|
||||||
holder.status_cardview_webview.getSettings().setUserAgentString(user_agent);
|
holder.status_cardview_webview.getSettings().setUserAgentString(user_agent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ package app.fedilab.android.fragments;
|
||||||
* see <http://www.gnu.org/licenses>. */
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.app.TimePickerDialog;
|
import android.app.TimePickerDialog;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
|
@ -54,7 +55,6 @@ import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.widget.SwitchCompat;
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
@ -345,6 +345,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
}
|
}
|
||||||
context = getActivity();
|
context = getActivity();
|
||||||
|
|
||||||
|
assert context != null;
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||||
|
|
||||||
|
@ -468,9 +469,9 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
|
|
||||||
|
|
||||||
Button update_tracking_domains = rootView.findViewById(R.id.update_tracking_domains);
|
Button update_tracking_domains = rootView.findViewById(R.id.update_tracking_domains);
|
||||||
update_tracking_domains.setOnClickListener(v -> {
|
update_tracking_domains.setOnClickListener(v ->
|
||||||
new DownloadTrackingDomainsAsyncTask(Objects.requireNonNull(getActivity()), update_tracking_domains).execute();
|
new DownloadTrackingDomainsAsyncTask(Objects.requireNonNull(getActivity()), update_tracking_domains).execute()
|
||||||
});
|
);
|
||||||
|
|
||||||
|
|
||||||
Spinner set_attachment_group = rootView.findViewById(R.id.set_attachment_group);
|
Spinner set_attachment_group = rootView.findViewById(R.id.set_attachment_group);
|
||||||
|
@ -837,7 +838,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
|
|
||||||
|
|
||||||
TextView set_user_agent = rootView.findViewById(R.id.set_user_agent);
|
TextView set_user_agent = rootView.findViewById(R.id.set_user_agent);
|
||||||
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
|
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
|
|
||||||
if (user_agent != null) {
|
if (user_agent != null) {
|
||||||
set_user_agent.setText(user_agent);
|
set_user_agent.setText(user_agent);
|
||||||
|
@ -922,6 +923,55 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
TextView set_bibliogram_host = rootView.findViewById(R.id.set_bibliogram_host);
|
||||||
|
boolean bibliogram = sharedpreferences.getBoolean(Helper.SET_BIBLIOGRAM, false);
|
||||||
|
final SwitchCompat set_bibliogram = rootView.findViewById(R.id.set_bibliogram);
|
||||||
|
set_bibliogram.setChecked(bibliogram);
|
||||||
|
|
||||||
|
set_bibliogram.setOnClickListener(v -> {
|
||||||
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
editor.putBoolean(Helper.SET_BIBLIOGRAM, set_bibliogram.isChecked());
|
||||||
|
editor.apply();
|
||||||
|
if (set_bibliogram.isChecked()) {
|
||||||
|
set_bibliogram_host.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
set_bibliogram_host.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (bibliogram) {
|
||||||
|
set_bibliogram_host.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
set_bibliogram_host.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
String bibliogramHost = sharedpreferences.getString(Helper.SET_BIBLIOGRAM_HOST, null);
|
||||||
|
if (bibliogramHost != null) {
|
||||||
|
set_bibliogram_host.setText(bibliogramHost);
|
||||||
|
}
|
||||||
|
set_bibliogram_host.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
if (s.toString().trim().length() > 0) {
|
||||||
|
editor.putString(Helper.SET_BIBLIOGRAM_HOST, s.toString().toLowerCase().trim());
|
||||||
|
} else {
|
||||||
|
editor.putString(Helper.SET_BIBLIOGRAM_HOST, null);
|
||||||
|
}
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
boolean long_press_media = sharedpreferences.getBoolean(Helper.SET_LONG_PRESS_MEDIA, true);
|
boolean long_press_media = sharedpreferences.getBoolean(Helper.SET_LONG_PRESS_MEDIA, true);
|
||||||
final SwitchCompat set_long_press_media = rootView.findViewById(R.id.set_long_press_media);
|
final SwitchCompat set_long_press_media = rootView.findViewById(R.id.set_long_press_media);
|
||||||
set_long_press_media.setChecked(long_press_media);
|
set_long_press_media.setChecked(long_press_media);
|
||||||
|
@ -976,6 +1026,32 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
getActivity().recreate();
|
getActivity().recreate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
int video_cache_size = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
|
||||||
|
SeekBar set_video_cache_size = rootView.findViewById(R.id.set_video_cache_size);
|
||||||
|
set_video_cache_size.setMax(5*Helper.DEFAULT_VIDEO_CACHE_MB);
|
||||||
|
set_video_cache_size.setProgress(video_cache_size);
|
||||||
|
TextView set_video_cache = rootView.findViewById(R.id.set_video_cache);
|
||||||
|
set_video_cache.setText(String.valueOf(video_cache_size));
|
||||||
|
set_video_cache_size.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
|
set_video_cache.setText(String.valueOf(progress));
|
||||||
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
editor.putInt(Helper.SET_VIDEO_CACHE, progress);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int truncate_toots_size = sharedpreferences.getInt(Helper.SET_TRUNCATE_TOOTS_SIZE, 0);
|
int truncate_toots_size = sharedpreferences.getInt(Helper.SET_TRUNCATE_TOOTS_SIZE, 0);
|
||||||
SeekBar set_truncate_size = rootView.findViewById(R.id.set_truncate_size);
|
SeekBar set_truncate_size = rootView.findViewById(R.id.set_truncate_size);
|
||||||
set_truncate_size.setMax(20);
|
set_truncate_size.setMax(20);
|
||||||
|
@ -1543,9 +1619,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, stringArray);
|
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, stringArray);
|
||||||
dialog.setNegativeButton(R.string.cancel, (dialog1, position) -> dialog1.dismiss());
|
dialog.setNegativeButton(R.string.cancel, (dialog1, position) -> dialog1.dismiss());
|
||||||
|
|
||||||
dialog.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {
|
dialog.setAdapter(arrayAdapter, (dialog12, position) -> {
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int position) {
|
|
||||||
String visibility = "public";
|
String visibility = "public";
|
||||||
|
|
||||||
switch (position) {
|
switch (position) {
|
||||||
|
@ -1575,8 +1649,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.dismiss();
|
dialog12.dismiss();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
dialog.show();
|
dialog.show();
|
||||||
});
|
});
|
||||||
|
@ -2175,6 +2248,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
set_change_locale.setSelection(positionSpinnerLanguage);
|
set_change_locale.setSelection(positionSpinnerLanguage);
|
||||||
countLanguage = 0;
|
countLanguage = 0;
|
||||||
set_change_locale.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
set_change_locale.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@SuppressLint("ApplySharedPref")
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
if (countLanguage > 0) {
|
if (countLanguage > 0) {
|
||||||
|
|
|
@ -51,8 +51,9 @@ import com.github.chrisbanes.photoview.PhotoView;
|
||||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||||
import com.google.android.exoplayer2.Player;
|
import com.google.android.exoplayer2.Player;
|
||||||
import com.google.android.exoplayer2.SimpleExoPlayer;
|
import com.google.android.exoplayer2.SimpleExoPlayer;
|
||||||
import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
|
||||||
import com.google.android.exoplayer2.ui.SimpleExoPlayerView;
|
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
|
||||||
|
import com.google.android.exoplayer2.ui.PlayerView;
|
||||||
import com.google.android.exoplayer2.upstream.DataSource;
|
import com.google.android.exoplayer2.upstream.DataSource;
|
||||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
|
@ -70,6 +71,7 @@ import app.fedilab.android.R;
|
||||||
import app.fedilab.android.activities.SlideMediaActivity;
|
import app.fedilab.android.activities.SlideMediaActivity;
|
||||||
import app.fedilab.android.client.Entities.Attachment;
|
import app.fedilab.android.client.Entities.Attachment;
|
||||||
import app.fedilab.android.client.TLSSocketFactory;
|
import app.fedilab.android.client.TLSSocketFactory;
|
||||||
|
import app.fedilab.android.helper.CacheDataSourceFactory;
|
||||||
import app.fedilab.android.helper.Helper;
|
import app.fedilab.android.helper.Helper;
|
||||||
import app.fedilab.android.webview.CustomWebview;
|
import app.fedilab.android.webview.CustomWebview;
|
||||||
import app.fedilab.android.webview.MastalabWebChromeClient;
|
import app.fedilab.android.webview.MastalabWebChromeClient;
|
||||||
|
@ -132,7 +134,7 @@ public class MediaSliderFragment extends Fragment implements MediaPlayer.OnCompl
|
||||||
ImageView next = rootView.findViewById(R.id.media_next);
|
ImageView next = rootView.findViewById(R.id.media_next);
|
||||||
|
|
||||||
imageView = rootView.findViewById(R.id.media_picture);
|
imageView = rootView.findViewById(R.id.media_picture);
|
||||||
SimpleExoPlayerView videoView = rootView.findViewById(R.id.media_video);
|
PlayerView videoView = rootView.findViewById(R.id.media_video);
|
||||||
if (theme == Helper.THEME_BLACK) {
|
if (theme == Helper.THEME_BLACK) {
|
||||||
changeDrawableColor(context, prev, R.color.dark_icon);
|
changeDrawableColor(context, prev, R.color.dark_icon);
|
||||||
changeDrawableColor(context, next, R.color.dark_icon);
|
changeDrawableColor(context, next, R.color.dark_icon);
|
||||||
|
@ -236,10 +238,20 @@ public class MediaSliderFragment extends Fragment implements MediaPlayer.OnCompl
|
||||||
}
|
}
|
||||||
videoView.setVisibility(View.VISIBLE);
|
videoView.setVisibility(View.VISIBLE);
|
||||||
Uri uri = Uri.parse(url);
|
Uri uri = Uri.parse(url);
|
||||||
|
|
||||||
|
String userAgent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
|
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
|
||||||
|
ProgressiveMediaSource videoSource;
|
||||||
|
if( video_cache == 0) {
|
||||||
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(context,
|
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(context,
|
||||||
Util.getUserAgent(context, "Fedilab"), null);
|
Util.getUserAgent(context, userAgent), null);
|
||||||
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
|
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
|
||||||
.createMediaSource(uri);
|
.createMediaSource(uri);
|
||||||
|
}else{
|
||||||
|
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(context, video_cache * 1024 * 1024, 5 * 1024 * 1024);
|
||||||
|
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
|
||||||
|
.createMediaSource(uri);
|
||||||
|
}
|
||||||
player = ExoPlayerFactory.newSimpleInstance(context);
|
player = ExoPlayerFactory.newSimpleInstance(context);
|
||||||
if (type.toLowerCase().equals("gifv"))
|
if (type.toLowerCase().equals("gifv"))
|
||||||
player.setRepeatMode(Player.REPEAT_MODE_ONE);
|
player.setRepeatMode(Player.REPEAT_MODE_ONE);
|
||||||
|
@ -278,7 +290,7 @@ public class MediaSliderFragment extends Fragment implements MediaPlayer.OnCompl
|
||||||
webview_video.setWebChromeClient(mastalabWebChromeClient);
|
webview_video.setWebChromeClient(mastalabWebChromeClient);
|
||||||
webview_video.getSettings().setDomStorageEnabled(true);
|
webview_video.getSettings().setDomStorageEnabled(true);
|
||||||
webview_video.getSettings().setAppCacheEnabled(true);
|
webview_video.getSettings().setAppCacheEnabled(true);
|
||||||
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
|
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
if (user_agent != null) {
|
if (user_agent != null) {
|
||||||
webview_video.getSettings().setUserAgentString(user_agent);
|
webview_video.getSettings().setUserAgentString(user_agent);
|
||||||
}
|
}
|
||||||
|
@ -453,6 +465,10 @@ public class MediaSliderFragment extends Fragment implements MediaPlayer.OnCompl
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
|
if (timer != null) {
|
||||||
|
timer.cancel();
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,48 @@
|
||||||
package app.fedilab.android.helper;
|
package app.fedilab.android.helper;
|
||||||
|
|
||||||
public class CacheDataSourceFactory {
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
|
import com.google.android.exoplayer2.database.ExoDatabaseProvider;
|
||||||
|
import com.google.android.exoplayer2.upstream.DataSource;
|
||||||
|
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
|
||||||
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
|
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
|
||||||
|
import com.google.android.exoplayer2.upstream.FileDataSource;
|
||||||
|
import com.google.android.exoplayer2.upstream.cache.CacheDataSink;
|
||||||
|
import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
|
||||||
|
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
|
||||||
|
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
|
public class CacheDataSourceFactory implements DataSource.Factory {
|
||||||
|
private final Context context;
|
||||||
|
private final DefaultDataSourceFactory defaultDatasourceFactory;
|
||||||
|
private final long maxFileSize, maxCacheSize;
|
||||||
|
|
||||||
|
public CacheDataSourceFactory(Context context, long maxCacheSize, long maxFileSize) {
|
||||||
|
super();
|
||||||
|
this.context = context;
|
||||||
|
this.maxCacheSize = maxCacheSize;
|
||||||
|
this.maxFileSize = maxFileSize;
|
||||||
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
|
String userAgent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
|
DefaultBandwidthMeter.Builder bandwidthMeterBuilder = new DefaultBandwidthMeter.Builder(context);
|
||||||
|
DefaultBandwidthMeter bandwidthMeter = bandwidthMeterBuilder.build();
|
||||||
|
defaultDatasourceFactory = new DefaultDataSourceFactory(this.context,
|
||||||
|
bandwidthMeter,
|
||||||
|
new DefaultHttpDataSourceFactory(userAgent, bandwidthMeter));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSource createDataSource() {
|
||||||
|
LeastRecentlyUsedCacheEvictor evictor = new LeastRecentlyUsedCacheEvictor(maxCacheSize);
|
||||||
|
ExoDatabaseProvider exoDatabaseProvider = new ExoDatabaseProvider(context);
|
||||||
|
SimpleCache simpleCache = new SimpleCache(new File(context.getCacheDir(), "media"), evictor, exoDatabaseProvider);
|
||||||
|
return new CacheDataSource(simpleCache, defaultDatasourceFactory.createDataSource(),
|
||||||
|
new FileDataSource(), new CacheDataSink(simpleCache, maxFileSize),
|
||||||
|
CacheDataSource.FLAG_BLOCK_ON_CACHE | CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR, null);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -320,6 +320,7 @@ public class Helper {
|
||||||
public static final int TOOTS_PER_PAGE = 40;
|
public static final int TOOTS_PER_PAGE = 40;
|
||||||
public static final int ACCOUNTS_PER_PAGE = 40;
|
public static final int ACCOUNTS_PER_PAGE = 40;
|
||||||
public static final int NOTIFICATIONS_PER_PAGE = 30;
|
public static final int NOTIFICATIONS_PER_PAGE = 30;
|
||||||
|
public static final int DEFAULT_VIDEO_CACHE_MB = 100;
|
||||||
public static final String SET_ATTACHMENT_ACTION = "set_attachment_action";
|
public static final String SET_ATTACHMENT_ACTION = "set_attachment_action";
|
||||||
public static final String SET_TOOT_PER_PAGE = "set_toot_per_page";
|
public static final String SET_TOOT_PER_PAGE = "set_toot_per_page";
|
||||||
public static final String SET_THEME = "set_theme";
|
public static final String SET_THEME = "set_theme";
|
||||||
|
@ -435,6 +436,10 @@ public class Helper {
|
||||||
public static final String SET_NITTER_HOST = "set_nitter_host";
|
public static final String SET_NITTER_HOST = "set_nitter_host";
|
||||||
public static final String DEFAULT_NITTER_HOST = "nitter.net";
|
public static final String DEFAULT_NITTER_HOST = "nitter.net";
|
||||||
|
|
||||||
|
public static final String SET_BIBLIOGRAM = "set_bibliogram";
|
||||||
|
public static final String SET_BIBLIOGRAM_HOST = "set_bibliogram_host";
|
||||||
|
public static final String DEFAULT_BIBLIOGRAM_HOST = "bibliogram.art";
|
||||||
|
|
||||||
public static final String SET_NOTIF_VALIDATION = "set_share_validation";
|
public static final String SET_NOTIF_VALIDATION = "set_share_validation";
|
||||||
public static final String SET_NOTIF_VALIDATION_FAV = "set_share_validation_fav";
|
public static final String SET_NOTIF_VALIDATION_FAV = "set_share_validation_fav";
|
||||||
public static final String SET_WIFI_ONLY = "set_wifi_only";
|
public static final String SET_WIFI_ONLY = "set_wifi_only";
|
||||||
|
@ -462,10 +467,13 @@ public class Helper {
|
||||||
public static final String SET_SECURITY_PROVIDER = "set_security_provider";
|
public static final String SET_SECURITY_PROVIDER = "set_security_provider";
|
||||||
public static final String SET_ALLOW_STREAM = "set_allow_stream";
|
public static final String SET_ALLOW_STREAM = "set_allow_stream";
|
||||||
public static final String SET_CUSTOM_USER_AGENT = "set_custom_user_agent";
|
public static final String SET_CUSTOM_USER_AGENT = "set_custom_user_agent";
|
||||||
|
public static final String SET_VIDEO_CACHE = "set_video_cache";
|
||||||
//End points
|
//End points
|
||||||
public static final String EP_AUTHORIZE = "/oauth/authorize";
|
public static final String EP_AUTHORIZE = "/oauth/authorize";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Proxy
|
//Proxy
|
||||||
public static final String SET_PROXY_ENABLED = "set_proxy_enabled";
|
public static final String SET_PROXY_ENABLED = "set_proxy_enabled";
|
||||||
public static final String SET_PROXY_TYPE = "set_proxy_type";
|
public static final String SET_PROXY_TYPE = "set_proxy_type";
|
||||||
|
@ -512,6 +520,7 @@ public class Helper {
|
||||||
public static final Pattern twitterPattern = Pattern.compile("((@[\\w]+)@twitter\\.com)");
|
public static final Pattern twitterPattern = Pattern.compile("((@[\\w]+)@twitter\\.com)");
|
||||||
public static final Pattern youtubePattern = Pattern.compile("(www\\.|m\\.)?(youtube\\.com|youtu\\.be|youtube-nocookie\\.com)/(((?!([\"'<])).)*)");
|
public static final Pattern youtubePattern = Pattern.compile("(www\\.|m\\.)?(youtube\\.com|youtu\\.be|youtube-nocookie\\.com)/(((?!([\"'<])).)*)");
|
||||||
public static final Pattern nitterPattern = Pattern.compile("(mobile\\.|www\\.)?twitter.com([\\w-/]+)");
|
public static final Pattern nitterPattern = Pattern.compile("(mobile\\.|www\\.)?twitter.com([\\w-/]+)");
|
||||||
|
public static final Pattern bibliogramPattern = Pattern.compile("(m\\.|www\\.)?instagram.com(/p/[\\w-/]+)");
|
||||||
public static final Pattern ouichesPattern = Pattern.compile("https://ouich\\.es/tag/(\\w+)");
|
public static final Pattern ouichesPattern = Pattern.compile("https://ouich\\.es/tag/(\\w+)");
|
||||||
public static final Pattern xmppPattern = Pattern.compile("xmpp:[-a-zA-Z0-9+$&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]");
|
public static final Pattern xmppPattern = Pattern.compile("xmpp:[-a-zA-Z0-9+$&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]");
|
||||||
//Default values
|
//Default values
|
||||||
|
@ -2263,10 +2272,8 @@ public class Helper {
|
||||||
webView.getSettings().setLoadsImagesAutomatically(true);
|
webView.getSettings().setLoadsImagesAutomatically(true);
|
||||||
webView.getSettings().setSupportMultipleWindows(false);
|
webView.getSettings().setSupportMultipleWindows(false);
|
||||||
webView.getSettings().setMediaPlaybackRequiresUserGesture(true);
|
webView.getSettings().setMediaPlaybackRequiresUserGesture(true);
|
||||||
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
|
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
|
||||||
if (user_agent != null) {
|
|
||||||
webView.getSettings().setUserAgentString(user_agent);
|
webView.getSettings().setUserAgentString(user_agent);
|
||||||
}
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
boolean cookies = sharedpreferences.getBoolean(Helper.SET_COOKIES, false);
|
boolean cookies = sharedpreferences.getBoolean(Helper.SET_COOKIES, false);
|
||||||
CookieManager cookieManager = CookieManager.getInstance();
|
CookieManager cookieManager = CookieManager.getInstance();
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
package app.fedilab.android.helper;
|
package app.fedilab.android.helper;
|
||||||
|
/* Copyright 2019 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of Fedilab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
|
|
||||||
import static android.content.Context.MODE_PRIVATE;
|
|
||||||
|
|
||||||
public class ThemeHelper {
|
public class ThemeHelper {
|
||||||
|
|
||||||
|
|
||||||
public static void changeTheme(Context context, int theme) {
|
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getAttColor(Context context, int attColor) {
|
public static int getAttColor(Context context, int attColor) {
|
||||||
TypedValue typedValue = new TypedValue();
|
TypedValue typedValue = new TypedValue();
|
||||||
Resources.Theme theme = context.getTheme();
|
Resources.Theme theme = context.getTheme();
|
||||||
|
|
|
@ -15,6 +15,8 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -31,7 +33,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.
|
||||||
private List<Integer> colorPickerColors;
|
private List<Integer> colorPickerColors;
|
||||||
private OnColorPickerClickListener onColorPickerClickListener;
|
private OnColorPickerClickListener onColorPickerClickListener;
|
||||||
|
|
||||||
ColorPickerAdapter(@NonNull Context context, @NonNull List<Integer> colorPickerColors) {
|
private ColorPickerAdapter(@NonNull Context context, @NonNull List<Integer> colorPickerColors) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.inflater = LayoutInflater.from(context);
|
this.inflater = LayoutInflater.from(context);
|
||||||
this.colorPickerColors = colorPickerColors;
|
this.colorPickerColors = colorPickerColors;
|
||||||
|
@ -43,7 +45,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.
|
||||||
this.inflater = LayoutInflater.from(context);
|
this.inflater = LayoutInflater.from(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Integer> getDefaultColors(Context context) {
|
private static List<Integer> getDefaultColors(Context context) {
|
||||||
ArrayList<Integer> colorPickerColors = new ArrayList<>();
|
ArrayList<Integer> colorPickerColors = new ArrayList<>();
|
||||||
colorPickerColors.add(ContextCompat.getColor(context, R.color.blue_color_picker));
|
colorPickerColors.add(ContextCompat.getColor(context, R.color.blue_color_picker));
|
||||||
colorPickerColors.add(ContextCompat.getColor(context, R.color.brown_color_picker));
|
colorPickerColors.add(ContextCompat.getColor(context, R.color.brown_color_picker));
|
||||||
|
@ -60,8 +62,9 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.
|
||||||
return colorPickerColors;
|
return colorPickerColors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NotNull ViewGroup parent, int viewType) {
|
||||||
View view = inflater.inflate(R.layout.color_picker_item_list, parent, false);
|
View view = inflater.inflate(R.layout.color_picker_item_list, parent, false);
|
||||||
return new ViewHolder(view);
|
return new ViewHolder(view);
|
||||||
}
|
}
|
||||||
|
@ -98,7 +101,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.
|
||||||
view.setBackgroundDrawable(layerDrawable);
|
view.setBackgroundDrawable(layerDrawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOnColorPickerClickListener(OnColorPickerClickListener onColorPickerClickListener) {
|
void setOnColorPickerClickListener(OnColorPickerClickListener onColorPickerClickListener) {
|
||||||
this.onColorPickerClickListener = onColorPickerClickListener;
|
this.onColorPickerClickListener = onColorPickerClickListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,15 +112,12 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.
|
||||||
class ViewHolder extends RecyclerView.ViewHolder {
|
class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
View colorPickerView;
|
View colorPickerView;
|
||||||
|
|
||||||
public ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
colorPickerView = itemView.findViewById(R.id.color_picker_view);
|
colorPickerView = itemView.findViewById(R.id.color_picker_view);
|
||||||
itemView.setOnClickListener(new View.OnClickListener() {
|
itemView.setOnClickListener(v -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (onColorPickerClickListener != null)
|
if (onColorPickerClickListener != null)
|
||||||
onColorPickerClickListener.onColorPickerClickListener(colorPickerColors.get(getAdapterPosition()));
|
onColorPickerClickListener.onColorPickerClickListener(colorPickerColors.get(getAdapterPosition()));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.fedilab.android.R;
|
import app.fedilab.android.R;
|
||||||
import ja.burhanrashid52.photoeditor.PhotoEditor;
|
import ja.burhanrashid52.photoeditor.PhotoEditor;
|
||||||
|
@ -46,7 +47,7 @@ public class EmojiBSFragment extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
@SuppressLint("RestrictedApi")
|
@SuppressLint("RestrictedApi")
|
||||||
@Override
|
@Override
|
||||||
public void setupDialog(Dialog dialog, int style) {
|
public void setupDialog(@NotNull Dialog dialog, int style) {
|
||||||
super.setupDialog(dialog, style);
|
super.setupDialog(dialog, style);
|
||||||
View contentView = View.inflate(getContext(), R.layout.fragment_bottom_sticker_emoji_dialog, null);
|
View contentView = View.inflate(getContext(), R.layout.fragment_bottom_sticker_emoji_dialog, null);
|
||||||
dialog.setContentView(contentView);
|
dialog.setContentView(contentView);
|
||||||
|
@ -75,7 +76,7 @@ public class EmojiBSFragment extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
public class EmojiAdapter extends RecyclerView.Adapter<EmojiAdapter.ViewHolder> {
|
public class EmojiAdapter extends RecyclerView.Adapter<EmojiAdapter.ViewHolder> {
|
||||||
|
|
||||||
ArrayList<String> emojisList = PhotoEditor.getEmojis(getActivity());
|
ArrayList<String> emojisList = PhotoEditor.getEmojis(Objects.requireNonNull(getActivity()));
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
@ -101,14 +102,11 @@ public class EmojiBSFragment extends BottomSheetDialogFragment {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
txtEmoji = itemView.findViewById(R.id.txtEmoji);
|
txtEmoji = itemView.findViewById(R.id.txtEmoji);
|
||||||
|
|
||||||
itemView.setOnClickListener(new View.OnClickListener() {
|
itemView.setOnClickListener(v -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (mEmojiListener != null) {
|
if (mEmojiListener != null) {
|
||||||
mEmojiListener.onEmojiClick(emojisList.get(getLayoutPosition()));
|
mEmojiListener.onEmojiClick(emojisList.get(getLayoutPosition()));
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,14 +51,11 @@ public class PropertiesBSFragment extends BottomSheetDialogFragment implements S
|
||||||
rvColor.setLayoutManager(layoutManager);
|
rvColor.setLayoutManager(layoutManager);
|
||||||
rvColor.setHasFixedSize(true);
|
rvColor.setHasFixedSize(true);
|
||||||
ColorPickerAdapter colorPickerAdapter = new ColorPickerAdapter(Objects.requireNonNull(getActivity()));
|
ColorPickerAdapter colorPickerAdapter = new ColorPickerAdapter(Objects.requireNonNull(getActivity()));
|
||||||
colorPickerAdapter.setOnColorPickerClickListener(new ColorPickerAdapter.OnColorPickerClickListener() {
|
colorPickerAdapter.setOnColorPickerClickListener(colorCode -> {
|
||||||
@Override
|
|
||||||
public void onColorPickerClickListener(int colorCode) {
|
|
||||||
if (mProperties != null) {
|
if (mProperties != null) {
|
||||||
dismiss();
|
dismiss();
|
||||||
mProperties.onColorChanged(colorCode);
|
mProperties.onColorChanged(colorCode);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
rvColor.setAdapter(colorPickerAdapter);
|
rvColor.setAdapter(colorPickerAdapter);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class StickerBSFragment extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
@SuppressLint("RestrictedApi")
|
@SuppressLint("RestrictedApi")
|
||||||
@Override
|
@Override
|
||||||
public void setupDialog(Dialog dialog, int style) {
|
public void setupDialog(@NotNull Dialog dialog, int style) {
|
||||||
super.setupDialog(dialog, style);
|
super.setupDialog(dialog, style);
|
||||||
View contentView = View.inflate(getContext(), R.layout.fragment_bottom_sticker_emoji_dialog, null);
|
View contentView = View.inflate(getContext(), R.layout.fragment_bottom_sticker_emoji_dialog, null);
|
||||||
dialog.setContentView(contentView);
|
dialog.setContentView(contentView);
|
||||||
|
@ -76,6 +76,7 @@ public class StickerBSFragment extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private String convertEmoji(String emoji) {
|
private String convertEmoji(String emoji) {
|
||||||
String returnedEmoji = "";
|
String returnedEmoji = "";
|
||||||
try {
|
try {
|
||||||
|
@ -137,16 +138,13 @@ public class StickerBSFragment extends BottomSheetDialogFragment {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
imgSticker = itemView.findViewById(R.id.imgSticker);
|
imgSticker = itemView.findViewById(R.id.imgSticker);
|
||||||
|
|
||||||
itemView.setOnClickListener(new View.OnClickListener() {
|
itemView.setOnClickListener(v -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (mStickerListener != null) {
|
if (mStickerListener != null) {
|
||||||
mStickerListener.onStickerClick(
|
mStickerListener.onStickerClick(
|
||||||
BitmapFactory.decodeResource(getResources(),
|
BitmapFactory.decodeResource(getResources(),
|
||||||
stickerList[getLayoutPosition()]));
|
stickerList[getLayoutPosition()]));
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,9 @@ import app.fedilab.android.R;
|
||||||
public class TextEditorDialogFragment extends DialogFragment {
|
public class TextEditorDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
public static final String TAG = TextEditorDialogFragment.class.getSimpleName();
|
public static final String TAG = TextEditorDialogFragment.class.getSimpleName();
|
||||||
public static final String EXTRA_INPUT_TEXT = "extra_input_text";
|
private static final String EXTRA_INPUT_TEXT = "extra_input_text";
|
||||||
public static final String EXTRA_COLOR_CODE = "extra_color_code";
|
private static final String EXTRA_COLOR_CODE = "extra_color_code";
|
||||||
private EditText mAddTextEditText;
|
private EditText mAddTextEditText;
|
||||||
private TextView mAddTextDoneTextView;
|
|
||||||
private InputMethodManager mInputMethodManager;
|
private InputMethodManager mInputMethodManager;
|
||||||
private int mColorCode;
|
private int mColorCode;
|
||||||
private TextEditor mTextEditor;
|
private TextEditor mTextEditor;
|
||||||
|
@ -64,7 +63,7 @@ public class TextEditorDialogFragment extends DialogFragment {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
Dialog dialog = getDialog();
|
Dialog dialog = getDialog();
|
||||||
//Make dialog full screen with transparent background
|
//Make dialog full screen with transparent background
|
||||||
if (dialog != null) {
|
if (dialog != null && dialog.getWindow() != null) {
|
||||||
int width = ViewGroup.LayoutParams.MATCH_PARENT;
|
int width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
int height = ViewGroup.LayoutParams.MATCH_PARENT;
|
int height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
dialog.getWindow().setLayout(width, height);
|
dialog.getWindow().setLayout(width, height);
|
||||||
|
@ -82,8 +81,10 @@ public class TextEditorDialogFragment extends DialogFragment {
|
||||||
public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
|
public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
mAddTextEditText = view.findViewById(R.id.add_text_edit_text);
|
mAddTextEditText = view.findViewById(R.id.add_text_edit_text);
|
||||||
|
if( getActivity() != null) {
|
||||||
mInputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
mInputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
mAddTextDoneTextView = view.findViewById(R.id.add_text_done_tv);
|
TextView mAddTextDoneTextView = view.findViewById(R.id.add_text_done_tv);
|
||||||
|
|
||||||
|
|
||||||
//Setup the color picker for text color
|
//Setup the color picker for text color
|
||||||
RecyclerView addTextColorPickerRecyclerView = view.findViewById(R.id.add_text_color_picker_recycler_view);
|
RecyclerView addTextColorPickerRecyclerView = view.findViewById(R.id.add_text_color_picker_recycler_view);
|
||||||
|
@ -92,31 +93,27 @@ public class TextEditorDialogFragment extends DialogFragment {
|
||||||
addTextColorPickerRecyclerView.setHasFixedSize(true);
|
addTextColorPickerRecyclerView.setHasFixedSize(true);
|
||||||
ColorPickerAdapter colorPickerAdapter = new ColorPickerAdapter(getActivity());
|
ColorPickerAdapter colorPickerAdapter = new ColorPickerAdapter(getActivity());
|
||||||
//This listener will change the text color when clicked on any color from picker
|
//This listener will change the text color when clicked on any color from picker
|
||||||
colorPickerAdapter.setOnColorPickerClickListener(new ColorPickerAdapter.OnColorPickerClickListener() {
|
colorPickerAdapter.setOnColorPickerClickListener(colorCode -> {
|
||||||
@Override
|
|
||||||
public void onColorPickerClickListener(int colorCode) {
|
|
||||||
mColorCode = colorCode;
|
mColorCode = colorCode;
|
||||||
mAddTextEditText.setTextColor(colorCode);
|
mAddTextEditText.setTextColor(colorCode);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
addTextColorPickerRecyclerView.setAdapter(colorPickerAdapter);
|
addTextColorPickerRecyclerView.setAdapter(colorPickerAdapter);
|
||||||
|
assert getArguments() != null;
|
||||||
mAddTextEditText.setText(getArguments().getString(EXTRA_INPUT_TEXT));
|
mAddTextEditText.setText(getArguments().getString(EXTRA_INPUT_TEXT));
|
||||||
mColorCode = getArguments().getInt(EXTRA_COLOR_CODE);
|
mColorCode = getArguments().getInt(EXTRA_COLOR_CODE);
|
||||||
mAddTextEditText.setTextColor(mColorCode);
|
mAddTextEditText.setTextColor(mColorCode);
|
||||||
mInputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
mInputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||||
|
|
||||||
//Make a callback on activity when user is done with text editing
|
//Make a callback on activity when user is done with text editing
|
||||||
mAddTextDoneTextView.setOnClickListener(new View.OnClickListener() {
|
mAddTextDoneTextView.setOnClickListener(view1 -> {
|
||||||
@Override
|
mInputMethodManager.hideSoftInputFromWindow(view1.getWindowToken(), 0);
|
||||||
public void onClick(View view) {
|
|
||||||
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
|
||||||
dismiss();
|
dismiss();
|
||||||
String inputText = mAddTextEditText.getText().toString();
|
String inputText = mAddTextEditText.getText().toString();
|
||||||
if (!TextUtils.isEmpty(inputText) && mTextEditor != null) {
|
if (!TextUtils.isEmpty(inputText) && mTextEditor != null) {
|
||||||
mTextEditor.onDone(inputText, mColorCode);
|
mTextEditor.onDone(inputText, mColorCode);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class EditingToolsAdapter extends RecyclerView.Adapter<EditingToolsAdapte
|
||||||
void onToolSelected(ToolType toolType);
|
void onToolSelected(ToolType toolType);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ToolModel {
|
static class ToolModel {
|
||||||
private String mToolName;
|
private String mToolName;
|
||||||
private int mToolIcon;
|
private int mToolIcon;
|
||||||
private ToolType mToolType;
|
private ToolType mToolType;
|
||||||
|
@ -80,12 +80,7 @@ public class EditingToolsAdapter extends RecyclerView.Adapter<EditingToolsAdapte
|
||||||
super(itemView);
|
super(itemView);
|
||||||
imgToolIcon = itemView.findViewById(R.id.imgToolIcon);
|
imgToolIcon = itemView.findViewById(R.id.imgToolIcon);
|
||||||
txtTool = itemView.findViewById(R.id.txtTool);
|
txtTool = itemView.findViewById(R.id.txtTool);
|
||||||
itemView.setOnClickListener(new View.OnClickListener() {
|
itemView.setOnClickListener(v -> mOnItemSelected.onToolSelected(mToolList.get(getLayoutPosition()).mToolType));
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
mOnItemSelected.onToolSelected(mToolList.get(getLayoutPosition()).mToolType);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -93,22 +93,16 @@ public class BackupNotificationInDataBaseService extends IntentService {
|
||||||
}
|
}
|
||||||
boolean finalToastMessage = toastMessage;
|
boolean finalToastMessage = toastMessage;
|
||||||
if (instanceRunning == 0) {
|
if (instanceRunning == 0) {
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalToastMessage) {
|
if (finalToastMessage) {
|
||||||
Toasty.info(BackupNotificationInDataBaseService.this, getString(R.string.data_export_start), Toast.LENGTH_LONG).show();
|
Toasty.info(BackupNotificationInDataBaseService.this, getString(R.string.data_export_start), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalToastMessage) {
|
if (finalToastMessage) {
|
||||||
Toasty.info(BackupNotificationInDataBaseService.this, getString(R.string.data_export_running), Toast.LENGTH_LONG).show();
|
Toasty.info(BackupNotificationInDataBaseService.this, getString(R.string.data_export_running), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -161,13 +155,10 @@ public class BackupNotificationInDataBaseService extends IntentService {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = getString(R.string.data_export_error, account.getAcct());
|
message = getString(R.string.data_export_error, account.getAcct());
|
||||||
final String finalMessage = message;
|
final String finalMessage = message;
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalToastMessage) {
|
if (finalToastMessage) {
|
||||||
Toasty.error(BackupNotificationInDataBaseService.this, finalMessage, Toast.LENGTH_LONG).show();
|
Toasty.error(BackupNotificationInDataBaseService.this, finalMessage, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
instanceRunning--;
|
instanceRunning--;
|
||||||
|
|
|
@ -94,22 +94,16 @@ public class BackupStatusInDataBaseService extends IntentService {
|
||||||
}
|
}
|
||||||
boolean finalToastMessage = toastMessage;
|
boolean finalToastMessage = toastMessage;
|
||||||
if (instanceRunning == 0) {
|
if (instanceRunning == 0) {
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalToastMessage) {
|
if (finalToastMessage) {
|
||||||
Toasty.info(BackupStatusInDataBaseService.this, getString(R.string.data_export_start), Toast.LENGTH_LONG).show();
|
Toasty.info(BackupStatusInDataBaseService.this, getString(R.string.data_export_start), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalToastMessage) {
|
if (finalToastMessage) {
|
||||||
Toasty.info(BackupStatusInDataBaseService.this, getString(R.string.data_export_running), Toast.LENGTH_LONG).show();
|
Toasty.info(BackupStatusInDataBaseService.this, getString(R.string.data_export_running), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -159,13 +153,10 @@ public class BackupStatusInDataBaseService extends IntentService {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = getString(R.string.data_export_error, account.getAcct());
|
message = getString(R.string.data_export_error, account.getAcct());
|
||||||
final String finalMessage = message;
|
final String finalMessage = message;
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalToastMessage) {
|
if (finalToastMessage) {
|
||||||
Toasty.error(BackupStatusInDataBaseService.this, finalMessage, Toast.LENGTH_LONG).show();
|
Toasty.error(BackupStatusInDataBaseService.this, finalMessage, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
instanceRunning--;
|
instanceRunning--;
|
||||||
|
|
|
@ -86,19 +86,9 @@ public class BackupStatusService extends IntentService {
|
||||||
@Override
|
@Override
|
||||||
protected void onHandleIntent(@Nullable Intent intent) {
|
protected void onHandleIntent(@Nullable Intent intent) {
|
||||||
if (instanceRunning == 0) {
|
if (instanceRunning == 0) {
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> Toasty.info(BackupStatusService.this, getString(R.string.data_export_start), Toast.LENGTH_LONG).show());
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toasty.info(BackupStatusService.this, getString(R.string.data_export_start), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> Toasty.info(BackupStatusService.this, getString(R.string.data_export_running), Toast.LENGTH_LONG).show());
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toasty.info(BackupStatusService.this, getString(R.string.data_export_running), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
instanceRunning++;
|
instanceRunning++;
|
||||||
|
@ -164,7 +154,6 @@ public class BackupStatusService extends IntentService {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||||
content = Html.fromHtml(status.getContent(), Html.FROM_HTML_MODE_LEGACY).toString();
|
content = Html.fromHtml(status.getContent(), Html.FROM_HTML_MODE_LEGACY).toString();
|
||||||
else
|
else
|
||||||
//noinspection deprecation
|
|
||||||
content = Html.fromHtml(status.getContent()).toString();
|
content = Html.fromHtml(status.getContent()).toString();
|
||||||
builder.append("\"").append(content.replace("\"", "'").replace("\n", " ")).append("\"").append(',');
|
builder.append("\"").append(content.replace("\"", "'").replace("\n", " ")).append("\"").append(',');
|
||||||
builder.append("\"").append(Helper.shortDateTime(BackupStatusService.this, status.getCreated_at())).append("\"").append(',');
|
builder.append("\"").append(Helper.shortDateTime(BackupStatusService.this, status.getCreated_at())).append("\"").append(',');
|
||||||
|
@ -198,12 +187,7 @@ public class BackupStatusService extends IntentService {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = getString(R.string.data_export_error, account.getAcct());
|
message = getString(R.string.data_export_error, account.getAcct());
|
||||||
final String finalMessage = message;
|
final String finalMessage = message;
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(() -> Toasty.error(BackupStatusService.this, finalMessage, Toast.LENGTH_LONG).show());
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toasty.error(BackupStatusService.this, finalMessage, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
instanceRunning--;
|
instanceRunning--;
|
||||||
|
|
||||||
|
|
|
@ -210,6 +210,7 @@ public class LiveNotificationDelayedService extends Service {
|
||||||
|
|
||||||
private void startThread(Account accountStream, String key) {
|
private void startThread(Account accountStream, String key) {
|
||||||
Thread thread = new Thread() {
|
Thread thread = new Thread() {
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
while (fetch) {
|
while (fetch) {
|
||||||
|
@ -236,6 +237,7 @@ public class LiveNotificationDelayedService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
private void taks(Account account) {
|
private void taks(Account account) {
|
||||||
String key = account.getUsername() + "@" + account.getInstance();
|
String key = account.getUsername() + "@" + account.getInstance();
|
||||||
APIResponse apiResponse;
|
APIResponse apiResponse;
|
||||||
|
@ -433,9 +435,7 @@ public class LiveNotificationDelayedService extends Service {
|
||||||
final String finalMessage = message;
|
final String finalMessage = message;
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Helper.NotifType finalNotifType = notifType;
|
Helper.NotifType finalNotifType = notifType;
|
||||||
Runnable myRunnable = new Runnable() {
|
Runnable myRunnable = () -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (finalMessage != null) {
|
if (finalMessage != null) {
|
||||||
Glide.with(LiveNotificationDelayedService.this)
|
Glide.with(LiveNotificationDelayedService.this)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
@ -466,7 +466,6 @@ public class LiveNotificationDelayedService extends Service {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
mainHandler.post(myRunnable);
|
mainHandler.post(myRunnable);
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,6 @@ public class LiveNotificationService extends Service implements NetworkStateRece
|
||||||
for (Thread t : Thread.getAllStackTraces().keySet()) {
|
for (Thread t : Thread.getAllStackTraces().keySet()) {
|
||||||
if (t.getName().startsWith("notif_live_")) {
|
if (t.getName().startsWith("notif_live_")) {
|
||||||
t.interrupt();
|
t.interrupt();
|
||||||
t = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
|
|
|
@ -29,7 +29,6 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
import com.koushikdutta.async.http.AsyncHttpClient;
|
import com.koushikdutta.async.http.AsyncHttpClient;
|
||||||
import com.koushikdutta.async.http.AsyncHttpRequest;
|
import com.koushikdutta.async.http.AsyncHttpRequest;
|
||||||
import com.koushikdutta.async.http.Headers;
|
import com.koushikdutta.async.http.Headers;
|
||||||
import com.koushikdutta.async.http.WebSocket;
|
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -37,8 +36,6 @@ import org.json.JSONObject;
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
|
||||||
|
|
||||||
import app.fedilab.android.client.API;
|
import app.fedilab.android.client.API;
|
||||||
import app.fedilab.android.client.Entities.Account;
|
import app.fedilab.android.client.Entities.Account;
|
||||||
import app.fedilab.android.client.Entities.Status;
|
import app.fedilab.android.client.Entities.Status;
|
||||||
|
@ -55,7 +52,6 @@ import app.fedilab.android.sqlite.Sqlite;
|
||||||
|
|
||||||
public class StreamingFederatedTimelineService extends IntentService {
|
public class StreamingFederatedTimelineService extends IntentService {
|
||||||
|
|
||||||
private static HttpsURLConnection httpsURLConnection;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Helper.installProvider();
|
Helper.installProvider();
|
||||||
|
@ -116,21 +112,16 @@ public class StreamingFederatedTimelineService extends IntentService {
|
||||||
try {
|
try {
|
||||||
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(new TLSSocketFactory(accountStream.getInstance()).getSSLContext());
|
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(new TLSSocketFactory(accountStream.getInstance()).getSSLContext());
|
||||||
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setConnectAllAddresses(true);
|
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setConnectAllAddresses(true);
|
||||||
} catch (KeyManagementException e) {
|
} catch (KeyManagementException | NoSuchAlgorithmException e) {
|
||||||
e.printStackTrace();
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AsyncHttpClient.getDefaultInstance().websocket("wss://" + accountStream.getInstance() + "/api/v1/streaming/?stream=public&access_token=" + accountStream.getToken(), "wss", new AsyncHttpClient.WebSocketConnectCallback() {
|
AsyncHttpClient.getDefaultInstance().websocket("wss://" + accountStream.getInstance() + "/api/v1/streaming/?stream=public&access_token=" + accountStream.getToken(), "wss", (ex, webSocket) -> {
|
||||||
@Override
|
|
||||||
public void onCompleted(Exception ex, WebSocket webSocket) {
|
|
||||||
if (ex != null) {
|
if (ex != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
webSocket.setStringCallback(new WebSocket.StringCallback() {
|
webSocket.setStringCallback(s -> {
|
||||||
public void onStringAvailable(String s) {
|
|
||||||
if (!sharedpreferences.getBoolean(Helper.SHOULD_CONTINUE_STREAMING_FEDERATED + finalAccountStream.getId() + finalAccountStream.getInstance(), true)) {
|
if (!sharedpreferences.getBoolean(Helper.SHOULD_CONTINUE_STREAMING_FEDERATED + finalAccountStream.getId() + finalAccountStream.getInstance(), true)) {
|
||||||
stopSelf();
|
stopSelf();
|
||||||
return;
|
return;
|
||||||
|
@ -141,9 +132,7 @@ public class StreamingFederatedTimelineService extends IntentService {
|
||||||
onRetrieveStreaming(finalAccountStream, eventJson);
|
onRetrieveStreaming(finalAccountStream, eventJson);
|
||||||
} catch (JSONException ignored) {
|
} catch (JSONException ignored) {
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
import com.koushikdutta.async.http.AsyncHttpClient;
|
import com.koushikdutta.async.http.AsyncHttpClient;
|
||||||
import com.koushikdutta.async.http.AsyncHttpRequest;
|
import com.koushikdutta.async.http.AsyncHttpRequest;
|
||||||
import com.koushikdutta.async.http.Headers;
|
import com.koushikdutta.async.http.Headers;
|
||||||
import com.koushikdutta.async.http.WebSocket;
|
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -37,8 +36,6 @@ import org.json.JSONObject;
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
|
||||||
|
|
||||||
import app.fedilab.android.client.API;
|
import app.fedilab.android.client.API;
|
||||||
import app.fedilab.android.client.Entities.Account;
|
import app.fedilab.android.client.Entities.Account;
|
||||||
import app.fedilab.android.client.Entities.Status;
|
import app.fedilab.android.client.Entities.Status;
|
||||||
|
@ -55,7 +52,6 @@ import app.fedilab.android.sqlite.Sqlite;
|
||||||
|
|
||||||
public class StreamingHomeTimelineService extends IntentService {
|
public class StreamingHomeTimelineService extends IntentService {
|
||||||
|
|
||||||
private static HttpsURLConnection httpsURLConnection;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Helper.installProvider();
|
Helper.installProvider();
|
||||||
|
@ -116,21 +112,16 @@ public class StreamingHomeTimelineService extends IntentService {
|
||||||
try {
|
try {
|
||||||
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(new TLSSocketFactory(accountStream.getInstance()).getSSLContext());
|
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(new TLSSocketFactory(accountStream.getInstance()).getSSLContext());
|
||||||
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setConnectAllAddresses(true);
|
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setConnectAllAddresses(true);
|
||||||
} catch (KeyManagementException e) {
|
} catch (KeyManagementException | NoSuchAlgorithmException e) {
|
||||||
e.printStackTrace();
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AsyncHttpClient.getDefaultInstance().websocket("wss://" + accountStream.getInstance() + "/api/v1/streaming/?stream=user&access_token=" + accountStream.getToken(), "wss", new AsyncHttpClient.WebSocketConnectCallback() {
|
AsyncHttpClient.getDefaultInstance().websocket("wss://" + accountStream.getInstance() + "/api/v1/streaming/?stream=user&access_token=" + accountStream.getToken(), "wss", (ex, webSocket) -> {
|
||||||
@Override
|
|
||||||
public void onCompleted(Exception ex, WebSocket webSocket) {
|
|
||||||
if (ex != null) {
|
if (ex != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
webSocket.setStringCallback(new WebSocket.StringCallback() {
|
webSocket.setStringCallback(s -> {
|
||||||
public void onStringAvailable(String s) {
|
|
||||||
if (!sharedpreferences.getBoolean(Helper.SHOULD_CONTINUE_STREAMING_HOME + finalAccountStream.getId() + finalAccountStream.getInstance(), true)) {
|
if (!sharedpreferences.getBoolean(Helper.SHOULD_CONTINUE_STREAMING_HOME + finalAccountStream.getId() + finalAccountStream.getInstance(), true)) {
|
||||||
stopSelf();
|
stopSelf();
|
||||||
return;
|
return;
|
||||||
|
@ -141,9 +132,7 @@ public class StreamingHomeTimelineService extends IntentService {
|
||||||
onRetrieveStreaming(finalAccountStream, eventJson);
|
onRetrieveStreaming(finalAccountStream, eventJson);
|
||||||
} catch (JSONException ignored) {
|
} catch (JSONException ignored) {
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
import com.koushikdutta.async.http.AsyncHttpClient;
|
import com.koushikdutta.async.http.AsyncHttpClient;
|
||||||
import com.koushikdutta.async.http.AsyncHttpRequest;
|
import com.koushikdutta.async.http.AsyncHttpRequest;
|
||||||
import com.koushikdutta.async.http.Headers;
|
import com.koushikdutta.async.http.Headers;
|
||||||
import com.koushikdutta.async.http.WebSocket;
|
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -37,8 +36,6 @@ import org.json.JSONObject;
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
|
||||||
|
|
||||||
import app.fedilab.android.client.API;
|
import app.fedilab.android.client.API;
|
||||||
import app.fedilab.android.client.Entities.Account;
|
import app.fedilab.android.client.Entities.Account;
|
||||||
import app.fedilab.android.client.Entities.Status;
|
import app.fedilab.android.client.Entities.Status;
|
||||||
|
@ -55,7 +52,6 @@ import app.fedilab.android.sqlite.Sqlite;
|
||||||
|
|
||||||
public class StreamingLocalTimelineService extends IntentService {
|
public class StreamingLocalTimelineService extends IntentService {
|
||||||
|
|
||||||
private static HttpsURLConnection httpsURLConnection;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Helper.installProvider();
|
Helper.installProvider();
|
||||||
|
@ -117,21 +113,16 @@ public class StreamingLocalTimelineService extends IntentService {
|
||||||
try {
|
try {
|
||||||
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(new TLSSocketFactory(accountStream.getInstance()).getSSLContext());
|
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(new TLSSocketFactory(accountStream.getInstance()).getSSLContext());
|
||||||
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setConnectAllAddresses(true);
|
AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setConnectAllAddresses(true);
|
||||||
} catch (KeyManagementException e) {
|
} catch (KeyManagementException | NoSuchAlgorithmException e) {
|
||||||
e.printStackTrace();
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AsyncHttpClient.getDefaultInstance().websocket("wss://" + accountStream.getInstance() + "/api/v1/streaming/?stream=public:local&access_token=" + accountStream.getToken(), "wss", new AsyncHttpClient.WebSocketConnectCallback() {
|
AsyncHttpClient.getDefaultInstance().websocket("wss://" + accountStream.getInstance() + "/api/v1/streaming/?stream=public:local&access_token=" + accountStream.getToken(), "wss", (ex, webSocket) -> {
|
||||||
@Override
|
|
||||||
public void onCompleted(Exception ex, WebSocket webSocket) {
|
|
||||||
if (ex != null) {
|
if (ex != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
webSocket.setStringCallback(new WebSocket.StringCallback() {
|
webSocket.setStringCallback(s -> {
|
||||||
public void onStringAvailable(String s) {
|
|
||||||
if (!sharedpreferences.getBoolean(Helper.SHOULD_CONTINUE_STREAMING_LOCAL + finalAccountStream.getId() + finalAccountStream.getInstance(), true)) {
|
if (!sharedpreferences.getBoolean(Helper.SHOULD_CONTINUE_STREAMING_LOCAL + finalAccountStream.getId() + finalAccountStream.getInstance(), true)) {
|
||||||
stopSelf();
|
stopSelf();
|
||||||
return;
|
return;
|
||||||
|
@ -141,9 +132,7 @@ public class StreamingLocalTimelineService extends IntentService {
|
||||||
onRetrieveStreaming(finalAccountStream, eventJson);
|
onRetrieveStreaming(finalAccountStream, eventJson);
|
||||||
} catch (JSONException ignored) {
|
} catch (JSONException ignored) {
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,8 @@ public class DomainBlockDAO {
|
||||||
values.put(Sqlite.COL_DOMAIN, domain);
|
values.put(Sqlite.COL_DOMAIN, domain);
|
||||||
try {
|
try {
|
||||||
db.insert(Sqlite.TABLE_TRACKING_BLOCK, null, values);
|
db.insert(Sqlite.TABLE_TRACKING_BLOCK, null, values);
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
android:id="@+id/account_un"
|
android:id="@+id/account_un"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -268,7 +268,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/blue_border"
|
android:background="@drawable/blue_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textColor="@color/mastodonC4"
|
android:textColor="@color/mastodonC4"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/blue_border"
|
android:background="@drawable/blue_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:textColor="@color/mastodonC4" />
|
android:textColor="@color/mastodonC4" />
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/green_border"
|
android:background="@drawable/green_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/followed_by"
|
android:text="@string/followed_by"
|
||||||
android:textColor="@color/verified_text"
|
android:textColor="@color/verified_text"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
@ -302,7 +302,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/blue_border"
|
android:background="@drawable/blue_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/request_sent"
|
android:text="@string/request_sent"
|
||||||
android:textColor="@color/mastodonC4"
|
android:textColor="@color/mastodonC4"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
@ -521,7 +521,7 @@
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
android:id="@+id/account_un"
|
android:id="@+id/account_un"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/toots" />
|
android:text="@string/toots" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/following" />
|
android:text="@string/following" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/followers" />
|
android:text="@string/followers" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/request_sent"
|
android:text="@string/request_sent"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/set_change_profile_picture"
|
android:id="@+id/set_change_profile_picture"
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
android:hint="@string/instance_example"
|
android:hint="@string/instance_example"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="textWebEmailAddress"
|
android:inputType="textWebEmailAddress"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
android:drawableStart="@drawable/ic_check_circle"
|
android:drawableStart="@drawable/ic_check_circle"
|
||||||
android:drawablePadding="10dp"
|
android:drawablePadding="10dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingStart="15dp"
|
android:paddingStart="15dp"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="12dp"
|
||||||
android:paddingEnd="20dp"
|
android:paddingEnd="20dp"
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/username"
|
android:hint="@string/username"
|
||||||
android:inputType="textEmailAddress"
|
android:inputType="textEmailAddress"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/password"
|
android:hint="@string/password"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
android:drawableStart="@drawable/mastodon_icon"
|
android:drawableStart="@drawable/mastodon_icon"
|
||||||
android:drawablePadding="10dp"
|
android:drawablePadding="10dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingStart="15dp"
|
android:paddingStart="15dp"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="12dp"
|
||||||
android:paddingEnd="20dp"
|
android:paddingEnd="20dp"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
android:drawableEnd="@drawable/ic_search"
|
android:drawableEnd="@drawable/ic_search"
|
||||||
android:drawableRight="@drawable/ic_search"
|
android:drawableRight="@drawable/ic_search"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/loader"
|
android:id="@+id/loader"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
|
<com.google.android.exoplayer2.ui.PlayerView
|
||||||
android:id="@+id/media_video"
|
android:id="@+id/media_video"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:hint="@string/title_video_peertube"
|
android:hint="@string/title_video_peertube"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<!-- Videos upload submit -->
|
<!-- Videos upload submit -->
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
android:id="@+id/account_un"
|
android:id="@+id/account_un"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -277,7 +277,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/blue_border"
|
android:background="@drawable/blue_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textColor="@color/mastodonC4"
|
android:textColor="@color/mastodonC4"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/blue_border"
|
android:background="@drawable/blue_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:textColor="@color/mastodonC4" />
|
android:textColor="@color/mastodonC4" />
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/green_border"
|
android:background="@drawable/green_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/followed_by"
|
android:text="@string/followed_by"
|
||||||
android:textColor="@color/verified_text"
|
android:textColor="@color/verified_text"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
@ -311,7 +311,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
android:background="@drawable/blue_border"
|
android:background="@drawable/blue_border"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/request_sent"
|
android:text="@string/request_sent"
|
||||||
android:textColor="@color/mastodonC4"
|
android:textColor="@color/mastodonC4"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
@ -528,7 +528,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -26,5 +26,5 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textWebEmailAddress"
|
android:inputType="textWebEmailAddress"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/action_lists_title_placeholder"
|
android:hint="@string/action_lists_title_placeholder"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -19,7 +19,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
android:hint="@string/create_folder"
|
android:hint="@string/create_folder"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -51,7 +51,7 @@
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center_horizontal|top"
|
android:gravity="center_horizontal|top"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingLeft="5dp"
|
android:paddingLeft="5dp"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
android:id="@+id/account_un"
|
android:id="@+id/account_un"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/toots" />
|
android:text="@string/toots" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/following" />
|
android:text="@string/following" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/followers" />
|
android:text="@string/followers" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/request_sent"
|
android:text="@string/request_sent"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
android:id="@+id/account_un"
|
android:id="@+id/account_un"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/request_sent"
|
android:text="@string/request_sent"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintBottom_toTopOf="@id/account_un"
|
app:layout_constraintBottom_toTopOf="@id/account_un"
|
||||||
app:layout_constraintLeft_toRightOf="@id/account_pp"
|
app:layout_constraintLeft_toRightOf="@id/account_pp"
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
app:layout_constraintBottom_toTopOf="@id/btn_top_barrier"
|
app:layout_constraintBottom_toTopOf="@id/btn_top_barrier"
|
||||||
app:layout_constraintLeft_toRightOf="@id/account_pp"
|
app:layout_constraintLeft_toRightOf="@id/account_pp"
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- Content description set programmatically -->
|
<!-- Content description set programmatically -->
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
android:id="@+id/account_un"
|
android:id="@+id/account_un"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/toots" />
|
android:text="@string/toots" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/following" />
|
android:text="@string/following" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/followers" />
|
android:text="@string/followers" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -44,6 +44,6 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -36,7 +36,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
|
@ -45,5 +45,5 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -37,6 +37,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:singleLine="true" />
|
||||||
android:maxLines="1" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -129,7 +129,7 @@
|
||||||
android:drawableStart="@drawable/ic_remove_red_eye"
|
android:drawableStart="@drawable/ic_remove_red_eye"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
android:drawableStart="@drawable/ic_photo"
|
android:drawableStart="@drawable/ic_photo"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
android:id="@+id/account_dn"
|
android:id="@+id/account_dn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/status_account_profile_boost_by"
|
app:layout_constraintBottom_toBottomOf="@id/status_account_profile_boost_by"
|
||||||
app:layout_constraintEnd_toStartOf="@id/status_boosted_date"
|
app:layout_constraintEnd_toStartOf="@id/status_boosted_date"
|
||||||
|
@ -273,7 +273,7 @@
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toTopOf="@id/status_account_username"
|
app:layout_constraintBottom_toTopOf="@id/status_account_username"
|
||||||
|
@ -302,7 +302,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/barrier_account_info_bottom"
|
app:layout_constraintBottom_toBottomOf="@id/barrier_account_info_bottom"
|
||||||
|
@ -315,7 +315,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/status_account_username"
|
app:layout_constraintBottom_toBottomOf="@id/status_account_username"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -360,7 +360,7 @@
|
||||||
android:drawableStart="@drawable/ic_remove_red_eye"
|
android:drawableStart="@drawable/ic_remove_red_eye"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:text="@string/load_attachment_spoiler"
|
android:text="@string/load_attachment_spoiler"
|
||||||
|
@ -387,7 +387,7 @@
|
||||||
android:drawableStart="@drawable/ic_more_toot_content"
|
android:drawableStart="@drawable/ic_more_toot_content"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@string/display_toot_truncate"
|
android:text="@string/display_toot_truncate"
|
||||||
|
@ -403,7 +403,7 @@
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -503,7 +503,6 @@
|
||||||
android:id="@+id/status_cardview_title"
|
android:id="@+id/status_cardview_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
@ -521,7 +520,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1100,7 +1099,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/fetch_more_toots"
|
android:text="@string/fetch_more_toots"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
|
|
@ -215,7 +215,7 @@
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toTopOf="@id/status_account_username"
|
app:layout_constraintBottom_toTopOf="@id/status_account_username"
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_status_account_info"
|
app:layout_constraintBottom_toTopOf="@id/barrier_status_account_info"
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/status_account_username"
|
app:layout_constraintBottom_toBottomOf="@id/status_account_username"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -301,7 +301,7 @@
|
||||||
android:drawableStart="@drawable/ic_remove_red_eye"
|
android:drawableStart="@drawable/ic_remove_red_eye"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:text="@string/load_attachment_spoiler"
|
android:text="@string/load_attachment_spoiler"
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
android:drawableStart="@drawable/ic_more_toot_content"
|
android:drawableStart="@drawable/ic_more_toot_content"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@string/display_toot_truncate"
|
android:text="@string/display_toot_truncate"
|
||||||
|
@ -430,7 +430,7 @@
|
||||||
android:id="@+id/status_cardview_title"
|
android:id="@+id/status_cardview_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -837,7 +837,7 @@
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
|
@ -1073,7 +1073,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/fetch_more_toots"
|
android:text="@string/fetch_more_toots"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
android:layout_marginLeft="-2dp"
|
android:layout_marginLeft="-2dp"
|
||||||
android:layout_marginTop="-2dp"
|
android:layout_marginTop="-2dp"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
android:layout_marginLeft="2dp"
|
android:layout_marginLeft="2dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
android:drawableLeft="@drawable/ic_remove_red_eye"
|
android:drawableLeft="@drawable/ic_remove_red_eye"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
android:drawableLeft="@drawable/ic_more_toot_content"
|
android:drawableLeft="@drawable/ic_more_toot_content"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@string/display_toot_truncate"
|
android:text="@string/display_toot_truncate"
|
||||||
|
@ -381,7 +381,7 @@
|
||||||
android:id="@+id/status_cardview_title"
|
android:id="@+id/status_cardview_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -759,7 +759,7 @@
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
|
@ -974,7 +974,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/fetch_more_toots"
|
android:text="@string/fetch_more_toots"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -207,7 +207,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -234,7 +234,7 @@
|
||||||
android:drawableLeft="@drawable/ic_remove_red_eye"
|
android:drawableLeft="@drawable/ic_remove_red_eye"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:text="@string/load_attachment_spoiler"
|
android:text="@string/load_attachment_spoiler"
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
android:drawableStart="@drawable/ic_more_toot_content"
|
android:drawableStart="@drawable/ic_more_toot_content"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@string/display_toot_truncate"
|
android:text="@string/display_toot_truncate"
|
||||||
|
@ -362,7 +362,7 @@
|
||||||
android:id="@+id/status_cardview_title"
|
android:id="@+id/status_cardview_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -757,7 +757,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
|
@ -963,7 +963,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/fetch_more_toots"
|
android:text="@string/fetch_more_toots"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawablePadding="2dp"
|
android:drawablePadding="2dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
|
@ -37,5 +37,5 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/filter_regex"
|
android:hint="@string/filter_regex"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -844,7 +844,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_mention"
|
android:text="@string/channel_notif_mention"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
|
@ -855,7 +855,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_follow"
|
android:text="@string/channel_notif_follow"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -872,7 +872,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_boost"
|
android:text="@string/channel_notif_boost"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
|
@ -883,7 +883,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_fav"
|
android:text="@string/channel_notif_fav"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
|
@ -901,7 +901,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_poll"
|
android:text="@string/channel_notif_poll"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_media"
|
android:text="@string/channel_notif_media"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -929,7 +929,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/channel_notif_backup"
|
android:text="@string/channel_notif_backup"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
|
@ -1738,6 +1738,37 @@
|
||||||
android:text="@string/set_video_mode_indication"
|
android:text="@string/set_video_mode_indication"
|
||||||
android:textColor="@color/mastodonC2" />
|
android:textColor="@color/mastodonC2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/set_video_cache"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/set_video_cache"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/set_video_cache_size"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<!-- Featured tags -->
|
<!-- Featured tags -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/settings_option_margin"
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
@ -1862,7 +1893,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:text="@string/set_folder_title"
|
android:text="@string/set_folder_title"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
@ -2544,7 +2575,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/set_nitter_host"
|
android:id="@+id/set_nitter_host"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -2553,6 +2583,52 @@
|
||||||
android:hint="@string/set_nitter_host"
|
android:hint="@string/set_nitter_host"
|
||||||
android:inputType="textWebEditText" />
|
android:inputType="textWebEditText" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_bibliogram"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_bibliogram_indication"
|
||||||
|
android:textColor="@color/mastodonC2"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_bibliogram"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/set_bibliogram_host"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:hint="@string/set_bibliogram_host"
|
||||||
|
android:inputType="textWebEditText" />
|
||||||
|
|
||||||
<!-- utm parameters -->
|
<!-- utm parameters -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
|
<com.google.android.exoplayer2.ui.PlayerView
|
||||||
android:id="@+id/media_video"
|
android:id="@+id/media_video"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
android:id="@+id/username"
|
android:id="@+id/username"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableEnd="@drawable/ic_search"
|
android:drawableEnd="@drawable/ic_search"
|
||||||
android:drawableRight="@drawable/ic_search"
|
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/loader"
|
android:id="@+id/loader"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/instance"
|
android:hint="@string/instance"
|
||||||
android:inputType="textWebEmailAddress"
|
android:inputType="textWebEmailAddress"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/set_attachment_group"
|
android:id="@+id/set_attachment_group"
|
||||||
|
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/action_search"
|
android:hint="@string/action_search"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -47,7 +47,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
<androidx.appcompat.widget.SearchView
|
<androidx.appcompat.widget.SearchView
|
||||||
|
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/some_words_all"
|
android:hint="@string/some_words_all"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/some_words_any"
|
android:hint="@string/some_words_any"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/some_tags"
|
android:hint="@string/some_tags"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -10,5 +10,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/change_tag_column"
|
android:hint="@string/change_tag_column"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1" />
|
android:singleLine="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -36,6 +36,6 @@
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxLines="1"
|
android:singleLine="true"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1105,6 +1105,11 @@
|
||||||
<string name="set_nitter_indication">Nitter is an open source alternative Twitter front-end focused on privacy.</string>
|
<string name="set_nitter_indication">Nitter is an open source alternative Twitter front-end focused on privacy.</string>
|
||||||
<string name="set_nitter_host">Enter your custom host or leave blank for using nitter.net</string>
|
<string name="set_nitter_host">Enter your custom host or leave blank for using nitter.net</string>
|
||||||
|
|
||||||
|
|
||||||
|
<string name="set_bibliogram">Replace Instagram with Bibliogram</string>
|
||||||
|
<string name="set_bibliogram_indication">Bibliogram is an open source alternative Instagram front-end focused on privacy.</string>
|
||||||
|
<string name="set_bibliogram_host">Enter your custom host or leave blank for using bibliogram.art</string>
|
||||||
|
|
||||||
<string name="set_hide_status_bar">Hide Fedilab notification bar</string>
|
<string name="set_hide_status_bar">Hide Fedilab notification bar</string>
|
||||||
<string name="set_hide_status_bar_indication">For hiding the remaining notification in the status bar, tap on the eye icon button then uncheck: \"Display in status bar\"</string>
|
<string name="set_hide_status_bar_indication">For hiding the remaining notification in the status bar, tap on the eye icon button then uncheck: \"Display in status bar\"</string>
|
||||||
<string name="set_live_type_indication">Notifications will be delayed every 30 seconds. That will allow to drain less battery.</string>
|
<string name="set_live_type_indication">Notifications will be delayed every 30 seconds. That will allow to drain less battery.</string>
|
||||||
|
@ -1226,4 +1231,5 @@
|
||||||
<string name="no_announcements">No announcements!</string>
|
<string name="no_announcements">No announcements!</string>
|
||||||
<string name="add_reaction">Add a reaction</string>
|
<string name="add_reaction">Add a reaction</string>
|
||||||
<string name="set_custom_tabs_indication">Use your favourite browser inside the app. Uncheck this feature to open links externally.</string>
|
<string name="set_custom_tabs_indication">Use your favourite browser inside the app. Uncheck this feature to open links externally.</string>
|
||||||
|
<string name="set_video_cache">Video cache in MB, zero means no cache.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue