Starting work on modifying mobile app action bar.
This commit is contained in:
parent
42d5b8d8f9
commit
13bd906a9e
22
.gitattributes
vendored
Normal file
22
.gitattributes
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
*.sln merge=union
|
||||
*.csproj merge=union
|
||||
*.vbproj merge=union
|
||||
*.fsproj merge=union
|
||||
*.dbproj merge=union
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
4
build.py
4
build.py
@ -220,6 +220,10 @@ if buildMobile:
|
||||
# copy the user location script into the mobile folder.
|
||||
shutil.copy(os.path.join(outDir,"user-location.user.js"), "mobile/assets/user-location.user.js")
|
||||
# also copy plugins
|
||||
try:
|
||||
os.makedirs("mobile/assets/plugins")
|
||||
except:
|
||||
pass
|
||||
shutil.rmtree("mobile/assets/plugins")
|
||||
shutil.copytree(os.path.join(outDir,"plugins"), "mobile/assets/plugins", ignore=shutil.ignore_patterns('*.meta.js', 'force-https*'))
|
||||
|
||||
|
@ -27,4 +27,9 @@
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/locate"></item>
|
||||
|
||||
<item android:id="@+id/info"
|
||||
android:orderInCategory="160"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_info"></item>
|
||||
|
||||
</menu>
|
@ -3,6 +3,7 @@
|
||||
|
||||
<string name="app_name">IITC mobile</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="action_info">Info</string>
|
||||
<string name="reload">Reload IITC</string>
|
||||
<string name="version">Print Version</string>
|
||||
<string name="cache_clear">Clear Cache</string>
|
||||
|
@ -223,6 +223,7 @@ public class IITC_Mobile extends Activity {
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
this.getActionBar().setHomeButtonEnabled(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -230,6 +231,9 @@ public class IITC_Mobile extends Activity {
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle item selection
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
iitc_view.loadUrl("javascript: window.smartphone.mapButton.click();");
|
||||
return true;
|
||||
case R.id.reload_button:
|
||||
this.loadUrl(intel_url);
|
||||
return true;
|
||||
@ -272,6 +276,9 @@ public class IITC_Mobile extends Activity {
|
||||
intent.putExtra("iitc_version", iitc_view.getWebViewClient().getIITCVersion());
|
||||
startActivity(intent);
|
||||
return true;
|
||||
case R.id.info:
|
||||
iitc_view.loadUrl("javascript: window.smartphone.sideButton.click();");
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user