Merge branch 'dev' of github.com:anthonycr/Lightning-Browser into experimental_tabs
This commit is contained in:
commit
367f2a09d7
@ -50,12 +50,14 @@
|
||||
* Please add translations/translation fixes as you see need
|
||||
|
||||
####Contributing
|
||||
* [The Trello Board](https://trello.com/b/Gwjx8MC3/lightning-browser)
|
||||
* Contributions are always welcome
|
||||
* If you want a feature and can code, feel free to fork and add the change yourself and make a pull request
|
||||
* PLEASE use the ````dev```` branch when contributing as the ````master```` branch is supposed to be for stable builds. I will not reject your pull request if you make it on master, but it will annoy me and make my life harder.
|
||||
* Code Style
|
||||
* Standard Java camel case
|
||||
* Member variables are preceded with an 'm'
|
||||
* Hungarian Notation
|
||||
* Prefix member variables with 'm'
|
||||
* Prefix static member variables with 's'
|
||||
* Use 4 spaces instead of a tab (\t)
|
||||
|
||||
####Setting Up the Project
|
||||
|
@ -7,7 +7,7 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
versionName "4.2.3a"
|
||||
versionName "4.2.3.1"
|
||||
}
|
||||
sourceSets {
|
||||
lightningPlus.setRoot('src/LightningPlus')
|
||||
@ -30,12 +30,12 @@ android {
|
||||
lightningPlus {
|
||||
buildConfigField "boolean", "FULL_VERSION", "true"
|
||||
applicationId "acr.browser.lightning"
|
||||
versionCode 84
|
||||
versionCode 85
|
||||
}
|
||||
lightningLite {
|
||||
buildConfigField "boolean", "FULL_VERSION", "false"
|
||||
applicationId "acr.browser.barebones"
|
||||
versionCode 85
|
||||
versionCode 86
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
|
@ -890,8 +890,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
// new Handler().postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// Remove browser frame background to reduce overdraw
|
||||
//TODO evaluate performance
|
||||
// Remove browser frame background to reduce overdraw
|
||||
//TODO evaluate performance
|
||||
// mBrowserFrame.setBackgroundColor(Color.TRANSPARENT);
|
||||
// }
|
||||
// }, 300);
|
||||
@ -950,8 +950,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
if (level > TRIM_MEMORY_MODERATE && Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||
Log.d(Constants.TAG, "Low Memory, Free Memory");
|
||||
tabsManager.freeMemory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
synchronized boolean newTab(String url, boolean show) {
|
||||
// Limit number of tabs for limited version of app
|
||||
@ -1755,9 +1755,9 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
show.setInterpolator(new DecelerateInterpolator());
|
||||
if (view != null) {
|
||||
view.startAnimation(show);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2082,6 +2082,15 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void goHome(final NavigationEvents.GoHome event) {
|
||||
final LightningView currentTab = tabsManager.getCurrentTab();
|
||||
if (currentTab != null) {
|
||||
currentTab.loadHomepage();
|
||||
closeDrawers();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The user long pressed the new tab button
|
||||
*
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,9 +19,16 @@ public class NavigationEvents {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired by {@link acr.browser.lightning.fragment.TabsFragment} when teh user presses forward
|
||||
* Fired by {@link acr.browser.lightning.fragment.TabsFragment} when the user presses forward
|
||||
* button.
|
||||
*/
|
||||
public static class GoForward {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired by {@link acr.browser.lightning.fragment.TabsFragment} when the user presses the home
|
||||
* button.
|
||||
*/
|
||||
public static class GoHome {
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,6 @@ public class GeneralSettingsFragment extends LightningPreferenceFragment impleme
|
||||
boolean imagesBool = mPreferenceManager.getBlockImagesEnabled();
|
||||
boolean enableJSBool = mPreferenceManager.getJavaScriptEnabled();
|
||||
|
||||
// proxy.setEnabled(Constants.FULL_VERSION);
|
||||
cbAds.setEnabled(Constants.FULL_VERSION);
|
||||
cbFlash.setEnabled(API < 19);
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View
|
||||
setupFrameLayoutButton(view, R.id.new_tab_button, R.id.icon_plus);
|
||||
setupFrameLayoutButton(view, R.id.action_back, R.id.icon_back);
|
||||
setupFrameLayoutButton(view, R.id.action_forward, R.id.icon_forward);
|
||||
|
||||
setupFrameLayoutButton(view, R.id.action_home, R.id.icon_home);
|
||||
} else {
|
||||
view = inflater.inflate(R.layout.tab_strip, container, false);
|
||||
layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false);
|
||||
@ -184,6 +184,8 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View
|
||||
case R.id.action_forward:
|
||||
bus.post(new NavigationEvents.GoForward());
|
||||
break;
|
||||
case R.id.action_home:
|
||||
bus.post(new NavigationEvents.GoHome());
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@
|
||||
android:background="?attr/dividerColor"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
android:weightSum="4">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/action_back"
|
||||
@ -92,6 +92,23 @@
|
||||
android:src="@drawable/ic_action_plus" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/action_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/actionBarItemBackground"
|
||||
android:clickable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_home"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/action_homepage"
|
||||
android:src="@drawable/ic_action_home" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/action_forward"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -183,4 +183,36 @@
|
||||
<item >URL</item>
|
||||
<item >Titel</item>
|
||||
</string-array>
|
||||
<string name="action_folder">Ordner</string>
|
||||
<string name="action_rename">Umbenennen</string>
|
||||
<string name="black_theme">Schwarzes Design (AMOLED)</string>
|
||||
<string name="clear_web_storage">Webinhalte leeren</string>
|
||||
<string name="clear_web_storage_exit">Webinhalte beim Beenden leeren</string>
|
||||
<string name="dark_theme">Dunkles Design</string>
|
||||
<string name="dialog_folder">Was möchten Sie mit diesem Ordner tun?</string>
|
||||
<string name="dialog_history_long_press">Was möchten Sie mit diesem Verlaufs-Eintrag tun?</string>
|
||||
<string name="folder">Ordnername</string>
|
||||
<string name="invert_color">Farben invertieren</string>
|
||||
<string name="light_theme">Helles Design</string>
|
||||
<string name="manual_proxy">Manueller Proxy</string>
|
||||
<string name="message_insecure_connection">Die Verbindung zu dieser Seite ist nicht sicher:\n%1$s\nTrotzdem fortfahren?</string>
|
||||
<string name="message_web_storage_cleared">Webinhalte geleert</string>
|
||||
<string name="port">Port:</string>
|
||||
<string name="tabs">Tabs</string>
|
||||
<string name="theme">App-Design</string>
|
||||
<string name="title_rename_folder">Ordner umbenennen</string>
|
||||
<string name="http_proxy">HTTP-Proxy</string>
|
||||
<string name="i2p_not_running">I2P läuft nicht.</string>
|
||||
<string name="i2p_tunnels_not_ready">I2P Tunnel sind noch nicht bereit.</string>
|
||||
<string name="message_certificate_date_invalid">Zertifikats-Datum ungültig</string>
|
||||
<string name="message_certificate_domain_mismatch">Domain in Zertifikat stimmt nicht mit aktueller Domain überein</string>
|
||||
<string name="message_certificate_expired">Zertifikat abgelaufen</string>
|
||||
<string name="message_certificate_invalid">Zertifikat ungültig</string>
|
||||
<string name="message_certificate_not_yet_valid">Zertifikat noch nicht gültig</string>
|
||||
<string name="message_certificate_untrusted">Zertifikat wird nicht vertraut</string>
|
||||
<string name="problem_download">Ungültige Adresse gefunden. Kann nicht herunterladen</string>
|
||||
<string name="problem_location_download">Kann nicht an den eingestellten Ort herunterladen</string>
|
||||
<string name="use_i2p_prompt">Es sieht aus, als ob I2P installiert wäre. Möchten Sie es verwenden?</string>
|
||||
<string name="text_encoding">Textcodierung</string>
|
||||
<string name="tabs_in_drawer">Tabs in Drawer anzeigen</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user