Пример #1
5
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      LayoutInflater inflater =
          (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView = inflater.inflate(R.layout.list_item_icon, parent, false);
      TextView textView = (TextView) rowView.findViewById(R.id.label);

      ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);
      textView.setText(mValues[position]);

      // Set icons
      String s = mValues[position];
      if (s.equals("CPU")) {
        imageView.setImageResource(R.drawable.ic_drawer_cpu);
      } else if (s.equals("System")) {
        imageView.setImageResource(R.drawable.ic_drawer_system);
      } else if (s.equals("Disks")) {
        imageView.setImageResource(R.drawable.ic_drawer_disks);
      } else if (s.equals("Processes")) {
        imageView.setImageResource(R.drawable.ic_drawer_processes);
      } else if (s.equals("GPU")) {
        imageView.setImageResource(R.drawable.ic_drawer_gpu);
      } else if (s.equals("Overview")) {
        imageView.setImageResource(R.drawable.ic_drawer_overview);
      } else if (s.equals("History")) {
        imageView.setImageResource(R.drawable.ic_drawer_history);
      } else if (s.equals("Notifications")) {
        imageView.setImageResource(R.drawable.ic_drawer_notifications);
      }
      imageView.setContentDescription(s + " icon");

      return rowView;
    }
Пример #2
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splitbill);

    TippyTipperApplication appState = ((TippyTipperApplication) this.getApplication());

    splitBill(appState.service.getNumberOfPeople());

    View btn_add_person = findViewById(R.id.btn_add_person);
    btn_add_person.setOnClickListener(
        new OnClickListener() {
          public void onClick(View v) {
            addPerson();
            FlurryAgent.onEvent("Add Person Button");
          }
        });

    View btn_remove_person = findViewById(R.id.btn_remove_person);
    btn_remove_person.setOnClickListener(
        new OnClickListener() {
          public void onClick(View v) {
            removePerson();
            FlurryAgent.onEvent("Remove Person Button");
          }
        });
  }
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
    Boolean isDrawerOpen = mDrawerLayout.isDrawerOpen(Gravity.RIGHT);
    Boolean isMenuListFocused = false;
    if (mList != null) {
      isMenuListFocused = mList.hasFocus();
    }
    View view = this.getCurrentFocus();

    if (isDrawerOpen) {
      if (!view.getClass()
          .getName()
          .equalsIgnoreCase("com.android.internal.view.menu.ActionMenuItemView")) {
        mDrawerLayout.closeDrawers();
        mDrawerLayout.getChildAt(0).requestFocus();
      }
    } else {
      if (KeyEvent.KEYCODE_DPAD_UP == keyCode) {
        // action bar
        mDrawerLayout.getChildAt(1).requestFocus();
      } else if (KeyEvent.KEYCODE_DPAD_DOWN == keyCode) {
        // grid view
        mDrawerLayout.getChildAt(0).requestFocus();
      } else if (KeyEvent.KEYCODE_DPAD_LEFT == keyCode) {
      } else if (KeyEvent.KEYCODE_MENU == keyCode) {
        if (!mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) {
          mDrawerLayout.openDrawer(Gravity.RIGHT);
        } else {
          mDrawerLayout.closeDrawer(Gravity.RIGHT);
        }
      }
    }

    return super.onKeyDown(keyCode, event);
  }
