pre-release push of code to github. not guaranteed to work the way you want. This is what is fixed to far: - added History viewer - added better bookmarks (fixed bug in fullscreen mode) - better full screen URL bar handling - added some more animations - incognito mode -notify user of SSL errors -popup tabs now work -fixed bug where certain sites wouldn’t display until touchedmaster
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 95 KiB |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<translate android:fromYDelta="0%p" |
||||
android:interpolator="@android:anim/linear_interpolator" |
||||
android:toYDelta="100%p" android:duration="150" /> |
||||
</set> |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<translate android:fromYDelta="100%p" |
||||
android:interpolator="@android:anim/linear_interpolator" |
||||
android:toYDelta="0%p" android:duration="250" /> |
||||
</set> |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 486 B |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" > |
||||
<item android:id="@+id/history" android:title="History" android:titleCondensed="History" android:orderInCategory="1"></item> |
||||
<item android:id="@+id/allBookmarks" android:titleCondensed="Bookmarks" android:title="Bookmarks" android:orderInCategory="3"></item> |
||||
<item android:id="@+id/incognito" android:title="New Tab" android:orderInCategory="5" android:titleCondensed="New Tab"></item> |
||||
|
||||
|
||||
</menu> |
@ -1,11 +1,11 @@
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" > |
||||
<item android:id="@+id/refresh" android:title="Refresh" android:titleCondensed="Refresh" android:orderInCategory="1"></item> |
||||
<item android:id="@+id/history" android:title="History" android:titleCondensed="History" android:orderInCategory="1"></item> |
||||
<item android:id="@+id/bookmark" android:title="Add to bookmarks" android:titleCondensed="Add bookmark" android:orderInCategory="2"></item> |
||||
<item android:id="@+id/allBookmarks" android:titleCondensed="Bookmarks" android:title="Bookmarks" android:orderInCategory="3"></item> |
||||
<item android:id="@+id/share" android:title="Share" android:titleCondensed="Share" android:orderInCategory="4"></item> |
||||
<item android:id="@+id/settings" android:title="Settings" android:titleCondensed="Settings" android:orderInCategory="6"></item> |
||||
<item android:id="@+id/forward" android:title="Forward" android:orderInCategory="5" android:titleCondensed="Forward"></item> |
||||
<item android:id="@+id/incognito" android:title="Incognito Tab" android:orderInCategory="5" android:titleCondensed="Incognito Tab"></item> |
||||
|
||||
|
||||
</menu> |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
package acr.browser.barebones; |
||||
|
||||
class BookmarkPage { |
||||
public static final String Heading = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\">" |
||||
+ "<head><meta content=\"en-us\" http-equiv=\"Content-Language\" /><meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />" |
||||
+ "<title>Bookmarks</title></head><style>" |
||||
+ "div.shadow{-moz-box-shadow: 0px 0px 6px #111;-webkit-box-shadow: 0px 0px 6px #111;box-shadow: 0px 0px 6px #111;}" |
||||
+ "body{color: gray;}" |
||||
+ "div {vertical-align: middle;background-color: #ffffff;}" |
||||
+ "div.clickable {position:relative;}" |
||||
+ "p.font{font-size: 60px;font-family: \"Lucida Console\"}" |
||||
+ "div.clickable a {position:absolute;width:100%;height:100%;top:0;left:0;text-decoration:none; z-index:10; background-color:white;opacity: 0; filter: alpha(opacity=1);}" |
||||
+ "div.space {height: 10px;}" |
||||
+ "p{padding-top: 3mm;padding-bottom: 3mm;padding-right: 2mm;padding-left: 2mm;}" |
||||
+ "img{padding-left: 2mm;padding-right: 2mm;}" |
||||
+ "</style><body bgcolor = #f2f2f2>"; |
||||
public static final String Part1 = "<div class=\"clickable\">" |
||||
+ "<div class=\"shadow\">" + "<p class=\"font\">" + "<a href=\""; |
||||
public static final String Part2 = "\"></a>"+ |
||||
"<img height=\"32\" width=\"32\" src='http://getfavicon.appspot.com/"; |
||||
public static final String Part3 = "'/>"; |
||||
public static final String Part4 = "</p></div></div>"; |
||||
public static final String End = "</body></html>"; |
||||
} |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
package acr.browser.barebones; |
||||
|
||||
import android.content.Context; |
||||
import android.util.Log; |
||||
import android.view.MotionEvent; |
||||
import android.view.View; |
||||
import android.view.animation.Animation; |
||||
import android.webkit.WebView; |
||||
|
||||
public final class CustomWebView extends WebView { |
||||
|
||||
private final int API = FinalVars.API; |
||||
private int hitTest; |
||||
private final boolean showFullScreen = Barebones.showFullScreen; |
||||
private final View uBar = Barebones.uBar; |
||||
private final Animation slideUp = Barebones.slideUp; |
||||
private final Animation slideDown = Barebones.slideDown; |
||||
|
||||
public CustomWebView(Context context) { |
||||
super(context); |
||||
} |
||||
|
||||
@Override |
||||
public boolean onTouchEvent(MotionEvent event) { |
||||
|
||||
switch (event.getAction()) { |
||||
case MotionEvent.ACTION_DOWN: { |
||||
hitTest = 0; |
||||
try { |
||||
hitTest = getHitTestResult().getType(); |
||||
} catch (NullPointerException ignored) { |
||||
} |
||||
if (API <= 10 && !this.hasFocus()) { |
||||
this.requestFocus(); |
||||
} |
||||
if (showFullScreen) { |
||||
if (uBar.isShown()) { |
||||
uBar.startAnimation(slideUp); |
||||
|
||||
} else if (this.getScrollY() <= 5 |
||||
&& !uBar.isShown() && hitTest != 9) { |
||||
uBar.startAnimation(slideDown); |
||||
|
||||
} |
||||
} |
||||
break; |
||||
} |
||||
default: |
||||
break; |
||||
} |
||||
|
||||
return super.onTouchEvent(event); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
package acr.browser.barebones; |
||||
|
||||
public class HistoryPage { |
||||
public static final String Heading = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\">" |
||||
+ "<head><meta content=\"en-us\" http-equiv=\"Content-Language\" /><meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" /><title>History</title></head><style>" |
||||
+ "div.shadow {-moz-box-shadow: 0px 0px 6px #111;-webkit-box-shadow: 0px 0px 6px #111;box-shadow: 0px 0px 6px #111;}" |
||||
+ "body{color: gray;}div.space {height: 10px;} div.extra{text-align: center;}div {vertical-align: middle;}" |
||||
+ "div {background-color: #ffffff;}div.clickable {position:relative;}p.black{color: black;font-size: 40px;font-family: \"Lucida Console\"}" |
||||
+ "p.font{font-size: 25px;font-family: \"Lucida Console\"}p{padding-left: 1mm;padding-right: 1mm;padding-top: 1mm;padding-bottom: 1mm;}" |
||||
+ "div.clickable a {position:absolute; width:100%;height:100%;top:0;left:0;text-decoration:none; z-index:10; background-color:white;opacity: 0;filter: alpha(opacity=1);}" |
||||
+ "</style><body bgcolor = #f2f2f2>"; |
||||
|
||||
public static final String Part1 = "<div class=\"clickable\"><div class=\"shadow\"><a href=\""; |
||||
public static final String Part2 = "\"></a><p class=\"black\">"; |
||||
public static final String Part3 = "</p><p class=\"font\">"; |
||||
public static final String Part4 = "</p></div></div>"; |
||||
public static final String End = "</body></html>"; |
||||
} |
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
package acr.browser.barebones; |
||||
|
||||
import android.text.SpannableString; |
||||
import android.text.Spanned; |
||||
import android.text.TextUtils; |
||||
import android.widget.MultiAutoCompleteTextView.Tokenizer; |
||||
|
||||
public class SpaceTokenizer implements Tokenizer { |
||||
|
||||
@Override |
||||
public int findTokenEnd(CharSequence text, int cursor) { |
||||
int i = cursor; |
||||
int len = text.length(); |
||||
|
||||
while (i < len) { |
||||
if (text.charAt(i) == ' ') { |
||||
return i; |
||||
} else { |
||||
i++; |
||||
} |
||||
} |
||||
|
||||
return len; |
||||
} |
||||
|
||||
@Override |
||||
public int findTokenStart(CharSequence text, int cursor) { |
||||
int i = cursor; |
||||
|
||||
while (i > 0 && text.charAt(i - 1) != ' ') { |
||||
i--; |
||||
} |
||||
while (i < cursor && text.charAt(i) == ' ') { |
||||
i++; |
||||
} |
||||
|
||||
return i; |
||||
} |
||||
|
||||
@Override |
||||
public CharSequence terminateToken(CharSequence text) { |
||||
int i = text.length(); |
||||
|
||||
while (i > 0 && text.charAt(i - 1) == ' ') { |
||||
i--; |
||||
} |
||||
|
||||
if (i > 0 && text.charAt(i - 1) == ' ') { |
||||
return text; |
||||
} else { |
||||
if (text instanceof Spanned) { |
||||
SpannableString sp = new SpannableString(text + " "); |
||||
TextUtils.copySpansFrom((Spanned) text, 0, text.length(), |
||||
Object.class, sp, 0); |
||||
return sp; |
||||
} else { |
||||
return text + " "; |
||||
} |
||||
} |
||||
} |
||||
} |