diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml
index dbfa71c536..05fffbabe6 100644
--- a/OsmAnd/AndroidManifest.xml
+++ b/OsmAnd/AndroidManifest.xml
@@ -148,8 +148,8 @@
-
-
+
+
diff --git a/OsmAnd/res/layout/sherpafy_start.xml b/OsmAnd/res/layout/sherpafy_start.xml
index 45eb5a9276..1fb1de84f3 100644
--- a/OsmAnd/res/layout/sherpafy_start.xml
+++ b/OsmAnd/res/layout/sherpafy_start.xml
@@ -9,18 +9,14 @@
android:layout_centerVertical="true"
android:orientation="horizontal">
\ No newline at end of file
diff --git a/OsmAnd/res/layout/custom_tour_info.xml b/OsmAnd/res/layout/sherpafy_tour_info.xml
similarity index 90%
rename from OsmAnd/res/layout/custom_tour_info.xml
rename to OsmAnd/res/layout/sherpafy_tour_info.xml
index d2fb08a3d9..47fcb80c30 100644
--- a/OsmAnd/res/layout/custom_tour_info.xml
+++ b/OsmAnd/res/layout/sherpafy_tour_info.xml
@@ -15,10 +15,11 @@
android:id="@+id/collapse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:button="@drawable/expandable_category" />
+ android:button="@drawable/expandable_category"
+ android:background="@null" />
@@ -60,6 +62,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
+ android:gravity="center_horizontal"
android:textSize="18sp" >
@@ -75,6 +78,7 @@
android:id="@+id/tour_fulldescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:inputType="textMultiLine"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:textSize="16sp" >
diff --git a/OsmAnd/res/layout/tour_info.xml b/OsmAnd/res/layout/tour_info.xml
deleted file mode 100644
index a334f2291e..0000000000
--- a/OsmAnd/res/layout/tour_info.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/tour_listitem.xml b/OsmAnd/res/layout/tour_listitem.xml
deleted file mode 100644
index 2cc026a043..0000000000
--- a/OsmAnd/res/layout/tour_listitem.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/res/layout/tour_main.xml b/OsmAnd/res/layout/tour_main.xml
deleted file mode 100644
index 99e54ecbc8..0000000000
--- a/OsmAnd/res/layout/tour_main.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStartActivity.java b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafySelectTourActivity.java
similarity index 91%
rename from OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStartActivity.java
rename to OsmAnd/src/net/osmand/plus/sherpafy/SherpafySelectTourActivity.java
index 3ec32b5bf2..2661fbfa23 100644
--- a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStartActivity.java
+++ b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafySelectTourActivity.java
@@ -6,6 +6,7 @@ import net.osmand.IProgress;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.DownloadIndexActivity;
+import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
@@ -20,7 +21,7 @@ import com.actionbarsherlock.app.SherlockFragmentActivity;
/**
*/
-public class SherpafyStartActivity extends SherlockFragmentActivity {
+public class SherpafySelectTourActivity extends SherlockFragmentActivity {
private SherpafyCustomization customization;
@@ -30,15 +31,6 @@ public class SherpafyStartActivity extends SherlockFragmentActivity {
getMyApplication().setAppCustomization(new SherpafyCustomization());
}
customization = (SherpafyCustomization) getMyApplication().getAppCustomization();
- //Initialization
- Intent intent = getIntent();
- if(intent != null && !intent.hasExtra("SETTINGS") && customization.isTourSelected()) {
- super.onCreate(savedInstanceState);
- Intent nintent = new Intent(getApplicationContext(), TourViewActivity.class);
- startActivity(nintent);
- finish();
- return;
- }
setTheme(R.style.OsmandLightTheme);
((OsmandApplication) getApplication()).setLanguage(this);
super.onCreate(savedInstanceState);
@@ -46,11 +38,10 @@ public class SherpafyStartActivity extends SherlockFragmentActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setTitle(R.string.sherpafy_app_name);
super.setContentView(R.layout.sherpafy_start);
-
-
ProgressDialog startProgressDialog = new ProgressDialog(this);
getMyApplication().checkApplicationIsBeingInitialized(this, startProgressDialog);
+
setContentView();
// FIXME is this needed?
@@ -129,7 +120,7 @@ public class SherpafyStartActivity extends SherlockFragmentActivity {
}
- private SherpafyStartActivity getActivity() {
+ private Activity getActivity() {
return this;
}
diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java
index 6bfd86ad2f..bb29b24ebd 100644
--- a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java
+++ b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java
@@ -5,7 +5,6 @@ import java.util.List;
import net.osmand.IProgress;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
-import net.osmand.plus.activities.ContributionVersionActivity;
import net.osmand.plus.activities.MapActivity;
import android.app.ProgressDialog;
import android.content.Intent;
@@ -40,7 +39,11 @@ public class TourViewActivity extends SherlockFragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
- setTheme(R.style.OsmandLightTheme);
+ if (!(getMyApplication().getAppCustomization() instanceof SherpafyCustomization)) {
+ getMyApplication().setAppCustomization(new SherpafyCustomization());
+ }
+ customization = (SherpafyCustomization) getMyApplication().getAppCustomization();
+ setTheme(R.style.OsmandLightTheme);
((OsmandApplication) getApplication()).setLanguage(this);
super.onCreate(savedInstanceState);
getSherlock().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
@@ -49,9 +52,8 @@ public class TourViewActivity extends SherlockFragmentActivity {
ProgressDialog startProgressDialog = new ProgressDialog(this);
getMyApplication().checkApplicationIsBeingInitialized(this, startProgressDialog);
- customization = (SherpafyCustomization) getMyApplication().getAppCustomization();
- setContentView(R.layout.custom_tour_info);
+ setContentView(R.layout.sherpafy_tour_info);
ToggleButton collapser = (ToggleButton) findViewById(R.id.collapse);
stages = (RadioGroup) findViewById(R.id.stages);
@@ -91,8 +93,7 @@ public class TourViewActivity extends SherlockFragmentActivity {
@Override
public void onClick(View widget) {
- Intent intent = new Intent(getApplicationContext(), SherpafyStartActivity.class);
- intent.putExtra("SETTINGS", true);
+ Intent intent = new Intent(getApplicationContext(), SherpafySelectTourActivity.class);
startActivity(intent);
}
}, 0, content.length(), 0);
@@ -107,6 +108,8 @@ public class TourViewActivity extends SherlockFragmentActivity {
getSupportActionBar().setTitle(customization.getSelectedTour().getName());
updateTourView();
} else {
+// Intent intent = new Intent(getApplicationContext(), SherpafySelectTourActivity.class);
+// startActivity(intent);
//
}
}
diff --git a/plugins/Osmand-Sherpafy/src/net/osmand/sherpafy/SherpafyPluginActivity.java b/plugins/Osmand-Sherpafy/src/net/osmand/sherpafy/SherpafyPluginActivity.java
index 7a1fba930f..a4577210b3 100644
--- a/plugins/Osmand-Sherpafy/src/net/osmand/sherpafy/SherpafyPluginActivity.java
+++ b/plugins/Osmand-Sherpafy/src/net/osmand/sherpafy/SherpafyPluginActivity.java
@@ -14,7 +14,7 @@ import android.os.Bundle;
public class SherpafyPluginActivity extends Activity {
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
private static final String OSMAND_COMPONENT_PLUS = "net.osmand.plus"; //$NON-NLS-1$
- private static final String OSMAND_ACTIVITY = "net.osmand.plus.sherpafy.SherpafyStartActivity"; //$NON-NLS-1$
+ private static final String OSMAND_ACTIVITY = "net.osmand.plus.sherpafy.TourViewActivity"; //$NON-NLS-1$
/** Called when the activity is first created. */
@Override