Пример #4
0
  private void initViews(Context context, int customLeftMenuId, int customRightMenuId) {
    LayoutInflater inflater =
        (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    inflater.inflate(R.layout.residemenu_custom, this);

    if (customLeftMenuId >= 0) {
      scrollViewLeftMenu = inflater.inflate(customLeftMenuId, this, false);
    } else {
      scrollViewLeftMenu =
          inflater.inflate(R.layout.residemenu_custom_left_scrollview, this, false);
      layoutLeftMenu = (LinearLayout) scrollViewLeftMenu.findViewById(R.id.layout_left_menu);
    }

    if (customRightMenuId >= 0) {
      scrollViewRightMenu = inflater.inflate(customRightMenuId, this, false);
    } else {
      scrollViewRightMenu =
          inflater.inflate(R.layout.residemenu_custom_right_scrollview, this, false);
      layoutRightMenu = (LinearLayout) scrollViewRightMenu.findViewById(R.id.layout_right_menu);
    }

    imageViewShadow = (ImageView) findViewById(R.id.iv_shadow);
    imageViewBackground = (ImageView) findViewById(R.id.iv_background);

    RelativeLayout menuHolder = (RelativeLayout) findViewById(R.id.sv_menu_holder);
    menuHolder.addView(scrollViewLeftMenu);
    menuHolder.addView(scrollViewRightMenu);
  }
Пример #5
0
    public View getView(int position, View convertView, ViewGroup parent) {
      final View view =
          (convertView != null)
              ? convertView
              : LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.bookmark_item, parent, false);
      final ImageView imageView = (ImageView) view.findViewById(R.id.bookmark_item_icon);
      final TextView textView = (TextView) view.findViewById(R.id.bookmark_item_text);
      final TextView bookTitleView = (TextView) view.findViewById(R.id.bookmark_item_booktitle);

      final Bookmark bookmark = getItem(position);
      if (bookmark == null) {
        imageView.setVisibility(View.VISIBLE);
        imageView.setImageResource(R.drawable.ic_list_plus);
        textView.setText(ZLResource.resource("bookmarksView").getResource("new").getValue());
        bookTitleView.setVisibility(View.GONE);
      } else {
        imageView.setVisibility(View.GONE);
        textView.setText(bookmark.getText());
        if (myCurrentBook) {
          bookTitleView.setVisibility(View.GONE);
        } else {
          bookTitleView.setVisibility(View.VISIBLE);
          bookTitleView.setText(bookmark.getBookTitle());
        }
      }
      return view;
    }
 public void bindView(View view, Context context, Cursor cursor)
 {
     Log.d("smali", "Lcom/samsung/sec/mtv/ui/channelguide/MtvUiFragReservationList$ReservationAdapter;->bindView(Landroid/view/View;Landroid/content/Context;Landroid/database/Cursor;)V");
     MtvReservation mtvreservation = MtvReservationManager.builder(cursor);
     view.setTag(mtvreservation);
     String s;
     String s1;
     if(DateFormat.is24HourFormat(Log.d(MtvUiFragReservationList.this).getApplicationContext()))
         s = (new SimpleDateFormat("M/d (EEE) H:mm")).format(new Date(mtvreservation.mTimeStart));
     else
         s = (new SimpleDateFormat("M/d (EEE) h:mm a")).format(new Date(mtvreservation.mTimeStart));
     if(mtvreservation.mTimeEnd > 0L)
     {
         if(DateFormat.is24HourFormat(Log.d(MtvUiFragReservationList.this).getApplicationContext()))
             s1 = (new StringBuilder()).append(s).append(" - ").append((new SimpleDateFormat("H:mm")).format(new Date(mtvreservation.mTimeEnd))).toString();
         else
             s1 = (new StringBuilder()).append(s).append(" - ").append((new SimpleDateFormat("h:mm a")).format(new Date(mtvreservation.mTimeEnd))).toString();
     } else
     {
         s1 = (new StringBuilder()).append(s).append(" -            ").toString();
     }
     ((ImageView)view.findViewById(0x7f0a0053)).setImageDrawable(mIcon[mtvreservation.mPgmType][selectStatusIconIndex(mtvreservation)]);
     ((TextView)view.findViewById(0x7f0a0113)).setText((new StringBuilder()).append(s1).append(" ").append("Ch ").append(mtvreservation.mPch).append(" ").toString());
     ((TextView)view.findViewById(0x7f0a0112)).setText(mtvreservation.mPgmName);
     view.findViewById(0x7f0a0048).setVisibility(8);
 }
