mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Improve AMOLED mode
This commit is contained in:
parent
2d7d898bfe
commit
6d93db79b8
19 changed files with 114 additions and 32 deletions
|
@ -19,6 +19,7 @@
|
||||||
package com.github.dfa.diaspora_android.activity;
|
package com.github.dfa.diaspora_android.activity;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.widget.AppCompatImageView;
|
import android.support.v7.widget.AppCompatImageView;
|
||||||
|
@ -56,7 +57,15 @@ public class AspectListFragment extends ThemedFragment implements OnSomethingCli
|
||||||
|
|
||||||
public static final String TAG = "com.github.dfa.diaspora_android.AspectListFragment";
|
public static final String TAG = "com.github.dfa.diaspora_android.AspectListFragment";
|
||||||
|
|
||||||
protected RecyclerView aspectsRecyclerView;
|
@BindView(R.id.fragment_list__recycler_view)
|
||||||
|
public RecyclerView aspectsRecyclerView;
|
||||||
|
|
||||||
|
@BindView(R.id.fragment_list__spacer)
|
||||||
|
public View space;
|
||||||
|
|
||||||
|
@BindView(R.id.fragment_list__root)
|
||||||
|
public RelativeLayout rootView;
|
||||||
|
|
||||||
protected App app;
|
protected App app;
|
||||||
protected DiasporaUrlHelper urls;
|
protected DiasporaUrlHelper urls;
|
||||||
|
|
||||||
|
@ -69,7 +78,7 @@ public class AspectListFragment extends ThemedFragment implements OnSomethingCli
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
aspectsRecyclerView = (RecyclerView) view.findViewById(R.id.fragment_list__recycler_view);
|
ButterKnife.bind(this, view);
|
||||||
app = (App) getActivity().getApplication();
|
app = (App) getActivity().getApplication();
|
||||||
AppSettings appSettings = app.getSettings();
|
AppSettings appSettings = app.getSettings();
|
||||||
urls = new DiasporaUrlHelper(appSettings);
|
urls = new DiasporaUrlHelper(appSettings);
|
||||||
|
@ -110,9 +119,14 @@ public class AspectListFragment extends ThemedFragment implements OnSomethingCli
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
aspectsRecyclerView.invalidate();
|
aspectsRecyclerView.invalidate();
|
||||||
|
if (getAppSettings().isAmoledColorMode()) {
|
||||||
|
rootView.setBackgroundColor(Color.BLACK);
|
||||||
|
space.setBackgroundColor(Color.BLACK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class AspectAdapter extends RecyclerView.Adapter<AspectAdapter.ViewHolder> {
|
public static class AspectAdapter extends RecyclerView.Adapter<AspectAdapter.ViewHolder> {
|
||||||
|
private boolean isAmoledColorMode;
|
||||||
private final AppSettings appSettings;
|
private final AppSettings appSettings;
|
||||||
private final DiasporaAspect[] aspectList;
|
private final DiasporaAspect[] aspectList;
|
||||||
private final List<String> aspectFavsList;
|
private final List<String> aspectFavsList;
|
||||||
|
@ -138,6 +152,7 @@ public class AspectListFragment extends ThemedFragment implements OnSomethingCli
|
||||||
this.aspectList = appSettings.getAspects();
|
this.aspectList = appSettings.getAspects();
|
||||||
this.aspectFavsList = new ArrayList<>(Arrays.asList(appSettings.getAspectFavs()));
|
this.aspectFavsList = new ArrayList<>(Arrays.asList(appSettings.getAspectFavs()));
|
||||||
this.aspectClickedListener = aspectClickedListener;
|
this.aspectClickedListener = aspectClickedListener;
|
||||||
|
this.isAmoledColorMode = appSettings.isAmoledColorMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -159,7 +174,11 @@ public class AspectListFragment extends ThemedFragment implements OnSomethingCli
|
||||||
final DiasporaAspect aspect = aspectList[position];
|
final DiasporaAspect aspect = aspectList[position];
|
||||||
holder.title.setText(aspect.name);
|
holder.title.setText(aspect.name);
|
||||||
if (position % 2 == 1) {
|
if (position % 2 == 1) {
|
||||||
holder.root.setBackgroundColor(Helpers.get().color(R.color.alternate_row_color));
|
holder.root.setBackgroundColor(isAmoledColorMode ? Color.BLACK : Helpers.get().color(R.color.alternate_row_color));
|
||||||
|
holder.title.setTextColor(isAmoledColorMode ? Color.GRAY : Color.BLACK);
|
||||||
|
} else {
|
||||||
|
holder.root.setBackgroundColor(isAmoledColorMode ? Color.BLACK : Color.WHITE);
|
||||||
|
holder.title.setTextColor(isAmoledColorMode ? Color.GRAY : Color.BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Favourite (Star) Image
|
// Favourite (Star) Image
|
||||||
|
@ -191,7 +210,7 @@ public class AspectListFragment extends ThemedFragment implements OnSomethingCli
|
||||||
|
|
||||||
private void applyFavouriteImage(AppCompatImageView imageView, boolean isFaved) {
|
private void applyFavouriteImage(AppCompatImageView imageView, boolean isFaved) {
|
||||||
imageView.setImageResource(isFaved ? R.drawable.ic_star_filled_48px : R.drawable.ic_star_border_black_48px);
|
imageView.setImageResource(isFaved ? R.drawable.ic_star_filled_48px : R.drawable.ic_star_border_black_48px);
|
||||||
imageView.setColorFilter(isFaved ? appSettings.getAccentColor() : 0, PorterDuff.Mode.SRC_ATOP);
|
imageView.setColorFilter(isFaved ? appSettings.getAccentColor() : (isAmoledColorMode ? Color.GRAY : 0), PorterDuff.Mode.SRC_ATOP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,14 +426,6 @@ public class MainActivity extends ThemedActivity
|
||||||
navheaderImage.setImageResource(R.drawable.ic_launcher_test);
|
navheaderImage.setImageResource(R.drawable.ic_launcher_test);
|
||||||
}
|
}
|
||||||
updateNavigationViewEntryVisibilities();
|
updateNavigationViewEntryVisibilities();
|
||||||
|
|
||||||
if (appSettings.isAmoledColorMode()) {
|
|
||||||
navView.setItemTextColor(ColorStateList.valueOf(Color.LTGRAY));
|
|
||||||
navView.setItemIconTintList(ColorStateList.valueOf(Color.LTGRAY));
|
|
||||||
navView.setBackgroundColor(Color.BLACK);
|
|
||||||
navheaderTitle.setTextColor(Color.LTGRAY);
|
|
||||||
navheaderDescription.setTextColor(Color.GRAY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateNavigationViewEntryVisibilities() {
|
protected void updateNavigationViewEntryVisibilities() {
|
||||||
|
@ -1203,6 +1195,13 @@ public class MainActivity extends ThemedActivity
|
||||||
ThemeHelper.updateActionMenuViewColor(toolbarBottom);
|
ThemeHelper.updateActionMenuViewColor(toolbarBottom);
|
||||||
navDrawerLayout.setBackgroundColor(appSettings.getPrimaryColor());
|
navDrawerLayout.setBackgroundColor(appSettings.getPrimaryColor());
|
||||||
navProfilePictureArea.setBackgroundColor(appSettings.getPrimaryColor());
|
navProfilePictureArea.setBackgroundColor(appSettings.getPrimaryColor());
|
||||||
|
if (appSettings.isAmoledColorMode()) {
|
||||||
|
navView.setItemTextColor(ColorStateList.valueOf(Color.GRAY));
|
||||||
|
navView.setItemIconTintList(ColorStateList.valueOf(Color.GRAY));
|
||||||
|
navView.setBackgroundColor(Color.BLACK);
|
||||||
|
navheaderTitle.setTextColor(Color.GRAY);
|
||||||
|
navheaderDescription.setTextColor(Color.DKGRAY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,12 +22,15 @@ import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
|
import android.support.v7.widget.AppCompatButton;
|
||||||
import android.support.v7.widget.SearchView;
|
import android.support.v7.widget.SearchView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -39,6 +42,7 @@ import android.webkit.CookieManager;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
|
@ -73,6 +77,13 @@ public class PodSelectionFragment extends ThemedFragment implements SearchView.O
|
||||||
@BindView(R.id.podselection__fragment__listpods)
|
@BindView(R.id.podselection__fragment__listpods)
|
||||||
protected ListView listViewPod;
|
protected ListView listViewPod;
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__fragment__root)
|
||||||
|
RelativeLayout rootView;
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__fragment__button_use_custom_pod)
|
||||||
|
AppCompatButton buttonUseCustomPod;
|
||||||
|
|
||||||
|
|
||||||
protected App app;
|
protected App app;
|
||||||
protected AppSettings appSettings;
|
protected AppSettings appSettings;
|
||||||
private DiasporaPodList podList;
|
private DiasporaPodList podList;
|
||||||
|
@ -161,7 +172,12 @@ public class PodSelectionFragment extends ThemedFragment implements SearchView.O
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
/* Not really anything to do. Maybe later */
|
int dividerHeight = listViewPod.getDividerHeight();
|
||||||
|
rootView.setBackgroundColor(appSettings.isAmoledColorMode() ? Color.BLACK : Color.WHITE);
|
||||||
|
listViewPod.setDivider(new ColorDrawable(Color.GRAY));
|
||||||
|
listViewPod.setDividerHeight(dividerHeight);
|
||||||
|
buttonUseCustomPod.setSupportBackgroundTintList(ColorStateList.valueOf(appSettings.isAmoledColorMode() ? Color.DKGRAY : Color.WHITE));
|
||||||
|
buttonUseCustomPod.setTextColor(appSettings.isAmoledColorMode() ? Color.WHITE : Color.BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -185,7 +201,7 @@ public class PodSelectionFragment extends ThemedFragment implements SearchView.O
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
View view = super.getView(position, convertView, parent);
|
View view = super.getView(position, convertView, parent);
|
||||||
TextView textView = (TextView) view.findViewById(android.R.id.text1);
|
TextView textView = (TextView) view.findViewById(android.R.id.text1);
|
||||||
textView.setTextColor(Color.BLACK);
|
textView.setTextColor(appSettings.isAmoledColorMode() ? Color.GRAY : Color.BLACK);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
package com.github.dfa.diaspora_android.activity;
|
package com.github.dfa.diaspora_android.activity;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.widget.AppCompatImageView;
|
import android.support.v7.widget.AppCompatImageView;
|
||||||
|
@ -55,7 +56,15 @@ public class TagListFragment extends ThemedFragment implements OnSomethingClickL
|
||||||
|
|
||||||
public static final String TAG = "com.github.dfa.diaspora_android.TagListFragment";
|
public static final String TAG = "com.github.dfa.diaspora_android.TagListFragment";
|
||||||
|
|
||||||
protected RecyclerView followedTagsRecyclerView;
|
@BindView(R.id.fragment_list__recycler_view)
|
||||||
|
public RecyclerView followedTagsRecyclerView;
|
||||||
|
|
||||||
|
@BindView(R.id.fragment_list__spacer)
|
||||||
|
public View space;
|
||||||
|
|
||||||
|
@BindView(R.id.fragment_list__root)
|
||||||
|
public RelativeLayout rootView;
|
||||||
|
|
||||||
protected App app;
|
protected App app;
|
||||||
protected DiasporaUrlHelper urls;
|
protected DiasporaUrlHelper urls;
|
||||||
|
|
||||||
|
@ -68,7 +77,7 @@ public class TagListFragment extends ThemedFragment implements OnSomethingClickL
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
followedTagsRecyclerView = (RecyclerView) view.findViewById(R.id.fragment_list__recycler_view);
|
ButterKnife.bind(this, view);
|
||||||
app = (App) getActivity().getApplication();
|
app = (App) getActivity().getApplication();
|
||||||
AppSettings appSettings = app.getSettings();
|
AppSettings appSettings = app.getSettings();
|
||||||
urls = new DiasporaUrlHelper(appSettings);
|
urls = new DiasporaUrlHelper(appSettings);
|
||||||
|
@ -109,9 +118,14 @@ public class TagListFragment extends ThemedFragment implements OnSomethingClickL
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
followedTagsRecyclerView.invalidate();
|
followedTagsRecyclerView.invalidate();
|
||||||
|
if (getAppSettings().isAmoledColorMode()) {
|
||||||
|
rootView.setBackgroundColor(Color.BLACK);
|
||||||
|
space.setBackgroundColor(Color.BLACK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class FollowedTagsAdapter extends RecyclerView.Adapter<FollowedTagsAdapter.ViewHolder> {
|
public static class FollowedTagsAdapter extends RecyclerView.Adapter<FollowedTagsAdapter.ViewHolder> {
|
||||||
|
private boolean isAmoledColorMode;
|
||||||
private AppSettings appSettings;
|
private AppSettings appSettings;
|
||||||
private String[] followedTagsList;
|
private String[] followedTagsList;
|
||||||
private List<String> followedTagsFavsList;
|
private List<String> followedTagsFavsList;
|
||||||
|
@ -137,6 +151,7 @@ public class TagListFragment extends ThemedFragment implements OnSomethingClickL
|
||||||
this.followedTagsList = appSettings.getFollowedTags();
|
this.followedTagsList = appSettings.getFollowedTags();
|
||||||
this.followedTagsFavsList = new ArrayList<>(Arrays.asList(appSettings.getFollowedTagsFavs()));
|
this.followedTagsFavsList = new ArrayList<>(Arrays.asList(appSettings.getFollowedTagsFavs()));
|
||||||
this.tagClickedListener = tagClickedListener;
|
this.tagClickedListener = tagClickedListener;
|
||||||
|
this.isAmoledColorMode = appSettings.isAmoledColorMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -158,7 +173,11 @@ public class TagListFragment extends ThemedFragment implements OnSomethingClickL
|
||||||
final String tag = followedTagsList[position];
|
final String tag = followedTagsList[position];
|
||||||
holder.title.setText(tag);
|
holder.title.setText(tag);
|
||||||
if (position % 2 == 1) {
|
if (position % 2 == 1) {
|
||||||
holder.root.setBackgroundColor(Helpers.get().color(R.color.alternate_row_color));
|
holder.root.setBackgroundColor(isAmoledColorMode ? Color.BLACK : Helpers.get().color(R.color.alternate_row_color));
|
||||||
|
holder.title.setTextColor(isAmoledColorMode ? Color.GRAY : Color.BLACK);
|
||||||
|
} else {
|
||||||
|
holder.root.setBackgroundColor(isAmoledColorMode ? Color.BLACK : Color.WHITE);
|
||||||
|
holder.title.setTextColor(isAmoledColorMode ? Color.GRAY : Color.BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Favourite (Star) Image
|
// Favourite (Star) Image
|
||||||
|
@ -190,7 +209,7 @@ public class TagListFragment extends ThemedFragment implements OnSomethingClickL
|
||||||
|
|
||||||
private void applyFavouriteImage(AppCompatImageView imageView, boolean isFaved) {
|
private void applyFavouriteImage(AppCompatImageView imageView, boolean isFaved) {
|
||||||
imageView.setImageResource(isFaved ? R.drawable.ic_star_filled_48px : R.drawable.ic_star_border_black_48px);
|
imageView.setImageResource(isFaved ? R.drawable.ic_star_filled_48px : R.drawable.ic_star_border_black_48px);
|
||||||
imageView.setColorFilter(isFaved ? appSettings.getAccentColor() : 0, PorterDuff.Mode.SRC_ATOP);
|
imageView.setColorFilter(isFaved ? appSettings.getAccentColor() : (isAmoledColorMode ? Color.GRAY : 0), PorterDuff.Mode.SRC_ATOP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ import info.guardianproject.netcipher.NetCipher;
|
||||||
public class FetchPodsService extends Service {
|
public class FetchPodsService extends Service {
|
||||||
public static final String MESSAGE_PODS_RECEIVED = "com.github.dfa.diaspora.podsreceived";
|
public static final String MESSAGE_PODS_RECEIVED = "com.github.dfa.diaspora.podsreceived";
|
||||||
public static final String EXTRA_PODLIST = "pods";
|
public static final String EXTRA_PODLIST = "pods";
|
||||||
|
|
||||||
public FetchPodsService() {
|
public FetchPodsService() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ import android.content.pm.PackageManager;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -110,14 +109,14 @@ public class ContextMenuWebView extends NestedWebView {
|
||||||
if (writeToStoragePermitted) {
|
if (writeToStoragePermitted) {
|
||||||
//Make sure, Diaspora Folder exists
|
//Make sure, Diaspora Folder exists
|
||||||
File destinationFolder = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora");
|
File destinationFolder = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora");
|
||||||
if(!destinationFolder.exists()) {
|
if (!destinationFolder.exists()) {
|
||||||
destinationFolder.mkdirs();
|
destinationFolder.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
Uri source = Uri.parse(url);
|
Uri source = Uri.parse(url);
|
||||||
DownloadManager.Request request = new DownloadManager.Request(source);
|
DownloadManager.Request request = new DownloadManager.Request(source);
|
||||||
File destinationFile = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora/"+ System.currentTimeMillis() + ".png");
|
File destinationFile = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora/" + System.currentTimeMillis() + ".png");
|
||||||
|
|
||||||
request.setDestinationUri(Uri.fromFile(destinationFile));
|
request.setDestinationUri(Uri.fromFile(destinationFile));
|
||||||
((DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE)).enqueue(request);
|
((DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE)).enqueue(request);
|
||||||
|
@ -158,7 +157,7 @@ public class ContextMenuWebView extends NestedWebView {
|
||||||
if (writeToStoragePermitted) {
|
if (writeToStoragePermitted) {
|
||||||
//Make sure, Diaspora Folder exists
|
//Make sure, Diaspora Folder exists
|
||||||
File destinationFolder = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora");
|
File destinationFolder = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora");
|
||||||
if(!destinationFolder.exists()) {
|
if (!destinationFolder.exists()) {
|
||||||
destinationFolder.mkdirs();
|
destinationFolder.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ package com.github.dfa.diaspora_android.web;
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.webkit.CookieManager;
|
import android.webkit.CookieManager;
|
||||||
import android.webkit.WebResourceResponse;
|
import android.webkit.WebResourceResponse;
|
||||||
|
|
|
@ -89,9 +89,9 @@ public class NestedWebView extends WebView implements NestedScrollingChild {
|
||||||
stopNestedScroll();
|
stopNestedScroll();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (event != null) {
|
if (event != null) {
|
||||||
event.recycle();
|
event.recycle();
|
||||||
}
|
}
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,10 +107,11 @@ public class WebHelper {
|
||||||
"})();");
|
"})();");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String lastUpdateTitleByUrl ="";
|
private static String lastUpdateTitleByUrl = "";
|
||||||
public static synchronized void sendUpdateTitleByUrlIntent(String url, Context context){
|
|
||||||
|
public static synchronized void sendUpdateTitleByUrlIntent(String url, Context context) {
|
||||||
// Ignore javascript stuff
|
// Ignore javascript stuff
|
||||||
if (url != null && url.startsWith("javascript:")){
|
if (url != null && url.startsWith("javascript:")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.webkit.WebResourceResponse;
|
import android.webkit.WebResourceResponse;
|
||||||
|
|
||||||
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -42,8 +44,6 @@ import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.R;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple Host-Based AdBlocker
|
* Simple Host-Based AdBlocker
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:id="@+id/podselection__fragment__root"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/fragment_list__root"
|
||||||
android:background="@android:color/background_light">
|
android:background="@android:color/background_light">
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
|
|
||||||
<!-- Offset -->
|
<!-- Offset -->
|
||||||
<android.support.v4.widget.Space
|
<android.support.v4.widget.Space
|
||||||
android:id="@+id/spacer"
|
android:id="@+id/fragment_list__spacer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/bottom_toolbar_height" />
|
android:layout_height="@dimen/bottom_toolbar_height" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string name="pref_desc__primary_color">Color de las barras de herramientas</string>
|
<string name="pref_desc__primary_color">Color de las barras de herramientas</string>
|
||||||
<string name="pref_title__accent_color">Color de Énfasis</string>
|
<string name="pref_title__accent_color">Color de Énfasis</string>
|
||||||
<string name="pref_desc__accent_color">Color de la barra de progreso</string>
|
<string name="pref_desc__accent_color">Color de la barra de progreso</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">Modo AMOLED</string>
|
||||||
|
<string name="pref_desc__primary_color__amoled_mode">Substituir el color negro en varias partes de la app con uno compatible con pantallas AMOLED. Necesitarás reiniciar la app para alternar ésta opcion. Para navegar diaspora* con un tema oscuro, lo necesitarás habilitar en tu panel de configuraciones personales de cuenta diaspora*.</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">Notificaciones extendidas</string>
|
<string name="pref_title__extended_notifications">Notificaciones extendidas</string>
|
||||||
<string name="pref_desc__extended_notifications">Extender la campana de notificaciones con un menú desplegable que muestra categorías de notificación</string>
|
<string name="pref_desc__extended_notifications">Extender la campana de notificaciones con un menú desplegable que muestra categorías de notificación</string>
|
||||||
|
@ -85,4 +87,6 @@
|
||||||
<string name="dialog_content__wipe_settings">Esto restablecerá todas las modificaciones en la configuración a sus valores predeterminados y se desconectará de todos los pods. Las imágenes descargadas permanecerán intactas. ¿Está seguro de que desea continuar?</string>
|
<string name="dialog_content__wipe_settings">Esto restablecerá todas las modificaciones en la configuración a sus valores predeterminados y se desconectará de todos los pods. Las imágenes descargadas permanecerán intactas. ¿Está seguro de que desea continuar?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">Habilitar bloqueador de publicidad básico. Publicidad podrá ser incluida p.ej. en vistas incrustadas</string>
|
||||||
|
<string name="pref_title__adblock_enable">Bloquear publicidad</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string name="pref_desc__primary_color">Cor das barras de ferramentas</string>
|
<string name="pref_desc__primary_color">Cor das barras de ferramentas</string>
|
||||||
<string name="pref_title__accent_color">Cor acentuada</string>
|
<string name="pref_title__accent_color">Cor acentuada</string>
|
||||||
<string name="pref_desc__accent_color">Cor da barra de progreso</string>
|
<string name="pref_desc__accent_color">Cor da barra de progreso</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">Modo AMOLED</string>
|
||||||
|
<string name="pref_desc__primary_color__amoled_mode">Substitúe cores negras con outras compatibles con pantallas AMOLED. É necesario activar o tema Escuro nos axustes persoais diaspora* e reiniciar a aplicación.</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">Notificacións extendidas</string>
|
<string name="pref_title__extended_notifications">Notificacións extendidas</string>
|
||||||
<string name="pref_desc__extended_notifications">Extensión da campá de notificacións que desprega un menú onde amosa as categorías das notificacións</string>
|
<string name="pref_desc__extended_notifications">Extensión da campá de notificacións que desprega un menú onde amosa as categorías das notificacións</string>
|
||||||
|
@ -85,4 +87,6 @@
|
||||||
<string name="dialog_content__wipe_settings">Isto vai restaurar todos os axustes aos seus valores por defecto e saír de todos os pods. As imaxes descargadas non se tocan. Estás seguro de querer facelo?</string>
|
<string name="dialog_content__wipe_settings">Isto vai restaurar todos os axustes aos seus valores por defecto e saír de todos os pods. As imaxes descargadas non se tocan. Estás seguro de querer facelo?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">Activar AdBlocker básico. Aínda poden aparecer algúns anuncios, por exemplo, en visualizacións incrustadas</string>
|
||||||
|
<string name="pref_title__adblock_enable">Bloquear publicidade</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string name="pref_desc__primary_color">Colore della barra</string>
|
<string name="pref_desc__primary_color">Colore della barra</string>
|
||||||
<string name="pref_title__accent_color">Colore secondario</string>
|
<string name="pref_title__accent_color">Colore secondario</string>
|
||||||
<string name="pref_desc__accent_color">Colore della barra dei progressi</string>
|
<string name="pref_desc__accent_color">Colore della barra dei progressi</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">Modalità AMOLED</string>
|
||||||
|
<string name="pref_desc__primary_color__amoled_mode">Sostituzione dei colori con display AMOLED scuro in molte parti dell\'app. È necessario riavviare per attivare o disattivare questa impostazione. Per navigare diaspora*in scuro è inoltre necessario attivare il tema scuro, che può essere trovato nelle impostazioni dell\'account personale di diaspora*.</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">Notifiche estese</string>
|
<string name="pref_title__extended_notifications">Notifiche estese</string>
|
||||||
<string name="pref_desc__extended_notifications">Estendi il bottone delle notifiche con un menù che mostra le categorie di notifiche</string>
|
<string name="pref_desc__extended_notifications">Estendi il bottone delle notifiche con un menù che mostra le categorie di notifiche</string>
|
||||||
|
@ -85,4 +87,6 @@
|
||||||
<string name="dialog_content__wipe_settings">Questo cancellerà tutte le impostazioni dell\'app che sono state cambiate ai loro valori predefiniti e ti disconnetterà da tutti i pod. Le immagini scaricate non verranno toccate. Sei sicuro di voler procedere?</string>
|
<string name="dialog_content__wipe_settings">Questo cancellerà tutte le impostazioni dell\'app che sono state cambiate ai loro valori predefiniti e ti disconnetterà da tutti i pod. Le immagini scaricate non verranno toccate. Sei sicuro di voler procedere?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">Abilitare AdBlocker base. Gli annunci possono essere inclusi ad es. nelle visualizzazioni incorporate</string>
|
||||||
|
<string name="pref_title__adblock_enable">Blocca le pubblicità</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string name="pref_desc__primary_color">ツールバーの色</string>
|
<string name="pref_desc__primary_color">ツールバーの色</string>
|
||||||
<string name="pref_title__accent_color">アクセント色</string>
|
<string name="pref_title__accent_color">アクセント色</string>
|
||||||
<string name="pref_desc__accent_color">プログレスバーの色</string>
|
<string name="pref_desc__accent_color">プログレスバーの色</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">AMOLED モード</string>
|
||||||
|
<string name="pref_desc__primary_color__amoled_mode">アプリの多くの部分を AMOLED フレンドリーな黒色の表示で上書きします。この設定を切り替えるには再起動する必要があります。ダイアスポラ* を暗く参照するには、ダイアスポラ* の個人アカウント設定にある、ダークテーマをアクティブにする必要があります。</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">拡張通知</string>
|
<string name="pref_title__extended_notifications">拡張通知</string>
|
||||||
<string name="pref_desc__extended_notifications">通知のカテゴリーを示すドロップダウン・メニューで通知ベルを拡張します</string>
|
<string name="pref_desc__extended_notifications">通知のカテゴリーを示すドロップダウン・メニューで通知ベルを拡張します</string>
|
||||||
|
@ -85,4 +87,6 @@
|
||||||
<string name="dialog_content__wipe_settings">これはアプリの変更された設定をすべてデフォルトにリセットして、すべてのポッドからログアウトします。ダウンロードした画像はそのまま残ります。続行してもよろしいですか?</string>
|
<string name="dialog_content__wipe_settings">これはアプリの変更された設定をすべてデフォルトにリセットして、すべてのポッドからログアウトします。ダウンロードした画像はそのまま残ります。続行してもよろしいですか?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">基本 AdBlocker を有効にします。広告は、埋め込みビューなどに含まれることがあります</string>
|
||||||
|
<string name="pref_title__adblock_enable">広告をブロック</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<string name="pref_desc__primary_color">Kolor pasków narzędzi</string>
|
<string name="pref_desc__primary_color">Kolor pasków narzędzi</string>
|
||||||
<string name="pref_title__accent_color">Kolor dodatkowy</string>
|
<string name="pref_title__accent_color">Kolor dodatkowy</string>
|
||||||
<string name="pref_desc__accent_color">Kolor paska postępu</string>
|
<string name="pref_desc__accent_color">Kolor paska postępu</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">Tryb AMOLED</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">Rozszerzone powiadomienia</string>
|
<string name="pref_title__extended_notifications">Rozszerzone powiadomienia</string>
|
||||||
<string name="pref_desc__extended_notifications">Dodaj do ikony powiadomień menu wyboru kategorii powiadomień</string>
|
<string name="pref_desc__extended_notifications">Dodaj do ikony powiadomień menu wyboru kategorii powiadomień</string>
|
||||||
|
@ -85,4 +86,6 @@
|
||||||
<string name="dialog_content__wipe_settings">Ta operacja przywróci wszystkie zmodyfikowane przez Ciebie ustawienia aplikacji do ich domyślnych wartości i wyloguje Cię ze wszystkich Podów. Na pewno chcesz to zrobić?</string>
|
<string name="dialog_content__wipe_settings">Ta operacja przywróci wszystkie zmodyfikowane przez Ciebie ustawienia aplikacji do ich domyślnych wartości i wyloguje Cię ze wszystkich Podów. Na pewno chcesz to zrobić?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">Włącz prosty AdBlocker. Reklamy mogą znajdować się m.in. w osadzonych widokach</string>
|
||||||
|
<string name="pref_title__adblock_enable">Blokuj reklamy</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string name="pref_desc__primary_color">Цвет панелей инструментов</string>
|
<string name="pref_desc__primary_color">Цвет панелей инструментов</string>
|
||||||
<string name="pref_title__accent_color">Акцентирующий цвет</string>
|
<string name="pref_title__accent_color">Акцентирующий цвет</string>
|
||||||
<string name="pref_desc__accent_color">Цвет индикатора загрузки</string>
|
<string name="pref_desc__accent_color">Цвет индикатора загрузки</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">Режим AMOLED</string>
|
||||||
|
<string name="pref_desc__primary_color__amoled_mode">Переопределить цвета на благоприятный для AMOLED чёрный во многих частях приложения. Вам нужно перезапустить приложение, чтобы включить эту опцию. Для просмотра диаспоры* в тёмных тонах, вам также необходимо активировать тёмную тему в настройках аккаунта.</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">Расширенные уведомления</string>
|
<string name="pref_title__extended_notifications">Расширенные уведомления</string>
|
||||||
<string name="pref_desc__extended_notifications">Показывать выпадающее меню с категориями уведомлений при нажатии на иконку уведомлений</string>
|
<string name="pref_desc__extended_notifications">Показывать выпадающее меню с категориями уведомлений при нажатии на иконку уведомлений</string>
|
||||||
|
@ -85,4 +87,6 @@
|
||||||
<string name="dialog_content__wipe_settings">Это сбросит все изменённые параметры приложения на значения по умолчанию и выйдет из аккаунтов на всех подах. Ваши загруженные изображения останутся нетронутыми. Вы уверены, что хотите продолжить?</string>
|
<string name="dialog_content__wipe_settings">Это сбросит все изменённые параметры приложения на значения по умолчанию и выйдет из аккаунтов на всех подах. Ваши загруженные изображения останутся нетронутыми. Вы уверены, что хотите продолжить?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">Включить простой блокировщик рекламы. Реклама может быть во встроенных элементах страницы</string>
|
||||||
|
<string name="pref_title__adblock_enable">Блокировать рекламу</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string name="pref_desc__primary_color">Färgen på verktygspanelerna</string>
|
<string name="pref_desc__primary_color">Färgen på verktygspanelerna</string>
|
||||||
<string name="pref_title__accent_color">Accentfärg</string>
|
<string name="pref_title__accent_color">Accentfärg</string>
|
||||||
<string name="pref_desc__accent_color">Färg på förloppsindikatorn</string>
|
<string name="pref_desc__accent_color">Färg på förloppsindikatorn</string>
|
||||||
|
<string name="pref_title__primary_color__amoled_mode">AMOLED-läge</string>
|
||||||
|
<string name="pref_desc__primary_color__amoled_mode">Överskrid färger med svart i flera delar av appen, anpassad AMOLED-skärmar. Du behöver starta om för att verkställa. För att använda Diaspora* i mörkt läge behöver du också aktivera Dark theme, som du hittar bland dina personliga Diaspora*-kontoinställningar.</string>
|
||||||
<!-- Notifications dropdown -->
|
<!-- Notifications dropdown -->
|
||||||
<string name="pref_title__extended_notifications">Utökade notifikationer</string>
|
<string name="pref_title__extended_notifications">Utökade notifikationer</string>
|
||||||
<string name="pref_desc__extended_notifications">Utöka notifikationsklockan med en rullgardinsmeny som visar kategorier för notifieringar</string>
|
<string name="pref_desc__extended_notifications">Utöka notifikationsklockan med en rullgardinsmeny som visar kategorier för notifieringar</string>
|
||||||
|
@ -85,4 +87,6 @@
|
||||||
<string name="dialog_content__wipe_settings">Detta kommer att återställa alla ändrade inställningarna på appen till deras standardvärden och loggar ut dig från alla poddar. Dina nedladdade bilder förblir orörda. Är du säker på att du vill fortsätta?</string>
|
<string name="dialog_content__wipe_settings">Detta kommer att återställa alla ändrade inställningarna på appen till deras standardvärden och loggar ut dig från alla poddar. Dina nedladdade bilder förblir orörda. Är du säker på att du vill fortsätta?</string>
|
||||||
<!-- Recently added - Please move to right section-->
|
<!-- Recently added - Please move to right section-->
|
||||||
<!-- Sorry -->
|
<!-- Sorry -->
|
||||||
|
<string name="pref_desc__adblock_enable">Använd lätt reklamblockering. Reklam finns bland annat i inbyggda vyer</string>
|
||||||
|
<string name="pref_title__adblock_enable">Blockera reklam</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue