Exemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    refresh();
  }
Exemplo n.º 2
0
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   switch (item.getItemId()) {
     case R.id.action_refresh:
       refresh();
       return true;
     case R.id.action_share:
       share();
       return true;
     default:
       return super.onOptionsItemSelected(item);
   }
 }