Пример #7
0
  private void showUserHashDialog() {
    String userHash = NavigineApp.Settings.getString("user_hash", "");

    LayoutInflater inflater = getLayoutInflater();
    View view = inflater.inflate(R.layout.user_hash_dialog, null);
    _userEdit = (EditText) view.findViewById(R.id.user_hash_edit);
    _userEdit.setText(userHash);
    _userEdit.setTypeface(Typeface.MONOSPACE);
    // _userEdit.addTextChangedListener(new TextWatcher()
    //  {
    //    public void afterTextChanged(Editable s) { }
    //    public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
    //    public void onTextChanged(CharSequence s, int start, int before, int count)
    //    {
    //      String text = _userEdit.getText().toString();
    //      int length  = _userEdit.getText().length();
    //
    //      if (text.endsWith("-"))
    //        return;
    //
    //      if (count <= before)
    //        return;
    //
    //      if (length == 4 || length == 9 || length == 14)
    //      {
    //        _userEdit.setText((text + "-"));
    //        _userEdit.setSelection(length + 1);
    //      }
    //    }
    //  });

    AlertDialog.Builder alertBuilder = new AlertDialog.Builder(mContext);
    alertBuilder.setView(view);
    alertBuilder.setTitle("Enter user ID");
    alertBuilder.setNegativeButton(
        getString(R.string.cancel_button),
        new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dlg, int id) {}
        });

    alertBuilder.setPositiveButton(
        getString(R.string.ok_button),
        new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dlg, int id) {
            String userHash = _userEdit.getText().toString();
            SharedPreferences.Editor editor = NavigineApp.Settings.edit();
            editor.putString("user_hash", userHash);
            editor.commit();
            NavigineApp.applySettings();
            refreshMapList();
          }
        });

    AlertDialog dialog = alertBuilder.create();
    dialog.setCanceledOnTouchOutside(false);
    dialog.show();
  }
Пример #8
0
 public ViewHolder(View itemView) {
   super(itemView);
   cv = (CardView) itemView.findViewById(R.id.card_view);
   tittle = (TextView) itemView.findViewById(R.id.titletxt);
   description = (TextView) itemView.findViewById(R.id.descriptiontext);
   background = (RelativeLayout) itemView.findViewById(R.id.relativelayouthome);
   itemView.setOnClickListener(this);
 }
Пример #9
0
 /**
  * If the motion event was relative to the view which in ignored view list,return true;
  *
  * @param ev
  * @return
  */
 private boolean isInIgnoredView(MotionEvent ev) {
   Rect rect = new Rect();
   for (View v : ignoredViews) {
     v.getGlobalVisibleRect(rect);
     if (rect.contains((int) ev.getX(), (int) ev.getY())) return true;
   }
   return false;
 }
 @Override
 public void onFinishInflate() {
   super.onFinishInflate();
   View view = inflate(getContext(), R.layout.cover_anim_view, (ViewGroup) this);
   Arpan_ßløødy_CoverImages = new ImageView[2];
   Arpan_ßløødy_CoverImages[0] = (ImageView) view.findViewById(R.id.image0);
   Arpan_ßløødy_CoverImages[1] = (ImageView) view.findViewById(R.id.image1);
 }
Пример #11
0
 private void startAnim(View convertView) {
   convertView.setPivotX(0.0f);
   convertView.setPivotY(1.0f);
   PropertyValuesHolder x = PropertyValuesHolder.ofFloat("scaleX", 0.0f, 1.0f);
   PropertyValuesHolder y = PropertyValuesHolder.ofFloat("scaleY", 0.0f, 1.0f);
   ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(convertView, x, y);
   animator.setDuration(animTime);
   animator.start();
 }
 @Override
 public void onClick(View inButton) {
   boolean isErr = false;
   if (mTitle.getText().toString().length() == 0) {
     mTitle.setError("Required");
     mTitle.setEms(10);
     isErr = true;
   }
   if (mDesc.getText().toString().length() == 0) {
     mDesc.setActivated(true);
     mDesc.setError("Required");
     isErr = true;
   }
   if (inButton.getId() == openWeb.getId()) web.setVisibility(View.VISIBLE);
   else if (inButton.getId() == mAvail.getId())
     startActivity(new Intent(this, CheckActivity.class));
   else if (inButton.getId() == mBack.getId()) finish();
   else if (inButton.getId() == mSub.getId()) {
     AlertDialog.Builder al = new AlertDialog.Builder(this);
     if (isErr) return;
     else
       al.setTitle("Continue?")
           .setIcon(R.drawable.ornament)
           .setMessage("Your listing is going to be submitted to your chosen category.")
           .setPositiveButton(
               "OK",
               new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface d, int x) {
                   payment = new ArrayList<String>();
                   if (mCard.isChecked()) payment.add("Card");
                   if (mCheck.isChecked()) payment.add("Check");
                   if (mOnline.isChecked()) payment.add("Online");
                   if (mCash.isChecked()) payment.add("Cash");
                   //			Toast.makeText(getApplicationContext(), payment.toString(),
                   // Toast.LENGTH_LONG).show();
                   Intent intent = new Intent(getApplicationContext(), StartActivity.class);
                   intent.putExtra("Payment", payment);
                   intent.putExtra("Category", mChosenCategory);
                   intent.putExtra("Title", mTitle.getText().toString());
                   intent.putExtra("Price", mPrice.getText().toString());
                   intent.putExtra("Description", mDesc.getText().toString());
                   intent.putExtra("Location", mLocation.getText().toString());
                   intent.putExtra("Photo", jpegData);
                   startActivity(intent);
                 }
               })
           .setNegativeButton(
               "Cancel",
               new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface d, int x) {}
               })
           .show();
   } else
     startActivityForResult(
         new Intent(this, com.lightbox.android.camera.activities.Camera.class), REQ);
 }
 private void initPagerItems() {
   for (int i = 0; i < bitmapList.size(); i++) {
     View v = LayoutInflater.from(this).inflate(R.layout.call_activity_itempage, null);
     ImageView imageView = (ImageView) v.findViewById(R.id.contactIv);
     TextView textView = (TextView) v.findViewById(R.id.contactTv);
     imageView.setImageBitmap(bitmapList.get(i));
     textView.setText(nameList.get(i));
     viewArrayList.add(v);
   }
 }
 @Override
 private void start(View view, long l, float f, float f2, float f3, float f4, float f5, float f6) {
   view.setScaleX(f);
   view.setScaleY(f);
   view.setTranslationX(f3);
   view.setTranslationY(f4);
   ViewPropertyAnimator viewPropertyAnimator =
       view.animate().translationX(f5).translationY(f6).scaleX(f2).scaleY(f2).setDuration(l);
   viewPropertyAnimator.start();
 }
 @Override
 public void animate(View view) {
   f = pickScale();
   f2 = pickScale();
   f3 = pickTranslation(view.getWidth(), f);
   f4 = pickTranslation(view.getHeight(), f);
   f5 = pickTranslation(view.getWidth(), f2);
   f6 = pickTranslation(view.getHeight(), f2);
   start(view, Image_Animation_Duration, f, f2, f3, f4, f5, f6);
 }
