Update screens
This commit is contained in:
parent
3997d47792
commit
115924384f
9 changed files with 27 additions and 129 deletions
|
@ -148,8 +148,8 @@
|
|||
<activity android:name="net.osmand.plus.activities.search.SearchStreet2ByNameActivity"></activity>
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchBuildingByNameActivity"></activity>
|
||||
<activity android:name="net.osmand.plus.sherpafy.TourCommonActivity"></activity>
|
||||
<activity android:name="net.osmand.plus.sherpafy.SherpafyStartActivity" android:exported="true" android:launchMode= "singleInstance"></activity>
|
||||
<activity android:name="net.osmand.plus.sherpafy.TourViewActivity"></activity>
|
||||
<activity android:name="net.osmand.plus.sherpafy.SherpafySelectTourActivity" />
|
||||
<activity android:name="net.osmand.plus.sherpafy.TourViewActivity" android:exported="true" android:launchMode= "singleInstance"/>
|
||||
<activity android:name="net.osmand.plus.activities.EditPOIFilterActivity"></activity>
|
||||
<activity android:name="net.osmand.plus.activities.search.GeoIntentActivity">
|
||||
<intent-filter>
|
||||
|
|
|
@ -9,18 +9,14 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:orientation="horizontal">
|
||||
<Button android:id="@+id/select_tour"
|
||||
android:layout_marginRight="5dp"
|
||||
android:maxWidth="60dp"
|
||||
android:minWidth="60dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_width="120dp"
|
||||
android:text="@string/select_tour"
|
||||
android:layout_height="wrap_content"/>
|
||||
<Button android:id="@+id/download_tour"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:maxWidth="60dp"
|
||||
android:minWidth="60dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="@string/download_tour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
|
@ -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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
|
@ -30,7 +31,8 @@
|
|||
android:id="@+id/start_tour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="right"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="@string/start_tour" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -60,6 +62,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="18sp" >
|
||||
</TextView>
|
||||
|
||||
|
@ -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" >
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tour_name"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="25sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tour_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textSize="18sp" >
|
||||
</TextView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tour_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingTop="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tour_fulldescription"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textSize="18sp" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView android:id="@+id/icon" android:layout_width="37dip"
|
||||
android:paddingLeft="8dp" android:paddingRight="8dp"
|
||||
android:paddingTop="2dp" android:layout_height="fill_parent" />
|
||||
<TextView android:id="@+id/label" android:layout_width="0dp" android:layout_weight="1"
|
||||
android:layout_height="wrap_content" style="@style/ListText"/>
|
||||
|
||||
<ImageView android:id="@+id/check_item"
|
||||
android:paddingLeft="4dp" android:paddingRight="8dp" android:src="@drawable/ic_action_ok_light"
|
||||
android:layout_width="37dip"
|
||||
android:paddingTop="2dp" android:layout_height="fill_parent" />
|
||||
</LinearLayout>
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TabHost
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
</TabHost>
|
|
@ -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);
|
||||
|
@ -47,10 +39,9 @@ public class SherpafyStartActivity extends SherlockFragmentActivity {
|
|||
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;
|
||||
}
|
||||
|
|
@ -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,6 +39,10 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
|||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
if (!(getMyApplication().getAppCustomization() instanceof SherpafyCustomization)) {
|
||||
getMyApplication().setAppCustomization(new SherpafyCustomization());
|
||||
}
|
||||
customization = (SherpafyCustomization) getMyApplication().getAppCustomization();
|
||||
setTheme(R.style.OsmandLightTheme);
|
||||
((OsmandApplication) getApplication()).setLanguage(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -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);
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue