Added more menu code
parent
a0bc2ecec1
commit
b9e5c97c38
|
@ -20,6 +20,8 @@
|
|||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="com.cmb.googledorks.SettingsActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
android:title="@string/action_help"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
||||
<!-- Search / will display always -->
|
||||
<!-- Share / will display always -->
|
||||
<item android:id="@+id/action_share"
|
||||
android:icon="@drawable/ic_action_share"
|
||||
android:title="@string/action_share"
|
||||
android:showAsAction="ifRoom"/>
|
||||
android:showAsAction="ifRoom"
|
||||
android:actionProviderClass="android.widget.ShareActionProvider" />
|
||||
</menu>
|
||||
|
|
|
@ -20,6 +20,7 @@ public class MainActivity extends Activity
|
|||
|
||||
ArrayAdapter<String> adapter;
|
||||
List<String> list= null;
|
||||
private ShareActionProvider mShare;
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -110,6 +111,8 @@ public class MainActivity extends Activity
|
|||
switch (item.getItemId()) {
|
||||
case R.id.action_refresh:
|
||||
// search action
|
||||
Intent intent_settings = new Intent(this, SettingsActivity.class);
|
||||
this.startActivity(intent_settings);
|
||||
return true;
|
||||
case R.id.action_help:
|
||||
// location found
|
||||
|
@ -118,7 +121,7 @@ public class MainActivity extends Activity
|
|||
sh.show();
|
||||
return true;
|
||||
case R.id.action_share:
|
||||
// refresh
|
||||
mShare = (ShareActionProvider)item.getActionProvider();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
|
Loading…
Reference in New Issue