Пример #16
0
 @Override
 public boolean onTouch(View view, MotionEvent event) {
   String str = null;
   int i = 0;
   str =
       "x="
           + event.getX(i) / view.getMeasuredWidth()
           + ",y="
           + event.getY(i) / view.getMeasuredHeight();
   textView.setText(str);
   return false;
 }
Пример #17
0
 public void setAccounts(int layoutResourceId, List<Account> accounts) {
   this.layoutResourceId = layoutResourceId;
   this.accounts = accounts;
   layoutInflater = LayoutInflater.from(getContext());
   for (int i = 0; i < accounts.size(); i++) {
     View view = getView(i, null, this);
     view.setVisibility(GONE);
     this.addView(view);
   }
   this.getChildAt(currentPosition).setVisibility(VISIBLE);
   this.gestureListener = new GestureListener();
   this.gesturedetector = new GestureDetector(getContext(), gestureListener);
 }
Пример #18
0
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      ViewHolder holder;
      if (convertView == null) {
        holder = new ViewHolder();
        convertView = LayoutInflater.from(getActivity()).inflate(R.layout.item_song, null);
        holder.mTvName = (TextView) convertView.findViewById(R.id.tv_name);
        holder.mTvArtist = (TextView) convertView.findViewById(R.id.tv_artist);
        holder.mTvDuration = (TextView) convertView.findViewById(R.id.tv_duration);
        holder.aboveView = convertView.findViewById(R.id.item_root);
        holder.behindView = convertView.findViewById(R.id.behind);
        convertView.setTag(holder);
        convertViewList.add((PullRightLayout) convertView);
      } else {
        holder = (ViewHolder) convertView.getTag();
      }
      if (HideApplication.showListAnim) {
        startAnim(convertView);
      }

      SongInfo info = SongManager.with(getActivity()).getSongByIndex(position);
      holder.mTvName.setText(info.getTitle());
      holder.mTvArtist.setText(info.getArtist() + " - " + info.getAlbum());
      holder.mTvDuration.setText(
          CommonUtils.durationToString(info.getDuration())
              + " - "
              + CommonUtils.getFileSize(info.getPath()));

      setItemSelected(holder, info.getId() == playingId);

      convertView.setOnClickListener(new OnItemClick(position));
      holder.behindView.setOnClickListener(new OnBehindClick(position));

      return convertView;
    }
