Commit 364095bd authored by Max Lv's avatar Max Lv

update theme

parent a53c9ff5
...@@ -20,11 +20,12 @@ ...@@ -20,11 +20,12 @@
<application <application
android:name=".ShadowsocksApplication" android:name=".ShadowsocksApplication"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@drawable/icon" android:icon="@drawable/ic_launcher"
android:label="@string/app_name"> android:label="@string/app_name">
<activity <activity
android:name=".Shadowsocks" android:name=".Shadowsocks"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/Theme.GAEProxy"
android:launchMode="singleTask"> android:launchMode="singleTask">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
......
...@@ -164,6 +164,8 @@ ...@@ -164,6 +164,8 @@
console.log("calculating ciphers"); console.log("calculating ciphers");
console.log = function() {};
tables = getTable(KEY); tables = getTable(KEY);
encryptTable = tables[0]; encryptTable = tables[0];
...@@ -186,7 +188,8 @@ ...@@ -186,7 +188,8 @@
var aServer, addrtype, buf, cmd, reply, tempBuf; var aServer, addrtype, buf, cmd, reply, tempBuf;
if (stage === 5) { if (stage === 5) {
encrypt(encryptTable, data); encrypt(encryptTable, data);
if (!remote.write(data)) { // Android Patch
if (data == null || !remote.write(data)) {
connection.pause(); connection.pause();
} }
return; return;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
android:layout_height="fill_parent"> android:layout_height="fill_parent">
<ImageView android:id="@+id/image" android:layout_width="wrap_content" <ImageView android:id="@+id/image" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_marginLeft="10dp" android:layout_height="fill_parent" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:src="@drawable/icon" /> android:layout_marginRight="10dp" android:src="@drawable/ic_launcher" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/v.sched.quite"
android:id="@+id/mainLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:scrollbarAlwaysDrawVerticalTrack="true" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
Zirco Browser for Android
Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
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.
-->
<resources>
<!-- Variation on the Light theme that turns off the title -->
<style name="Theme.GAEProxy" parent="android:Theme.Holo.Light"/>
</resources>
\ No newline at end of file
...@@ -83,5 +83,8 @@ ...@@ -83,5 +83,8 @@
<string name="system_proxy">系统代理</string> <string name="system_proxy">系统代理</string>
<string name="system_proxy_summary">设置系统代理,无需ROOT权限,仅工作在Android 4.0及以上系统,并仅对当前Wifi连接生效</string> <string name="system_proxy_summary">设置系统代理,无需ROOT权限,仅工作在Android 4.0及以上系统,并仅对当前Wifi连接生效</string>
<string name="remote_port">远程端口</string>
<string name="remote_port_summary">Shadowsocks服务器端口</string>
</resources> </resources>
...@@ -16,33 +16,7 @@ ...@@ -16,33 +16,7 @@
<resources> <resources>
<!-- Base application theme is the default theme -->
<style name="Theme" parent="android:Theme" />
<!-- Variation on the Light theme that turns off the title --> <!-- Variation on the Light theme that turns off the title -->
<style name="Theme.GAEProxy" parent="@android:style/Theme"> <style name="Theme.GAEProxy" parent="android:Theme.Light"/>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Bookmarks"></style>
<style name="Bookmarks.Title">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@android:color/white</item>
</style>
<style name="History"></style>
<style name="History.Title">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@android:color/white</item>
</style>
<style name="History.Url">
<item name="android:textSize">12sp</item>
<item name="android:textColor">#888888</item>
</style>
</resources> </resources>
\ No newline at end of file
...@@ -200,7 +200,6 @@ public class Shadowsocks extends PreferenceActivity implements ...@@ -200,7 +200,6 @@ public class Shadowsocks extends PreferenceActivity implements
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.main);
addPreferencesFromResource(R.xml.shadowsocks_preference); addPreferencesFromResource(R.xml.shadowsocks_preference);
proxyText = (EditTextPreference) findPreference("proxy"); proxyText = (EditTextPreference) findPreference("proxy");
......
...@@ -319,7 +319,7 @@ public class ShadowsocksService extends Service { ...@@ -319,7 +319,7 @@ public class ShadowsocksService extends Service {
} }
private void notifyAlert(String title, String info) { private void notifyAlert(String title, String info) {
notification.icon = R.drawable.ic_stat_gaeproxy; notification.icon = R.drawable.ic_stat_shadowsocks;
notification.tickerText = title; notification.tickerText = title;
notification.flags = Notification.FLAG_ONGOING_EVENT; notification.flags = Notification.FLAG_ONGOING_EVENT;
initSoundVibrateLights(notification); initSoundVibrateLights(notification);
...@@ -330,7 +330,7 @@ public class ShadowsocksService extends Service { ...@@ -330,7 +330,7 @@ public class ShadowsocksService extends Service {
} }
private void notifyAlert(String title, String info, int flags) { private void notifyAlert(String title, String info, int flags) {
notification.icon = R.drawable.ic_stat_gaeproxy; notification.icon = R.drawable.ic_stat_shadowsocks;
notification.tickerText = title; notification.tickerText = title;
notification.flags = flags; notification.flags = flags;
initSoundVibrateLights(notification); initSoundVibrateLights(notification);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment