-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
145 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="cz.cvut.fel.nur.zavody" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
package="cz.cvut.fel.nur.zavody" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
<uses-sdk android:minSdkVersion="15" /> | ||
|
||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
|
||
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher"> | ||
<uses-library android:name="com.google.android.maps" /> | ||
<activity android:name="MainActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name="cz.cvut.fel.nur.zavody.activity.NormalMode" | ||
android:label="@string/ma_maps"> | ||
<uses-library android:name="com.google.android.maps" /> | ||
</activity> | ||
</application> | ||
</manifest> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
> | ||
<com.google.android.maps.MapView | ||
android:id="@+id/nm_map" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
|
||
android:enabled="true" | ||
android:clickable="true" | ||
android:apiKey="0FWL-kvtGWbNHGzJfBDEDEGUfv-3YSFzDjNXJAw" | ||
/> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- <item android:id="@+id/rate" | ||
android:icon="@drawable/ic_menu_star" | ||
android:title="@string/rate" | ||
android:showAsAction="withText|always" | ||
android:visible="false" | ||
/>--> | ||
<!-- <item android:id="@+id/up" | ||
android:icon="@drawable/folder_up" | ||
android:title="@string/Up" | ||
android:showAsAction="withText|always" | ||
android:visible="false" | ||
/> | ||
<item android:id="@+id/menu_share" | ||
android:showAsAction="ifRoom" | ||
android:title="@string/share" | ||
android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider" | ||
android:visible="false" | ||
/> | ||
<item android:id="@+id/menu_delete" | ||
android:icon="@drawable/ic_menu_delete" | ||
android:showAsAction="ifRoom" | ||
android:title="@string/delete" | ||
android:visible="false" | ||
/> | ||
<item android:id="@+id/preferences" | ||
android:icon="@drawable/ic_menu_preferences" | ||
android:title="@string/preferences" | ||
android:showAsAction="never" | ||
/> | ||
<item android:id="@+id/about" | ||
android:icon="@drawable/ic_menu_info_details" | ||
android:showAsAction="never" | ||
android:title="@string/about" />--> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">MainActivity</string> | ||
<string name="app_name">Závody</string> | ||
|
||
<!-- MainActivity --> | ||
<string name="ma_maps">Mapy</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,47 @@ | ||
package cz.cvut.fel.nur.zavody; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.Menu; | ||
import android.view.MenuInflater; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import cz.cvut.fel.nur.zavody.activity.NormalMode; | ||
|
||
public class MainActivity extends Activity | ||
{ | ||
/** Called when the activity is first created. */ | ||
/** | ||
* Tohle je první volaná aktivita | ||
* | ||
* @author saljack | ||
*/ | ||
public class MainActivity extends Activity { | ||
|
||
private Button _mapsButton; | ||
|
||
/** | ||
* Called when the activity is first created. | ||
*/ | ||
@Override | ||
public void onCreate(Bundle savedInstanceState) | ||
{ | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.main); | ||
_mapsButton = (Button) findViewById(R.id.ma_button01); | ||
_mapsButton.setOnClickListener(new View.OnClickListener() { | ||
public void onClick(View v) { | ||
startMapsActivity(); | ||
} | ||
}); | ||
} | ||
|
||
private void startMapsActivity() { | ||
Intent intent = new Intent(MainActivity.this, NormalMode.class); | ||
startActivity(intent); | ||
} | ||
|
||
@Override | ||
public boolean onCreateOptionsMenu(Menu menu) { | ||
MenuInflater inflater = getMenuInflater(); | ||
inflater.inflate(R.menu.main_menu, menu); | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* To change this template, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package cz.cvut.fel.nur.zavody.activity; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import com.google.android.maps.MapActivity; | ||
import com.google.android.maps.MapView; | ||
import cz.cvut.fel.nur.zavody.R; | ||
|
||
/** | ||
* | ||
* @author saljack | ||
*/ | ||
public class NormalMode extends MapActivity { | ||
|
||
/** | ||
* Called when the activity is first created. | ||
*/ | ||
@Override | ||
public void onCreate(Bundle icicle) { | ||
super.onCreate(icicle); | ||
setContentView(R.layout.normal_mode); | ||
MapView mapView = (MapView) findViewById(R.id.nm_map); | ||
mapView.setBuiltInZoomControls(true); | ||
} | ||
|
||
@Override | ||
protected boolean isRouteDisplayed() { | ||
return true; | ||
} | ||
} |