Пример #19
0
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   FrameLayout mainView = null;
   mainView = new FrameLayout(this);
   setContentView(mainView);
   View view = null;
   view = new MyView(this);
   view.setLongClickable(true);
   view.setOnTouchListener(this);
   mainView.addView(view);
   textView = new TextView(this);
   mainView.addView(textView);
 }
Пример #20
0
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    if (weChatUtils.getIWXAPI().isWXAppInstalled()) {
      inflater.inflate(R.menu.main_wechat, menu);
    } else {
      inflater.inflate(R.menu.main, menu);
    }

    MenuItem shareItem = menu.findItem(R.id.action_share);
    android.support.v4.view.ActionProvider actionProvider =
        MenuItemCompat.getActionProvider(shareItem);
    if (null != actionProvider && actionProvider instanceof ShareActionProvider) {
      mShareActionProvider.setShareHistoryFileName(
          ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);
      // mShareActionProvider.setShareIntent(Utils.getShareRawIntent(this));

      mShareActionProvider.setOnShareTargetSelectedListener(
          new ShareActionProvider.OnShareTargetSelectedListener() {
            @Override
            public boolean onShareTargetSelected(
                ShareActionProvider shareActionProvider, Intent intent) {
              updateShareIntent();
              return false;
            }
          });
      updateShareIntent();

      for (int i = 0; i < menu.size(); i++) {
        MenuItem item = menu.getItem(i);
        if (item.getItemId() == R.id.action_share) {
          View itemChooser = MenuItemCompat.getActionView(item);
          if (itemChooser != null) {
            itemChooser.setOnClickListener(
                new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                    EFLogger.i(TAG, "onClick");
                    ScreenshotUtils.shotBitmap(MainActivity.this, shareFileName);
                  }
                });
          }
        }
      }
    }

    return super.onCreateOptionsMenu(menu);
  }
Пример #21
0
 public void mOnClick(View v) {
   switch (v.getId()) {
     case R.id.btn3:
       mItem.clear();
       for (int i = 1001; i <= 1003; i++) {
         mItem.add(Integer.toString(i));
       }
       mAdapter.notifyDataSetChanged();
       break;
     case R.id.btn10:
       mItem.clear();
       for (int i = 1001; i <= 1010; i++) {
         mItem.add(Integer.toString(i));
       }
       mAdapter.notifyDataSetChanged();
       break;
     case R.id.btnalways:
       mList.setOverScrollMode(View.OVER_SCROLL_ALWAYS);
       break;
     case R.id.btnnever:
       mList.setOverScrollMode(View.OVER_SCROLL_NEVER);
       break;
     case R.id.btnifscroll:
       mList.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);
       break;
   }
 }
 @OnItemClick(android.R.id.list)
 public void onItemClick(View view, int position) {
   if (actionMode != null) {
     if (selectedScreen != null
         && selectedScreen.getId().equals(adapter.getItem(position).getId())) {
       actionMode.finish();
       editScreen();
     }
     view.setSelected(true);
     selectedScreen = adapter.getItem(position);
     return;
   }
   view.setSelected(true);
   selectedScreen = adapter.getItem(position);
   actionMode = getActivity().startActionMode(selectedScreenCallback);
 }
Пример #23
0
    @Override
    public boolean onTouch(View v, MotionEvent event) {

      //            opened_position     =   mListView.getPositionForView((View) v.getParent());
      switch (event.getActionMasked()) {
        case MotionEvent.ACTION_DOWN:
          {
            if (moptionsDisplay) {
              switch (v.getId()) {
                case 111111:
                  if (SwipeType == Dismiss) {
                    moptionsDisplay = false;
                    performDismiss(mDownView_parent, temp_position);
                  } else
                    //                                      if(old_mDownView!=null &&
                    // mDownView!=old_mDownView){
                    //                                          ResetListItem(old_mDownView);
                    //                                          old_mDownView=null;
                    //                                          mDownView=null;
                    //                                      }
                    tcallbacks.HalfSwipeListView(temp_position);
                  return true;
                case 222222:
                  tcallbacks.FullSwipeListView(temp_position);
                  return true;
              }
            }
          }
          return false;
      }

      return false;
    }
Пример #24
0
  @Override
  public void onClick(View v) {
    int id = v.getId();

    switch (id) {
      case R.id.user_icon:
      case R.id.user_info:
        {
          showGameBoardFragment();

          break;
        }

      case R.id.button_sign_in:
        // start the sign-in flow
        beginUserInitiatedSignInImpl();
        break;

      case R.id.button_sign_out:
        // sign out.
        signOutImpl();
        showSignInBar();
        break;

      case R.id.share_textview:
        {
          showShare();
          break;
        }
    }
  }
Пример #25
0
 public boolean onTouchEvent(MotionEvent event) {
   super.onTouchEvent(event);
   if (event.getAction() == MotionEvent.ACTION_DOWN) {
     Toast.makeText(HandleEvent.this, "Touch Event Received", Toast.LENGTH_SHORT).show();
     return true;
   }
   return false;
 }
Пример #26
0
 public void restartGame(View v) {
   for (int i = 1; i <= 9; i++) {
     View mainView =
         findViewById(
             getResources()
                 .getIdentifier("mainView" + Integer.toString(i), "id", getPackageName()));
     if (sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) {
       mainView.setBackgroundDrawable(getResources().getDrawable(R.drawable.empty));
     } else {
       mainView.setBackground(getResources().getDrawable(R.drawable.empty));
     }
     player = 1;
     matriz = new int[3][3];
     tv.setText("Jogador 1");
     tv1.setText("");
     vencedor = false;
   }
 }
Пример #27
0
  public void showDetails(Equipment equipment) {
    equip = equipment;
    View view;
    if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
      view = getActivity().findViewById(R.id.detail_frag);
    } else {
      view = getActivity().findViewById(R.id.main_frame);
      Button button = (Button) view.findViewById(R.id.closeButton);
      button.setVisibility(View.VISIBLE);
    }

    TextView textIt_no = (TextView) view.findViewById(R.id.it_no2);
    TextView textType = (TextView) view.findViewById(R.id.type2);
    TextView textBrand = (TextView) view.findViewById(R.id.brand2);
    TextView textModel = (TextView) view.findViewById(R.id.model2);
    TextView textE_id = (TextView) view.findViewById(R.id.e_id);
    TextView textDescription = (TextView) view.findViewById(R.id.description);
    TextView textAquired = (TextView) view.findViewById(R.id.aquired);

    if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
      textIt_no.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
      textType.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
      textBrand.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
      textAquired.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
      textModel.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
      textDescription.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
      textE_id.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizeLandscape);
    } else {
      textIt_no.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
      textType.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
      textBrand.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
      textAquired.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
      textModel.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
      textDescription.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
      textE_id.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePortrait);
    }
    textIt_no.setText("Item nr: \t\t\t\t" + equipment.getIt_no());
    textType.setText("Type: \t\t\t\t\t" + equipment.getType());
    textBrand.setText("Brand: \t\t\t\t" + equipment.getBrand());
    textModel.setText("Model: \t\t\t\t" + equipment.getModel());
    textE_id.setText("Equipment ID: \t" + equipment.getE_id());
    textDescription.setText("Description: \t" + equipment.getDescription());
    textAquired.setText("Aquired: \t\t\t" + equipment.getAquired());

    downloadImageThread();

    ImageView image = (ImageView) view.findViewById(R.id.equipment_image);
    image.setImageBitmap(bitmap);
  }
Пример #28
0
 public void mOnClick(View v) {
   switch (v.getId()) {
     case R.id.btncopy:
       copyIntent();
       break;
     case R.id.btnpaste:
       pasteIntent();
       break;
   }
 }
Пример #29
0
 public void onClick(View v) {
   publishPopWindow.dismiss();
   switch (v.getId()) {
     case R.id.btn_sure:
       finish();
       break;
     default:
       break;
   }
 }
Пример #30
0
  protected View getView(int position, View convertView, ViewGroup parent) {
    AccountHolder holder;
    if (convertView == null) {
      convertView = layoutInflater.inflate(layoutResourceId, parent, false);
      holder = new AccountHolder();
      holder.accountRow1 = (TextView) convertView.findViewById(R.id.accountRow1);
      holder.accountRow1.setTypeface(GothamFont.BOLD);
      holder.accountRow2 = (TextView) convertView.findViewById(R.id.accountRow2);
      convertView.setTag(holder);

    } else holder = (AccountHolder) convertView.getTag();

    Account account = getItem(position);

    holder.accountRow2.setText(getAccountRow2(account));
    holder.accountRow1.setText(getAccountRow1(account));

    return convertView;
  }