Browse Source

4.2.3

- Fixed favicons and urls switching randomly
- Enlarged exit button touch area for tabs
- Slide animation when new tab is opened
- Other stuff I cannot remember... I think I skipped a couple versions
before updating the code. Sorry bout that.
master
Anthony Restaino 11 years ago
parent
commit
103b4e40e1
  1. 4
      AndroidManifest.xml
  2. BIN
      res/drawable-xhdpi/bar.9.png
  3. BIN
      res/drawable-xhdpi/clearbg.9.png
  4. 2
      res/layout/activity_main.xml
  5. 401
      res/layout/settings.xml
  6. 2
      src/acr/browser/barebones/AnthonyWebView.java
  7. 3276
      src/acr/browser/barebones/Barebones.java
  8. 4
      src/acr/browser/barebones/DatabaseHandler.java
  9. 18
      src/acr/browser/barebones/FinalVars.java
  10. 2
      src/acr/browser/barebones/Settings.java

4
AndroidManifest.xml

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="acr.browser.barebones"
android:versionCode="37"
android:versionName="2.4" >
android:versionCode="42"
android:versionName="2.4.3" >
<uses-sdk
android:minSdkVersion="8"

BIN
res/drawable-xhdpi/bar.9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 243 B

BIN
res/drawable-xhdpi/clearbg.9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 165 B

2
res/layout/activity_main.xml

@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/options"
android:layout_toRightOf="@+id/refreshLayout"
android:background="@drawable/bookmark"
android:background="@drawable/book"
android:ems="10"
android:hint="@string/google"
android:imeOptions="actionGo"

401
res/layout/settings.xml

