dandelion/app/src/main/java/com/github/dfa/diaspora_android/web/BrowserFragment.java

322 lines
12 KiB
Java
Raw Normal View History

Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
/*
This file is part of the dandelion*.
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
dandelion* is free software: you can redistribute it and/or modify
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
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.
dandelion* is distributed in the hope that it will be useful,
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
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 the dandelion*.
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
If not, see <http://www.gnu.org/licenses/>.
*/
2016-10-26 16:23:14 +02:00
package com.github.dfa.diaspora_android.web;
import android.Manifest;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
2016-11-06 17:33:22 +01:00
import android.content.MutableContextWrapper;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AlertDialog;
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ProgressBar;
import com.github.dfa.diaspora_android.App;
import com.github.dfa.diaspora_android.R;
import com.github.dfa.diaspora_android.activity.MainActivity;
2016-10-26 16:23:14 +02:00
import com.github.dfa.diaspora_android.ui.theme.ThemeHelper;
import com.github.dfa.diaspora_android.ui.theme.ThemedFragment;
import com.github.dfa.diaspora_android.util.AppLog;
2016-10-26 16:23:14 +02:00
import com.github.dfa.diaspora_android.util.AppSettings;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
* Fragment with a webView and a ProgressBar.
* This Fragment retains its instance.
* Created by vanitas on 26.09.16.
*/
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
public class BrowserFragment extends ThemedFragment {
public static final String TAG = "com.github.dfa.diaspora_android.BrowserFragment";
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
protected View rootLayout;
protected ContextMenuWebView webView;
protected ProgressBar progressBar;
protected AppSettings appSettings;
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
protected CustomWebViewClient webViewClient;
protected WebSettings webSettings;
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
protected String pendingUrl;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
AppLog.d(this, "onCreateView()");
if (rootLayout == null) {
2016-11-06 17:33:22 +01:00
LayoutInflater inflater1 = inflater.cloneInContext(new MutableContextWrapper(getContext()));
rootLayout = inflater1.inflate(R.layout.browser__fragment, container, false);
} else {
MutableContextWrapper context = (MutableContextWrapper) rootLayout.getContext();
context.setBaseContext(getContext());
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
}
return rootLayout;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
AppLog.d(this, "onViewCreated()");
super.onViewCreated(view, savedInstanceState);
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
if (this.appSettings == null) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
this.appSettings = ((App) getActivity().getApplication()).getSettings();
}
if (this.webView == null) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
this.webView = (ContextMenuWebView) view.findViewById(R.id.webView);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
BrowserFragment.this.applyWebViewSettings();
}
});
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
ProxyHandler.getInstance().addWebView(webView);
}
if (this.progressBar == null) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
this.progressBar = (ProgressBar) view.findViewById(R.id.progressBar);
}
if (pendingUrl != null) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
loadUrl(pendingUrl);
pendingUrl = null;
}
webView.setParentActivity(getActivity());
this.setRetainInstance(true);
}
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
@Override
public void onDestroyView() {
super.onDestroyView();
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
if (getRetainInstance() && rootLayout.getParent() instanceof ViewGroup) {
((ViewGroup) rootLayout.getParent()).removeView(rootLayout);
}
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
}
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
private void applyWebViewSettings() {
this.webSettings = webView.getSettings();
webSettings.setAllowFileAccess(false);
webSettings.setUseWideViewPort(true);
webSettings.setLoadWithOverviewMode(true);
2016-11-04 03:08:59 +01:00
webSettings.setUserAgentString("Mozilla/5.0 (Linux; U; Android 4.4.4; Nexus 5 Build/KTU84P) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30");
webSettings.setDomStorageEnabled(true);
webSettings.setMinimumFontSize(appSettings.getMinimumFontSize());
webSettings.setLoadsImagesAutomatically(appSettings.isLoadImages());
webSettings.setAppCacheEnabled(true);
if (android.os.Build.VERSION.SDK_INT >= 21) {
WebView.enableSlowWholeDocumentDraw();
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
this.registerForContextMenu(webView);
//webView.setParentActivity(this);
webView.setOverScrollMode(WebView.OVER_SCROLL_ALWAYS);
this.webViewClient = new CustomWebViewClient((App) getActivity().getApplication(), webView);
webView.setWebViewClient(webViewClient);
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
webView.setWebChromeClient(new ProgressBarWebChromeClient(webView, progressBar));
}
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
@Override
public void onResume() {
super.onResume();
if (webView != null) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
webSettings.setMinimumFontSize(appSettings.getMinimumFontSize());
webSettings.setLoadsImagesAutomatically(appSettings.isLoadImages());
}
}
@SuppressWarnings("ResultOfMethodCallIgnored")
protected boolean makeScreenshotOfWebView(boolean hasToShareScreenshot) {
AppLog.i(this, "StreamFragment.makeScreenshotOfWebView()");
if (android.os.Build.VERSION.SDK_INT >= 23) {
int hasWRITE_EXTERNAL_STORAGE = getActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (hasWRITE_EXTERNAL_STORAGE != PackageManager.PERMISSION_GRANTED) {
if (!shouldShowRequestPermissionRationale(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
new AlertDialog.Builder(getContext())
.setMessage(R.string.permissions_screenshot)
.setNegativeButton(android.R.string.no, null)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (android.os.Build.VERSION.SDK_INT >= 23)
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
MainActivity.REQUEST_CODE_ASK_PERMISSIONS);
}
})
.show();
return false;
}
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
MainActivity.REQUEST_CODE_ASK_PERMISSIONS);
return false;
}
}
Date dateNow = new Date();
DateFormat dateFormat = new SimpleDateFormat("yy_MM_dd--HH_mm_ss", Locale.getDefault());
File fileSaveDirectory = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/Diaspora");
String fileSaveName = hasToShareScreenshot ? ".DfA_share.jpg" : String.format("DfA_%s.jpg", dateFormat.format(dateNow));
if (!fileSaveDirectory.exists()) {
if (!fileSaveDirectory.mkdirs()) {
AppLog.w(this, "Could not mkdir " + fileSaveDirectory.getAbsolutePath());
}
}
if (!hasToShareScreenshot) {
Snackbar.make(webView, getString(R.string.share__toast_screenshot) + " " + fileSaveName, Snackbar.LENGTH_LONG).show();
}
Bitmap bitmap;
webView.setDrawingCacheEnabled(true);
bitmap = Bitmap.createBitmap(webView.getDrawingCache());
webView.setDrawingCacheEnabled(false);
OutputStream bitmapWriter = null;
try {
bitmapWriter = new FileOutputStream(new File(fileSaveDirectory, fileSaveName));
bitmap.compress(Bitmap.CompressFormat.JPEG, 85, bitmapWriter);
bitmapWriter.flush();
bitmap.recycle();
} catch (Exception e) {
return false;
} finally {
if (bitmapWriter != null) {
try {
bitmapWriter.close();
} catch (IOException _ignSaveored) {/* Nothing */}
}
}
// Only show share intent when Action Share Screenshot was selected
if (hasToShareScreenshot) {
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("image/jpeg");
sharingIntent.putExtra(Intent.EXTRA_SUBJECT, webView.getTitle());
sharingIntent.putExtra(Intent.EXTRA_TEXT, webView.getUrl());
Uri bmpUri = Uri.fromFile(new File(fileSaveDirectory, fileSaveName));
sharingIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);
startActivity(Intent.createChooser(sharingIntent, getString(R.string.action_share_dotdotdot)));
} else {
// Broadcast that this file is indexable
File file = new File(fileSaveDirectory, fileSaveName);
Uri uri = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri);
getActivity().sendBroadcast(intent);
}
return true;
}
@Override
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
public String getFragmentTag() {
return TAG;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
2016-12-18 15:07:23 +01:00
if (webView != null && webView.getContext() instanceof MutableContextWrapper) {
((MutableContextWrapper) webView.getContext()).setBaseContext(context);
}
}
public boolean onBackPressed() {
if (webView.canGoBack()) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
webView.goBack();
}
});
return true;
}
return false;
}
public void loadUrl(final String url) {
if (getWebView() != null) {
AppLog.v(this, "loadUrl(): load " + url);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
getWebView().loadUrlNew(url);
}
});
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
} else {
AppLog.v(this, "loadUrl(): WebView null: Set pending url to " + url);
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
pendingUrl = url;
}
}
public String getUrl() {
if (getWebView() != null) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
return getWebView().getUrl();
} else {
return pendingUrl;
}
}
public void reloadUrl() {
AppLog.v(this, "reloadUrl()");
if (getWebView() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
getWebView().reload();
}
});
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
}
}
public ContextMenuWebView getWebView() {
return this.webView;
}
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
@Override
protected void applyColorToViews() {
ThemeHelper.updateProgressBarColor(progressBar);
}
}