Skip to content

Commit

Permalink
Merge pull request #13 from ppicazo/master
Browse files Browse the repository at this point in the history
Fix user crashes on solar screen.
  • Loading branch information
ppicazo committed Sep 29, 2011
2 parents 36fb3e2 + 8721a4e commit c1bb1c0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smerty.ham" android:versionCode="13" android:versionName="1.5.2">
package="com.smerty.ham" android:versionCode="18" android:versionName="1.5.7">
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true">
<activity android:name=".ham" android:label="@string/app_name">
Expand Down
2 changes: 1 addition & 1 deletion src/com/smerty/ham/Geo.java
Expand Up @@ -40,7 +40,7 @@ public Geo() {
// this causes an issue on some devices, odd...
try {
this.decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
} catch (Exception e) {
} catch (java.lang.NoSuchMethodError e) {
Log.w("Geo", "Exception: " + e.getMessage());
}
}
Expand Down
44 changes: 24 additions & 20 deletions src/com/smerty/ham/Solar.java
Expand Up @@ -323,28 +323,32 @@ public void allTogether() {
row.addView(text);
table.addView(row);

for (Phenomenon pheno : conds.getCalculatedvhfconditions()
.getPhenomenon()) {
row = new TableRow(this);
text = new TextView(this);
if (pheno.getName().equals("vhf-aurora")) {
text.setText("Aurora: \t" + pheno.getValue());
} else if (pheno.getName().equals("E-Skip")) {
if (pheno.getLocation().equals("north_america")) {
text.setText("2m Es N. America: \t" + pheno.getValue());
} else if (pheno.getLocation().equals("europe")) {
text.setText("2m Es Europe: \t" + pheno.getValue());
} else if (pheno.getLocation().equals("europe_6m")) {
text.setText("6m Es Europe: \t" + pheno.getValue());
} else if (pheno.getLocation().equals("europe_4m")) {
text.setText("4m Es Europe: \t" + pheno.getValue());
if (conds.getCalculatedvhfconditions() != null) {
for (Phenomenon pheno : conds.getCalculatedvhfconditions()
.getPhenomenon()) {
row = new TableRow(this);
text = new TextView(this);
if (pheno.getName().equals("vhf-aurora")) {
text.setText("Aurora: \t" + pheno.getValue());
} else if (pheno.getName().equals("E-Skip")) {
if (pheno.getLocation().equals("north_america")) {
text.setText("2m Es N. America: \t" + pheno.getValue());
} else if (pheno.getLocation().equals("europe")) {
text.setText("2m Es Europe: \t" + pheno.getValue());
} else if (pheno.getLocation().equals("europe_6m")) {
text.setText("6m Es Europe: \t" + pheno.getValue());
} else if (pheno.getLocation().equals("europe_4m")) {
text.setText("4m Es Europe: \t" + pheno.getValue());
}
}
text.setTextSize(18);
row.setPadding(3, 3, 3, 3);
row.setBackgroundColor(Color.argb(200, 51, 51, 51));
row.addView(text);
table.addView(row);
}
text.setTextSize(18);
row.setPadding(3, 3, 3, 3);
row.setBackgroundColor(Color.argb(200, 51, 51, 51));
row.addView(text);
table.addView(row);
} else {
Log.w("allTogether", "calculatedvhfconditions was null");
}

row = new TableRow(this);
Expand Down

0 comments on commit c1bb1c0

Please sign in to comment.