@ -1,247 +1,162 @@ @@ -1,247 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/bar" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/settings"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ImageView
android:id="@+id/back"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:src="@drawable/back" />
</RelativeLayout>
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/relativeLayout1" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_below="@+id/relativeLayout1"
android:layout_centerHorizontal="true"
android:background="#ff0099cc"
android:gravity="center_vertical|center_horizontal"
android:text="@string/settingshelp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffffff" />
<CheckBox
android:id="@+id/password"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignLeft="@+id/flash"
android:layout_alignParentRight="true"
android:layout_below="@+id/saveTabs"
android:layout_marginRight="20dp"
android:background="@drawable/blueback"
android:paddingRight="20dp"
android:text="@string/password" />
<EditText
android:id="@+id/agent"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/textView2"
android:layout_toRightOf="@+id/textView2"
android:ems="10"
android:inputType="textUri"
android:background="@drawable/bookmark"
android:layout_marginRight="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true" >
</EditText>
<CheckBox
android:id="@+id/flash"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/blueback"
android:layout_below="@+id/password"
android:paddingRight="20dp"
android:text="@string/flash" />
<CheckBox
android:id="@+id/historyClear"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/flash"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/flash"
android:paddingRight="20dp"
android:background="@drawable/blueback"
android:text="@string/history" />
<RadioButton
android:id="@+id/radioDesktop"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignLeft="@+id/radioMobile"
android:layout_below="@+id/radioMobile"
android:layout_marginRight="20dp"
android:onClick="radioAgent"
android:paddingRight="20dp"
android:background="@drawable/blueback"
android:text="@string/desk" />
<RadioButton
android:id="@+id/radioCustom"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignLeft="@+id/radioDesktop"
android:layout_below="@+id/radioDesktop"
android:background="@drawable/blueback"
android:layout_marginRight="20dp"
android:onClick="radioAgent"
android:paddingRight="20dp"
android:text="@string/custom" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/radioCustom"
android:gravity="center_vertical|center_horizontal"
android:paddingLeft="10dp"
android:paddingRight="5dp"
android:layout_marginLeft="20dp"
android:text="@string/agent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView2"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:layout_marginLeft="20dp"
android:paddingRight="5dp"
android:text="@string/home" />
<EditText
android:id="@+id/homePage"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignLeft="@+id/agent"
android:layout_alignRight="@+id/agent"
android:background="@drawable/bookmark"
android:layout_below="@+id/agent"
android:ems="10"
android:inputType="textUri"
android:paddingLeft="10dp"
android:paddingRight="10dp"/>
<CheckBox
android:id="@+id/fullScreen"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignLeft="@+id/historyClear"
android:layout_alignParentRight="true"
android:layout_below="@+id/historyClear"
android:layout_marginRight="20dp"
android:paddingRight="20dp"
android:background="@drawable/blueback"
android:text="@string/fullscreen" />
<CheckBox
android:id="@+id/java"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/fullScreen"
android:layout_toLeftOf="@+id/flash"
android:paddingRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/blueback"
android:text="@string/java" />
<CheckBox
android:id="@+id/location"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/textView4"
android:paddingRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/blueback"
android:text="@string/location" />
<RadioButton
android:id="@+id/radioMobile"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/java"
android:marqueeRepeatLimit="20"
android:onClick="radioAgent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/blueback"
android:text="@string/mobile" />
<CheckBox
android:id="@+id/saveTabs"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignLeft="@+id/password"
android:layout_alignRight="@+id/password"
android:layout_below="@+id/location"
android:background="@drawable/blueback"
android:text="@string/saveTab" />
</RelativeLayout>
</ScrollView>
android:layout_width="match_parent" android:layout_height="match_parent">
<RelativeLayout android:id="@+id/relativeLayout1"
android:layout_width="match_parent" android:layout_height="48dp"
android:layout_alignParentLeft="true" android:layout_alignParentRight="true"
android:layout_alignParentTop="true" android:background="@drawable/bar">
<TextView android:id="@+id/textView1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" android:text="@string/settings"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ImageView android:id="@+id/back" android:layout_width="48dp"
android:layout_height="48dp" android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" android:paddingBottom="5dp"
android:paddingLeft="5dp" android:paddingRight="5dp"
android:paddingTop="5dp" android:src="@drawable/back" />
</RelativeLayout>
<ScrollView android:id="@+id/scrollView1"
android:layout_width="match_parent" android:layout_height="match_parent"
android:layout_below="@+id/relativeLayout1">
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/textView4" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_below="@+id/relativeLayout1"
android:layout_centerHorizontal="true" android:background="#ff0099cc"
android:gravity="center_vertical|center_horizontal" android:text="@string/settingshelp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffffff" />
<CheckBox android:id="@+id/password" android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="56dp" android:layout_below="@+id/saveTabs"
android:text="@string/password"
android:layout_marginLeft="20dp"
/>
<EditText android:id="@+id/agent" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:layout_alignTop="@+id/textView2" android:layout_toRightOf="@+id/textView2"
android:ems="10" android:inputType="textUri" android:background="@drawable/book"
android:paddingLeft="10dp" android:paddingRight="10dp"
android:singleLine="true" />
<CheckBox android:id="@+id/flash" android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="56dp" android:layout_below="@+id/password"
android:text="@string/flash"
android:layout_marginLeft="20dp"
/>
<CheckBox android:id="@+id/historyClear"
android:layout_marginRight="20dp"
android:layout_width="match_parent" android:layout_height="56dp"
android:layout_below="@+id/flash"
android:text="@string/history"
android:layout_marginLeft="20dp"
/>
<RadioButton android:id="@+id/radioDesktop"
android:layout_width="match_parent" android:layout_height="56dp"
android:layout_marginRight="20dp"
android:layout_below="@+id/radioMobile"
android:onClick="radioAgent" android:text="@string/desk"
android:layout_marginLeft="20dp"
/>
<RadioButton android:id="@+id/radioCustom"
android:layout_width="match_parent" android:layout_height="56dp"
android:layout_below="@+id/radioDesktop"
android:onClick="radioAgent" android:text="@string/custom"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
/>
<TextView android:id="@+id/textView2" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_alignParentLeft="true"
android:layout_below="@+id/radioCustom" android:gravity="center_vertical|center_horizontal"
android:paddingLeft="10dp" android:paddingRight="5dp" android:text="@string/agent"
android:layout_marginLeft="20dp"/>
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView2"
android:gravity="center_vertical|center_horizontal"
android:paddingLeft="10dp"
android:paddingRight="5dp"
android:text="@string/home"
android:layout_marginLeft="20dp"/>
<CheckBox android:id="@+id/fullScreen" android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="56dp" android:layout_below="@+id/historyClear"
android:text="@string/fullscreen"
android:layout_marginLeft="20dp"
/>
<CheckBox android:id="@+id/java" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_below="@+id/fullScreen"
android:layout_marginRight="20dp"
android:text="@string/java"
android:layout_marginLeft="20dp"
/>
<RadioButton android:id="@+id/radioMobile"
android:layout_width="match_parent" android:layout_height="56dp"
android:layout_marginRight="20dp"
android:layout_below="@+id/java"
android:marqueeRepeatLimit="20" android:onClick="radioAgent"
android:text="@string/mobile"
android:layout_marginLeft="20dp"
/>
<CheckBox android:id="@+id/saveTabs" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_below="@+id/location"
android:layout_marginRight="20dp"
android:text="@string/saveTab"
android:layout_marginLeft="20dp"
/>
<EditText android:id="@+id/homePage" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_alignBaseline="@+id/textView3"
android:layout_alignBottom="@+id/textView3"
android:layout_alignLeft="@+id/agent"
android:layout_alignParentRight="true" android:background="@drawable/book"
android:ems="10" android:inputType="textUri" android:paddingLeft="10dp"
android:layout_marginRight="20dp"
android:paddingRight="10dp">
</EditText>
<CheckBox
android:id="@+id/location"
android:layout_marginLeft="20dp"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_below="@+id/textView4"
android:layout_marginRight="20dp"
android:text="@string/location"/>
</RelativeLayout>
</ScrollView>
</RelativeLayout>

