Esempio n. 1
0
 public View getView(int position, View convertView, ViewGroup parent) {
   final InfoItem item = getItem(position);
   if (convertView == null && item.getTitle().equals("カレンダー同期")) {
     convertView = inflater.inflate(R.layout.info_calendar, null);
     final TextView text = (TextView) convertView.findViewById(R.id.info_calendar_title);
     text.setText(item.getTitle());
     s = (Switch) convertView.findViewById(R.id.info_switch);
     setChecked();
     s.setOnCheckedChangeListener(this);
   } else {
     convertView = inflater.inflate(R.layout.info_row, null);
     final TextView title = (TextView) convertView.findViewById(R.id.info_title);
     title.setText(item.getTitle());
     final TextView contains = (TextView) convertView.findViewById(R.id.info_contains);
     contains.setText(item.getContains());
   }
   return convertView;
 }
Esempio n. 2
0
 @OnItemClick(R.id.infoList)
 void onItemClick(final ListView lv, int position) {
   final InfoItem item = (InfoItem) lv.getItemAtPosition(position);
   if (item.getTitle().equals("お問い合わせ")) {
     final Intent intent = new Intent();
     intent.setAction(Intent.ACTION_SENDTO);
     intent.setData(Uri.parse("mailto:[email protected]"));
     startActivity(intent);
   }
 }