updates for icons, backgrounds and improved drawing

code to solve issues related to outofmemory
This commit is contained in:
Nathan Freitas 2014-04-08 10:46:52 -04:00
parent 9d1311c342
commit 3d1f3912ea
14 changed files with 45 additions and 75 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -5,39 +5,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="70sp"
android:id="@+id/relativeLayout1"
android:layout_gravity="center_vertical|center_horizontal"
android:background="#000000"
>
<ImageView
android:src="@drawable/icon"
android:id="@+id/orbot_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingLeft="20sp"
android:paddingTop="10sp" >
</ImageView>
<TextView
android:id="@+id/WizardTextTitle"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:fadingEdge="vertical"
android:gravity="center_vertical"
android:paddingLeft="5sp"
android:singleLine="true"
android:text="TITLE"
android:textColor="#FFFFFF"
android:textSize="10pt" />
</RelativeLayout>
<TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content">

View File

@ -247,5 +247,7 @@
<string name="permission_manage_tor_label">Manage Tor</string>
<string name="permission_manage_tor_description">Enable this app to control the Tor service</string>
<string name="it_doesn_t_seem_like_you_have_orweb_installed_want_help_with_that_or_should_we_just_open_the_browser_">It doesn\'t seem like you have Orweb installed. Want help with that, or should we just open the browser?</string>
<string name="install_apps_">Install apps?</string>
</resources>

View File

@ -632,9 +632,9 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
else
{
AlertDialog aDialog = new AlertDialog.Builder(Orbot.this)
.setIcon(R.drawable.icon)
.setTitle("Install apps?")
.setMessage("It doesn't seem like you have Orweb installed. Want help with that, or should we just open the browser?")
.setIcon(R.drawable.onion)
.setTitle(R.string.install_apps_)
.setMessage(R.string.it_doesn_t_seem_like_you_have_orweb_installed_want_help_with_that_or_should_we_just_open_the_browser_)
.setPositiveButton(android.R.string.ok, new OnClickListener ()
{
@ -759,7 +759,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
if (button)
{
aDialog = new AlertDialog.Builder(Orbot.this)
.setIcon(R.drawable.icon)
.setIcon(R.drawable.onion)
.setTitle(title)
.setMessage(msg)
.setPositiveButton(android.R.string.ok, null)
@ -768,7 +768,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
else
{
aDialog = new AlertDialog.Builder(Orbot.this)
.setIcon(R.drawable.icon)
.setIcon(R.drawable.onion)
.setTitle(title)
.setMessage(msg)
.show();
@ -785,28 +785,32 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
{
try
{
int newTorStatus = -1;
//if the serivce is bound, query it for the curren status value (int)
if (mService != null)
torStatus = mService.getStatus();
newTorStatus = mService.getStatus();
//now update the layout_main UI based on the status
if (imgStatus != null)
{
if (torStatus == TorServiceConstants.STATUS_ON)
if (newTorStatus == TorServiceConstants.STATUS_ON)
{
imgStatus.setImageResource(R.drawable.toron);
if (torStatus != newTorStatus)
{
imgStatus.setImageResource(R.drawable.toron);
mViewMain.setBackgroundResource(R.drawable.onionrootonly);
String lblMsg = getString(R.string.status_activated);
lblStatus.setText(lblMsg);
mViewMain.setBackgroundResource(R.drawable.onionrootonly);
// hideProgressDialog();
if (mItemOnOff != null)
mItemOnOff.setTitle(R.string.menu_stop);
String lblMsg = getString(R.string.status_activated);
lblStatus.setText(lblMsg);
}
if (torServiceMsg != null && torServiceMsg.length() > 0)
{
// showAlert("Update", torServiceMsg,xte
appendLogTextAndScroll(torServiceMsg);
}
@ -825,9 +829,6 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
}
if (mItemOnOff != null)
mItemOnOff.setTitle(R.string.menu_stop);
if (autoStartFromIntent)
{
@ -836,39 +837,39 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
}
}
else if (torStatus == TorServiceConstants.STATUS_CONNECTING)
else if (newTorStatus == TorServiceConstants.STATUS_CONNECTING)
{
if (torStatus != newTorStatus)
{
imgStatus.setImageResource(R.drawable.torstarting);
mViewMain.setBackgroundResource(R.drawable.onionrootonlygold);
if (lblStatus != null && torServiceMsg != null)
if (torServiceMsg.indexOf('%')!=-1)
lblStatus.setText(torServiceMsg);
appendLogTextAndScroll(torServiceMsg);
if (mItemOnOff != null)
mItemOnOff.setTitle(R.string.menu_stop);
}
if (lblStatus != null && torServiceMsg != null)
if (torServiceMsg.indexOf('%')!=-1)
lblStatus.setText(torServiceMsg);
appendLogTextAndScroll(torServiceMsg);
}
else
else if (torStatus != newTorStatus)
{
mViewMain.setBackgroundResource(R.drawable.onionrootonlygrey);
imgStatus.setImageResource(R.drawable.toroff);
lblStatus.setText(getString(R.string.status_disabled) + "\n" + getString(R.string.press_to_start));
// hideProgressDialog();
mViewMain.setBackgroundResource(R.drawable.onionrootonlygrey);
imgStatus.setImageResource(R.drawable.toroff);
lblStatus.setText(getString(R.string.status_disabled) + "\n" + getString(R.string.press_to_start));
if (mItemOnOff != null)
mItemOnOff.setTitle(R.string.menu_start);
if (mItemOnOff != null)
mItemOnOff.setTitle(R.string.menu_start);
}
}
torStatus = newTorStatus;
}
catch (RemoteException e)
{

View File

@ -67,7 +67,7 @@ public class TipsAndTricks extends Activity implements TorConstants {
txtTitle.setText(title);
ImageView img = (ImageView) findViewById(R.id.orbot_image);
img.setImageResource(R.drawable.icon);
img.setImageResource(R.drawable.onion);
Button btnLink = (Button)findViewById(R.id.WizardRootButtonInstallGibberbot);
@ -183,7 +183,7 @@ public class TipsAndTricks extends Activity implements TorConstants {
btn2.setText(getString(R.string.btn_finish));
btn1.setVisibility(Button.VISIBLE);
img.setImageResource(R.drawable.icon);
img.setImageResource(R.drawable.onion);
btn1.setOnClickListener(new View.OnClickListener() {