2
src/acr/browser/barebones/AnthonyWebView.java

@ -9,7 +9,7 @@ import android.webkit.WebView; @@ -9,7 +9,7 @@ import android.webkit.WebView;
public final class AnthonyWebView extends WebView {
boolean move;
int API = Barebones.API;
int API = FinalVars.API;
int hitTest;
boolean showFullScreen = Barebones.showFullScreen;
View uBar = Barebones.uBar;

3276
src/acr/browser/barebones/Barebones.java

File diff suppressed because it is too large Load Diff

4
src/acr/browser/barebones/DatabaseHandler.java

@ -33,10 +33,10 @@ public class DatabaseHandler extends SQLiteOpenHelper { @@ -33,10 +33,10 @@ public class DatabaseHandler extends SQLiteOpenHelper {
// Creating Tables
@Override
public void onCreate(SQLiteDatabase db) {
String CREATE_CONTACTS_TABLE = "CREATE TABLE " + TABLE_HISTORY + "("
String CREATE_HISTORY_TABLE = "CREATE TABLE " + TABLE_HISTORY + "("
+ KEY_ID + " INTEGER PRIMARY KEY," + KEY_URL + " TEXT,"
+ KEY_TITLE + " TEXT" +")";
db.execSQL(CREATE_CONTACTS_TABLE);
db.execSQL(CREATE_HISTORY_TABLE);
}
// Upgrading database

18
src/acr/browser/barebones/FinalVars.java

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
package acr.browser.barebones;
public class FinalVars {
public static final int MAX_TABS = 5;
public static final int MAX_BOOKMARKS = 5;
public static final boolean PAID_VERSION = false;
public static final int API = Integer.valueOf(android.os.Build.VERSION.SDK_INT);
public static final String YAHOO_SEARCH = "https://search.yahoo.com/search?p=";
public static final String GOOGLE_SEARCH = "https://www.google.com/search?q=";
public static final String BING_SEARCH = "https://www.bing.com/search?q=";
public static final String HOMEPAGE = "https://www.google.com/";
public static final String SETTINGS_INTENT = "android.intent.action.BAREBONESSETTINGS";
}

2
src/acr/browser/barebones/Settings.java

@ -59,7 +59,7 @@ public class Settings extends Activity { @@ -59,7 +59,7 @@ public class Settings extends Activity {
agentPicker = settings.getInt("agentchoose", 1);
userAgent = settings.getString("agent", user);
java = settings.getBoolean("java", true);
homepage = settings.getString("home", "http://www.google.com");
homepage = settings.getString("home", FinalVars.HOMEPAGE);
agent.setText(userAgent);
edit = settings.edit();

Loading…
Cancel
Save