예제 #1
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   ApplicationThemeSetter.themeSetter(this);
   setContentView(R.layout.activity_search);
   this.initComponents();
 }
예제 #2
0
 private void getTypeSearch() {
   AlertDialog.Builder builder = new AlertDialog.Builder(this);
   builder.setTitle(R.string.alert_dialog_title_type_search);
   final String[] items =
       this.getResources().getStringArray(R.array.alert_dialog_search_menu_items);
   DialogListItem[] dialogListItems =
       new DialogListItem[] {
         new DialogListItem(R.drawable.ic_account_star_variant, items[0]),
         new DialogListItem(R.drawable.ic_music_box, items[1]),
         new DialogListItem(R.drawable.ic_filmstrip, items[2]),
         new DialogListItem(R.drawable.ic_account_multiple, items[3]),
         new DialogListItem(R.drawable.ic_email_dark, items[4])
       };
   builder.setAdapter(
       new DialogListViewAdapter(this, R.layout.layout_list_view_dialog_search, dialogListItems),
       new DialogInterface.OnClickListener() {
         @Override
         public void onClick(DialogInterface dialog, int which) {
           searchView.setQueryHint(items[which]);
         }
       });
   ApplicationThemeSetter.styleAlertDialogDivider(this, builder.show());
 }