Added AOSP srandard ActionBar and began writing my customizations.
parent
07275a8c11
commit
1f115d2dd1
|
@ -9,4 +9,3 @@
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-10
|
target=android-10
|
||||||
android.library.reference.1=/storage/emulated/0/Download/JakeWharton-ActionBarSherlock-4.4.0-0-g4a79d53/JakeWharton-ActionBarSherlock-5a15d92/actionbarsherlock
|
|
|
@ -18,7 +18,14 @@ public class MainActivity extends Activity
|
||||||
final GetGoogleDorks dorks = new GetGoogleDorks();
|
final GetGoogleDorks dorks = new GetGoogleDorks();
|
||||||
ArrayAdapter<String> adapter;
|
ArrayAdapter<String> adapter;
|
||||||
List<String> list= null;
|
List<String> list= null;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
MenuInflater inflator = getMenuInflater();
|
||||||
|
inflator.inflate(R.menu.menu, menu);
|
||||||
|
return super.onCreateOptionsMenu(menu);
|
||||||
|
}
|
||||||
/** Called when the activity is first created. */
|
/** Called when the activity is first created. */
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState)
|
public void onCreate(Bundle savedInstanceState)
|
||||||
|
@ -90,6 +97,35 @@ public class MainActivity extends Activity
|
||||||
, "Opening http://google.com/#q=" + URLEncoder.encode(list.get(pos)), Toast.LENGTH_LONG).show();
|
, "Opening http://google.com/#q=" + URLEncoder.encode(list.get(pos)), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On selecting action bar icons
|
||||||
|
* */
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Take appropriate action for each action item click
|
||||||
|
switch (item.getItemId()) {
|
||||||
|
case R.id.action_search:
|
||||||
|
// search action
|
||||||
|
return true;
|
||||||
|
case R.id.action_location_found:
|
||||||
|
// location found
|
||||||
|
LocationFound();
|
||||||
|
return true;
|
||||||
|
case R.id.action_refresh:
|
||||||
|
// refresh
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Launching new activity
|
||||||
|
* */
|
||||||
|
private void LocationFound() {
|
||||||
|
Intent i = new Intent(MainActivity.this, LocationFound.class);
|
||||||
|
startActivity(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue