Exemplo n.º 1
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   View view = inflater.inflate(R.layout.pc_main_layout, null);
   rCollection = (RelativeLayout) view.findViewById(R.id.r_pc_main_collection);
   rRead = (RelativeLayout) view.findViewById(R.id.r_pc_main_read);
   rTie = (RelativeLayout) view.findViewById(R.id.R_pc_main_tie);
   rGold = (RelativeLayout) view.findViewById(R.id.r_pc_main_gold);
   rCollection.setOnClickListener(this);
   rRead.setOnClickListener(this);
   rTie.setOnClickListener(this);
   rGold.setOnClickListener(this);
   ivUserHead = (ImageView) view.findViewById(R.id.iv_img_pc_head);
   ivUserHead.setOnClickListener(this);
   tvLogin = (TextView) view.findViewById(R.id.tv_user_login);
   tvLogin.setOnClickListener(this);
   tvUser = (TextView) view.findViewById(R.id.tv_user_login);
   initUser();
   selfinfo = (TextView) view.findViewById(R.id.tv_pc_selfinfo);
   selfinfo.setOnClickListener(this);
   rSetting = (RelativeLayout) view.findViewById(R.id.r_pc_main_setting);
   rSetting.setOnClickListener(this);
   return view;
 }
Exemplo n.º 2
0
  private void initBottom() {
    TextView headIv = (TextView) findViewById(R.id.phone_study_notice);
    TextView newIv = (TextView) findViewById(R.id.phone_study_new);
    TextView nominateIv = (TextView) findViewById(R.id.phone_study_nominate);
    TextView freeIv = (TextView) findViewById(R.id.phone_study_free);
    TextView kindIv = (TextView) findViewById(R.id.phone_study_kind);
    TextView selfIv = (TextView) findViewById(R.id.phone_study_self);
    TextView studyIv = (TextView) findViewById(R.id.phone_study_study);
    TextView sayIv = (TextView) findViewById(R.id.phone_study_say);
    TextView personcenterIv = (TextView) findViewById(R.id.phone_study_personcenter);

    personcenterIv.setOnClickListener(this);
    TextView aboutIv = (TextView) findViewById(R.id.phone_study_about);
    aboutIv.setOnClickListener(this);
    headIv.setOnClickListener(this);
    newIv.setOnClickListener(this);
    nominateIv.setOnClickListener(this);
    freeIv.setOnClickListener(this);
    kindIv.setOnClickListener(this);
    selfIv.setOnClickListener(this);
    studyIv.setOnClickListener(this);
    sayIv.setOnClickListener(this);

    findViewById(R.id.phone_study_nominate).setBackgroundResource(R.drawable.pad_bottom_tv_select);
    nominateIv.setTextColor(getResources().getColor(R.color.pad_bottomandtop_bg));
  }
    public ViewHolderChoice(View itemView) {
      super(itemView);
      textView1 = (TextView) itemView.findViewById(R.id.progress_setting);
      textView2 = (TextView) itemView.findViewById(R.id.download);
      textView1.setOnClickListener(
          new View.OnClickListener() {
            @Override
            public void onClick(View v) {
              Activity activity = ThemeUtils.getWrapperActivity(v.getContext());
              if (activity instanceof AppCompatActivity) {
                new ProgressStyleDialog()
                    .show(
                        ((AppCompatActivity) activity).getSupportFragmentManager(),
                        ProgressStyleDialog.TAG);
              }
            }
          });

      textView2.setOnClickListener(
          new View.OnClickListener() {
            @Override
            public void onClick(View v) {
              Activity activity = ThemeUtils.getWrapperActivity(v.getContext());
              if (activity instanceof AppCompatActivity) {
                new ProgressCheckDialog()
                    .show(
                        ((AppCompatActivity) activity).getSupportFragmentManager(),
                        ProgressCheckDialog.TAG);
              }
            }
          });
    }
Exemplo n.º 4
0
 @Override
 public void onBindListener() {
   btnPublishJob.setOnClickListener(this);
   tvStoreFilter.setOnClickListener(this);
   tvJobFilter.setOnClickListener(this);
   mAdapter.setEvent(this);
 }
Exemplo n.º 5
0
  protected void init() {
    // 存放头部导航的tv 文本控件
    tvList = new ArrayList<TextView>();
    // 存放头部导航中的 line控件
    rbList = new ArrayList<RadioButton>();
    TextView leftTV = (TextView) fa.findViewById(R.id.nearby_top_nav_left_tv);
    TextView middleTV = (TextView) fa.findViewById(R.id.nearby_top_nav_middle_tv);
    TextView rightTV = (TextView) fa.findViewById(R.id.nearby_top_nav_right_tv);
    RadioButton leftLine = (RadioButton) fa.findViewById(R.id.nearby_top_nav_left_line);
    RadioButton middleLine = (RadioButton) fa.findViewById(R.id.nearby_top_nav_middle_line);
    RadioButton rightLine = (RadioButton) fa.findViewById(R.id.nearby_top_nav_right_line);
    tvList.add(leftTV);
    tvList.add(middleTV);
    tvList.add(rightTV);
    rbList.add(leftLine);
    rbList.add(middleLine);
    rbList.add(rightLine);
    leftTV.setOnClickListener(this);
    middleTV.setOnClickListener(this);
    rightTV.setOnClickListener(this);
    leftTV.setText(R.string.team);
    middleTV.setText(R.string.player);
    rightTV.setText(R.string.park);

    // 初始进入的
    ((MainActivity) fa).changeNavText(tvList, 0);

    // 初始化球队,球友,球场三个面板
    ArrayList<Fragment> list = new ArrayList<Fragment>();
    list.add(new NearbyTeamFragment());
    list.add(new NearbyPlayerFragment());
    list.add(new NearbyParkFragment());
    NearbyFragmentAdapter adapter = new NearbyFragmentAdapter(fm, list);
    mvp.setAdapter(adapter);
  }
Exemplo n.º 6
0
  public void initViews(View view) {
    spn_city = (Spinner) view.findViewById(R.id.spn_city_filter_city_value);
    txtv_timeFrom = (TextView) view.findViewById(R.id.txtv_news_filter_time_from_value);
    txtv_timeTo = (TextView) view.findViewById(R.id.txtv_news_filter_time_to_value);

    txtv_news_filter_category_title =
        (TextView) view.findViewById(R.id.txtv_news_filter_category_title);
    txtv_event_filter_city_title = (TextView) view.findViewById(R.id.txtv_event_filter_city_title);
    txtv_event_filter_time_from_title =
        (TextView) view.findViewById(R.id.txtv_event_filter_time_from_title);
    txtv_event_filter_time_to_title =
        (TextView) view.findViewById(R.id.txtv_event_filter_time_to_title);

    btn_applyFilter = (Button) view.findViewById(R.id.btn_applyFilter);

    txtv_noData = (TextView) view.findViewById(R.id.txtv_noData);
    eventsCategoriesRecyclerView =
        (RecyclerView) view.findViewById(R.id.eventsCategoriesRecyclerView);
    eventsCategoriesRecyclerView.setLayoutManager(new LinearLayoutManager(context));
    categoriesList = EventsManager.getInstance().getEventsCategoryList(context);
    citiesList = EventsManager.getInstance().getEventsCityList(context);

    bindCategoriesRecycler();
    bindCitiesSpinner();

    txtv_timeFrom.setOnClickListener(this);
    txtv_timeTo.setOnClickListener(this);
  }
Exemplo n.º 7
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    sp = getSharedPreferences("Login_status", MODE_PRIVATE);
    sp2 = getSharedPreferences("login_user", MODE_PRIVATE);
    if (true) {
      Intent intent = new Intent(LoginActivity.this, MainActivity.class);
      startActivity(intent);
      this.finish();
    }
    bt_login = (Button) findViewById(R.id.info);
    tv_register = (TextView) findViewById(R.id.tv_register);
    tv_forget = (TextView) findViewById(R.id.tv_forget);
    et_username = (EditText) findViewById(R.id.et_username);
    et_password = (EditText) findViewById(R.id.et_password);
    mProgress = (ProgressBar) findViewById(R.id.progressBar_login);
    mProgress.setIndeterminate(true);
    webservice = new WebServiceUtils(SERVICE_NS, SERVICE_URL, this);
    bt_login.setOnClickListener(new LoginListener());
    tv_forget.setOnClickListener(new ForgotListener());
    tv_register.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
            startActivity(intent);
            LoginActivity.this.finish();
          }
        });
  }
  private void initbottomView() {
    bottom_view = (RelativeLayout) this.findViewById(R.id.bottom_view);
    tv_tip_right = (TextView) this.findViewById(R.id.tv_tip);
    tv_tip_right.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            ll_right_tip.setVisibility(View.VISIBLE);
            hideMenuView();
          }
        });
    bottom_view.setVisibility(View.GONE);

    /** 亮度 */
    tv_light = (TextView) this.findViewById(R.id.tv_light);
    tv_light.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            showDialogLightSeeting("调节系统亮度");
          }
        });

    /** 截图 */
    tv_pic = (TextView) this.findViewById(R.id.tv_pic);
    tv_pic.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            showDialogPicSelect();
          }
        });
  }
  private void init(Context context) {
    mContext = context;

    initResources();
    LayoutInflater.from(mContext).inflate(R.layout.wootric_survey_layout, this);

    initNpsViewElements();
    initFeedbackViewElements();

    mBtnSubmit = (TextView) mLayoutBody.findViewById(R.id.wootric_btn_submit);
    mBtnDismiss = (TextView) mLayoutBody.findViewById(R.id.wootric_btn_dismiss);
    mBtnSubmit.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            submitSurvey();
          }
        });
    mBtnDismiss.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            dismissSurvey();
          }
        });

    mTvSurveyHeader = (TextView) findViewById(R.id.wootric_survey_layout_tv_header);

    mCommonSurveyViews = new View[] {mLayoutBody, mTvSurveyHeader};

    mThankYouLayout = (ThankYouLayout) findViewById(R.id.wootric_thank_you_layout);
    mThankYouLayout.setThankYouLayoutListener(this);
  }
 @Override
 protected void registerViews() {
   loginButton.setOnClickListener(this);
   registerButton.setOnClickListener(this);
   passwordButton.setOnClickListener(this);
   showPassword.setOnClickListener(this);
 }
Exemplo n.º 11
0
  private void initAtUserView() {
    LinearLayout atLayout = (LinearLayout) findViewByResName("atLayout");
    for (Platform platform : platforms) {
      String platformName = platform.getName();
      if (isShowAtUserLayout(platformName)) {
        View view =
            LayoutInflater.from(activity)
                .inflate(getLayoutRes(activity, "skyblue_editpage_at_layout"), null);
        TextView atDescTextView =
            (TextView) view.findViewById(getIdRes(activity, "atDescTextView"));
        TextView atTextView = (TextView) view.findViewById(getIdRes(activity, "atTextView"));

        OnClickListener atBtnClickListener =
            new OnClickListener() {
              public void onClick(View v) {
                FollowListPage subPage = new FollowListPage();
                subPage.setPlatform((Platform) v.getTag());
                subPage.showForResult(activity, null, EditPage.this);
              }
            };
        atTextView.setTag(platform);
        atTextView.setOnClickListener(atBtnClickListener);
        atDescTextView.setTag(platform);
        atDescTextView.setOnClickListener(atBtnClickListener);

        atTextView.setText(getAtUserButtonText(platformName));
        atDescTextView.setText(
            getContext()
                .getString(getStringRes(activity, "list_friends"), getLogoName(platformName)));

        atLayout.addView(view);
      }
    }
  }
Exemplo n.º 12
0
  private void initViewAndAction() {
    btNext = (Button) findViewById(R.id.book_service_btNext);
    btPrevious = (Button) findViewById(R.id.book_service_btPrevious);
    btback = (Button) findViewById(R.id.book_service_btBack);
    btSend = (Button) findViewById(R.id.book_service_btSend);
    btRightRegoDate = (Button) findViewById(R.id.book_service_btRegoDateRight);
    btRightOtherWork = (Button) findViewById(R.id.book_service_btOtherWork);
    btAddNewVehicle = (Button) findViewById(R.id.book_service_btAddNewVehicle);

    tvDistance = (TextView) findViewById(R.id.book_service_tvKilometer);
    tvBookDate = (TextView) findViewById(R.id.book_service_tvBookDate);
    etName = (EditText) findViewById(R.id.book_service_edtName);
    edtRego = (EditText) findViewById(R.id.book_service_edtRego);
    edtMake = (EditText) findViewById(R.id.book_service_edtMake);
    edtModel = (EditText) findViewById(R.id.book_service_edtModel);
    edtPhone = (EditText) findViewById(R.id.book_service_edtYourPhone);
    edtAddress = (EditText) findViewById(R.id.book_service_edtYourAddress);
    edtRegoDate = (EditText) findViewById(R.id.book_service_edtRegoDate);
    tvOtherWork = (TextView) findViewById(R.id.book_service_tvOtherWork);

    tvDistance.setOnClickListener(this);
    tvBookDate.setOnClickListener(this);
    btback.setOnClickListener(this);
    btSend.setOnClickListener(this);
    btPrevious.setOnClickListener(this);
    btNext.setOnClickListener(this);
    btRightRegoDate.setOnClickListener(this);
    btRightOtherWork.setOnClickListener(this);
    btAddNewVehicle.setOnClickListener(this);
  }
Exemplo n.º 13
0
  private void init() {
    inflate(getContext(), R.layout.widget_timeline_listitem, this);
    mHead = (HeadIconImageView) findViewById(R.id.timeline_listitem_head);
    mName = (TextView) findViewById(R.id.timeline_listitem_name);
    mText = (TextView) findViewById(R.id.timeline_listitem_text);
    mText.setMovementMethod(LinkMovementMethod.getInstance());
    mTopic = (TextView) findViewById(R.id.timeline_listitem_topic);
    mTime = (TextView) findViewById(R.id.timeline_listitem_time);
    mGridView = (NoScrollGridView) findViewById(R.id.timeline_listitem_picgrid);
    mGridView.setSelector(getResources().getDrawable(R.drawable.list_selector_holo));
    mPic = (SelectorImageView) findViewById(R.id.timeline_listitem_pic);
    mLine = findViewById(R.id.timeline_listitem_line);
    mRepostName = (TextView) findViewById(R.id.timeline_listitem_repost_name);
    mRepostName.setMovementMethod(LinkMovementMethod.getInstance());
    mRepostText = (TextView) findViewById(R.id.timeline_listitem_repost_text);
    mRepostText.setMovementMethod(LinkMovementMethod.getInstance());
    mCommentCount = (TextView) findViewById(R.id.timeline_listitem_commentcount);
    mRepostCount = (TextView) findViewById(R.id.timeline_listitem_repostcount);

    mHead.setOnClickListener(this);
    mGridView.setOnItemClickListener(this);
    mPic.setOnClickListener(this);
    mCommentCount.setOnClickListener(this);
    mRepostCount.setOnClickListener(this);
  }
  @Override
  protected void initActionBar() {
    ActionBar actionBar = getSherlockActivity().getSupportActionBar();
    ActionBar.LayoutParams params =
        new ActionBar.LayoutParams(
            LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.CENTER);
    View view =
        LayoutInflater.from(getSherlockActivity())
            .inflate(R.layout.custom_actionbar_with_image_text, null);
    titleLeft = (TextView) view.findViewById(R.id.actionbar_title_left);
    titleRight = (TextView) view.findViewById(R.id.actionbar_title_right);
    titleLL = (LinearLayout) view.findViewById(R.id.actionbar_center);
    ImageButton leftButton = (ImageButton) view.findViewById(R.id.actionbar_left);
    ImageButton rightButton = (ImageButton) view.findViewById(R.id.actionbar_right);

    titleLeft.setText(getString(string.history_trend_recent));
    titleRight.setText(getString(string.history_trend_monthly_report));
    leftButton.setImageResource(drawable.public_ic_back);
    rightButton.setImageResource(drawable.detailsoftheresultsview_ic_share);

    titleLeft.setOnClickListener(this);
    titleRight.setOnClickListener(this);
    rightButton.setOnClickListener(this);
    leftButton.setOnClickListener(this);

    switchActionBar(isRecentState);

    actionBar.setCustomView(view, params);
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
    actionBar.setDisplayShowCustomEnabled(true);
  }
  private void updateViews() {
    fieldCapexNumber.setText(activity.capexHeader.getCapexNumber());
    fieldInvestmentType.setText(activity.capexHeader.getInvestmentTypeName());
    fieldAttachment.setText(activity.capexHeader.getAttachedCer());
    fieldStatus.setText(activity.capexHeader.getStatusName());
    fieldTotal.setText(activity.capexHeader.getTotal() + " USD");
    fieldRequesterName.setText(activity.capexHeader.getRequesterName());
    fieldOffice.setText(activity.capexHeader.getOfficeName());
    fieldDepartment.setText(activity.capexHeader.getDepartmentName());
    fieldCostCenter.setText(activity.capexHeader.getCostCenterName());
    fieldCountryManagaer.setText(activity.capexHeader.getCMName());
    fieldRegionalManager.setText(activity.capexHeader.getRMname());
    fieldDateSubmitted.setText(activity.capexHeader.getDateSubmitted(app));
    fieldDateProcessedbyCM.setText(activity.capexHeader.getDateProcessedByCM(app));
    fieldDateProcessedbyRM.setText(activity.capexHeader.getDateProcessedBYRM(app));

    if (!activity.capexHeader.getAttachedCer().equals(CapexHeader.NOATTACHMENT)) {
      fieldAttachment.setOnClickListener(CapexForApprovalDetailFragment.this);
      fieldAttachment.setTextColor(
          linearNavFragmentActivity.getResources().getColor(R.color.orange_velosi));
    }
    buttonApprove.setOnClickListener(CapexForApprovalDetailFragment.this);
    buttonReject.setOnClickListener(CapexForApprovalDetailFragment.this);
    buttonReturn.setOnClickListener(CapexForApprovalDetailFragment.this);
  }
Exemplo n.º 16
0
  private void initListener() {
    tv_false.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // 否
            tv_false.setBackgroundResource(R.drawable.leftcorner_green);
            tv_false.setTextColor(getResources().getColor(R.color.txt_white));
            tv_true.setBackgroundResource(R.drawable.rightcorner);
            tv_true.setTextColor(getResources().getColor(R.color.txt_green));
            //				ismessage = false;
            ismessage = "false";
          }
        });
    tv_true.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // 是
            tv_false.setBackgroundResource(R.drawable.leftcorner);
            tv_false.setTextColor(getResources().getColor(R.color.txt_green));
            tv_true.setBackgroundResource(R.drawable.rightcorner_green);
            tv_true.setTextColor(getResources().getColor(R.color.txt_white));
            //				ismessage = true;
            ismessage = "true";
          }
        });
  }
  private void initView() {
    backBtn = (Button) this.findViewById(R.id.backBtn);
    backBtn.setOnClickListener(this);

    itemDescriptionTextView = (TextView) this.findViewById(R.id.itemDescriptionTextView);
    itemDescriptionTextView.setSelected(true);
    itemDescriptionTextView.setOnClickListener(this);

    claimsTextView = (TextView) this.findViewById(R.id.claimsTextView);
    claimsTextView.setSelected(false);
    claimsTextView.setOnClickListener(this);

    contentLayout = (LinearLayout) this.findViewById(R.id.contentLayout);

    itemDescOfTransferView = new ItemDescOfTransferView(this);
    itemDescOfTransferView.setVisibility(View.VISIBLE);

    claimsview = new ClaimsView(this);
    claimsview.setVisibility(View.GONE);

    contentLayout.addView(
        itemDescOfTransferView,
        new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    contentLayout.addView(
        claimsview, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
  }
  @Override
  public Dialog onCreateDialog(Bundle bundle) {
    pref = getActivity().getSharedPreferences(Properties.PREF_MAIN_NAME, Context.MODE_PRIVATE);
    edit = pref.edit();
    utils = new CommonUtils();
    AlertDialog.Builder callBuilder = new AlertDialog.Builder(getActivity());
    LayoutInflater callInflater =
        (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    View view = callInflater.inflate(R.layout.call_dialog_layout, null);
    SeekBar mSeekBarOnLength = (SeekBar) view.findViewById(R.id.seekbar_on_length);
    mSeekBarOnLength.setOnSeekBarChangeListener(this);
    SeekBar mSeekBarOffLength = (SeekBar) view.findViewById(R.id.seekbar_off_length);
    mSeekBarOffLength.setOnSeekBarChangeListener(this);

    btnCancel = (TextView) view.findViewById(R.id.callCancel);
    btnCancel.setOnClickListener(this);
    btnOk = (TextView) view.findViewById(R.id.callOk);
    btnOk.setOnClickListener(this);
    btnTest = (TextView) view.findViewById(R.id.callTest);
    btnTest.setOnClickListener(this);

    onLength = (TextView) view.findViewById(R.id.on_length_ms);
    offLength = (TextView) view.findViewById(R.id.off_length_ms);
    mSeekBarOnLength.setProgress(pref.getInt(Properties.PREF_CALL_ON_LENGTH_VALUE, 500) - 500);
    mSeekBarOffLength.setProgress(pref.getInt(Properties.PREF_CALL_OFF_LENGTH_VALUE, 500) - 500);
    onLength.setText(pref.getInt(Properties.PREF_CALL_ON_LENGTH_VALUE, 500) + " ms");
    offLength.setText(pref.getInt(Properties.PREF_CALL_OFF_LENGTH_VALUE, 500) + " ms");
    callBuilder.setView(view);
    /*.setTitle(R.string.call_title)
    .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {

    	@Override
    	public void onClick(DialogInterface dialog, int which) {


    	}
    })
    .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

    	@Override
    	public void onClick(DialogInterface dialog, int which) {
    		edit.putInt(Properties.PREF_CALL_ON_LENGTH_VALUE, onProgress);
    		edit.putInt(Properties.PREF_CALL_OFF_LENGTH_VALUE, offProgress);
    		edit.commit();

    	}
    })
    .setNeutralButton(R.string.test_on, new DialogInterface.OnClickListener() {

    	@Override
    	public void onClick(DialogInterface dialog, int which) {


    	}
    });*/

    AlertDialog dialog = callBuilder.create();
    return dialog;
  }
Exemplo n.º 19
0
  private void initData() {
    mLoginView = (TextView) findViewById(R.id.login_btn);
    mCreateFolderView = (TextView) findViewById(R.id.create_folder_btn);

    mLoginView.setOnClickListener(this);
    mCreateFolderView.setOnClickListener(this);
  }
Exemplo n.º 20
0
  public void setjobDetail() {
    Cursor cursor =
        DatabaseView.query(
            "SELECT * FROM ServiceJob, Purchase, Product, Company WHERE jobNo ='"
                + selectedjobNo
                + "'"
                + " AND Purchase.prodNo = Product.prodNo AND Purchase.comNo = Company.comNo AND Purchase.serialNo = ServiceJob.serialNo");
    cursor.moveToFirst();
    String _jobProblem = cursor.getString(cursor.getColumnIndex("jobProblem"));
    String _jobSerialNo = cursor.getString(cursor.getColumnIndex("serialNo"));
    String _jobRequestDate = cursor.getString(cursor.getColumnIndex("requestDate"));
    String _jobVisitDate = cursor.getString(cursor.getColumnIndex("visitDate"));
    String _jobStartTime = cursor.getString(cursor.getColumnIndex("jobStartTime"));
    String _jobEndTime = cursor.getString(cursor.getColumnIndex("jobEndTime"));
    String _jobRemark = cursor.getString(cursor.getColumnIndex("remark"));
    companyID = cursor.getString(cursor.getColumnIndex("comNo"));
    prodctID = cursor.getString(cursor.getColumnIndex("prodNo"));

    jobNo.setText(selectedjobNo);
    jobProblem.setText(_jobProblem);
    jobSerialNo.setText(_jobSerialNo);
    jobRequestDate.setText(_jobRequestDate);
    jobVisitDate.setText(_jobVisitDate);
    jobStartTime.setText(_jobStartTime);
    jobEndTime.setText(_jobEndTime);
    jobRemark.setText(_jobRemark);
    jobCompany.setText(cursor.getString(cursor.getColumnIndex("comName")));
    jobCompany.setOnClickListener(this);
    productName.setText(cursor.getString(cursor.getColumnIndex("prodName")));
    productName.setOnClickListener(this);
    for (int i = 0; i < jobStatusItem.length; i++)
      if (jobStatusItem[i].equalsIgnoreCase(cursor.getString(cursor.getColumnIndex("jobStatus"))))
        jobStatus.setSelection(i);
  }
Exemplo n.º 21
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            Toast.makeText(MainActivity.this, "Fab Clicked!", Toast.LENGTH_LONG).show();
          }
        });

    switchAnimation.setOnClickListener(this);
    reset.setOnClickListener(this);
    resetAndPlay.setOnClickListener(this);
    changePosAndPlay.setOnClickListener(this);
    new Handler(Looper.getMainLooper())
        .postDelayed(
            new Runnable() {
              @Override
              public void run() {
                showIntro(fab, INTRO_CARD);
              }
            },
            2400);
  }
  protected void initEventHandle() {
    mLikeCountTextView.setOnClickListener(
        new LoginOnViewClickListener() {
          @Override
          protected void doAfterLogin(View v) {
            clickAnima(mLikeCountTextView);
            mLikePresenter.setFeedItem(mFeedItem);
            if (mFeedItem.isLiked) {
              mLikePresenter.postUnlike(mFeedItem.id);
            } else {
              mLikePresenter.postLike(mFeedItem.id);
            }
          }
        });

    // 转发按钮
    mForwardCountTextView.setOnClickListener(
        new LoginOnViewClickListener() {

          @Override
          protected void doAfterLogin(View v) {
            clickAnima(mForwardCountTextView);
            mPresenter.gotoForwardActivity(mFeedItem);
          }
        });

    mLocationImgView.setOnClickListener(mLocationClickListener);
    mLocationTv.setOnClickListener(mLocationClickListener);
  }
Exemplo n.º 23
0
  public void openDialog() {
    final Dialog dialog = new Dialog(CreateChannelActivity.this);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.custom_dialog_for_upload_photo);

    TextView gallery, camera;

    gallery = (TextView) dialog.findViewById(R.id.gallery);
    camera = (TextView) dialog.findViewById(R.id.camera);

    gallery.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            chooseImage();
          }
        });
    camera.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            takePicture();
          }
        });

    dialog.show();
  }
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    this.game = new Game(new Team(teamAName), new Team(teamBName), MAX_TOSSUPS);

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Button back = (Button) findViewById(R.id.backbutton);
    back.setOnClickListener(prevButtonClicked);
    Button forward = (Button) findViewById(R.id.forwardbutton);
    forward.setOnClickListener(nextButtonClicked);

    RadioGroup lhs = (RadioGroup) findViewById(R.id.teamaradiogroup);
    lhs.setOnCheckedChangeListener(teamPointsSelected);
    RadioGroup rhs = (RadioGroup) findViewById(R.id.teambradiogroup);
    rhs.setOnCheckedChangeListener(teamPointsSelected);

    CheckBox bbox1 = (CheckBox) findViewById(R.id.bonuscheck1);
    CheckBox bbox2 = (CheckBox) findViewById(R.id.bonuscheck2);
    CheckBox bbox3 = (CheckBox) findViewById(R.id.bonuscheck3);
    bbox1.setOnCheckedChangeListener(bonusBoxChecked);
    bbox2.setOnCheckedChangeListener(bonusBoxChecked);
    bbox3.setOnCheckedChangeListener(bonusBoxChecked);

    Spinner spinnerA = (Spinner) findViewById(R.id.teamaplayerspinner);
    spinnerA.setOnItemSelectedListener(playerSpinnerSelected);
    Spinner spinnerB = (Spinner) findViewById(R.id.teambplayerspinner);
    spinnerB.setOnItemSelectedListener(playerSpinnerSelected);
    this.updatePlayerSpinner();

    TextView teamAName = (TextView) findViewById(R.id.teama);
    TextView teamBName = (TextView) findViewById(R.id.teamb);
    teamAName.setOnClickListener(teamANameClicked);
    teamBName.setOnClickListener(teamBNameClicked);
  }
Exemplo n.º 25
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_payout);

    imgBack = (TextView) findViewById(R.id.imgBack);
    imgBack.setText("Payout");

    imgBack.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });

    txtTotalPaidAmount = (TextView) findViewById(R.id.txtTotalPaidAmount);
    linearPaymentDetails = (LinearLayout) findViewById(R.id.linearPaymentDetails);

    txtTotalPaidAmount.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            isPaymentDetailsShown = !isPaymentDetailsShown;
            if (!isPaymentDetailsShown) {
              linearPaymentDetails.setVisibility(View.GONE);
            } else {
              linearPaymentDetails.setVisibility(View.VISIBLE);
            }
          }
        });
  }
Exemplo n.º 26
0
  @Override
  public void onClearSelected() {

    closeMenu();

    LayoutInflater inf = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View v = inf.inflate(R.layout.popclear_layout, null, false);

    final PopupWindow pw = new PopupWindow(v);
    pw.setWidth(RelativeLayout.LayoutParams.WRAP_CONTENT);
    pw.setHeight(RelativeLayout.LayoutParams.WRAP_CONTENT);

    TextView yesTxt = (TextView) v.findViewById(R.id.dlgYes);
    TextView noTxt = (TextView) v.findViewById(R.id.dlgNo);
    noTxt.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {
            pw.dismiss();
          }
        });

    yesTxt.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {
            pw.dismiss();
            pinTableFrag.clearBoard();
          }
        });

    pw.showAtLocation(v, Gravity.CENTER, 0, 0);
  }
Exemplo n.º 27
0
  private void initViews() {
    LoadingDialog = new LoadingDialog(this);
    bitmapUtils = new BitmapUtils(this);
    mViewPager = (ViewPager) findViewById(R.id.product_details_viewpager);
    txtName = (TextView) findViewById(R.id.product_details_name);
    txtDesc = (TextView) findViewById(R.id.product_details_desc);
    txtPrice = (TextView) findViewById(R.id.product_details_price);
    txtPriceMarket = (TextView) findViewById(R.id.product_details_price_market);
    txtSalesAmount = (TextView) findViewById(R.id.product_details_sales_amount);
    txtAddCart = (TextView) findViewById(R.id.product_details_addcart);
    txtBuyNow = (TextView) findViewById(R.id.product_details_buy_now);

    llytServiceList = (LinearLayout) findViewById(R.id.product_detail_service_container);
    llytPromotionList = (LinearLayout) findViewById(R.id.product_detail_promotion_container);
    llytPagerPoiner = (LinearLayout) findViewById(R.id.product_details_viewpager_poiner);
    llytCustomer = (LinearLayout) findViewById(R.id.product_details_customer_service);
    llytFavourite = (LinearLayout) findViewById(R.id.product_details_favourite);

    mWebView = (WebView) findViewById(R.id.product_detail_webview);
    txtAddCart.setOnClickListener(this);
    txtBuyNow.setOnClickListener(this);
    llytCustomer.setOnClickListener(this);
    llytFavourite.setOnClickListener(this);
    findViewById(R.id.layout_product_comment_more).setOnClickListener(this);
    initWebViewSetting(mWebView);
    initActivityTitle();
    // postMessage();
    getDateList(0);
  }
Exemplo n.º 28
0
  public void initview() {

    /** ********land************ */
    String test_value = "true";
    if (login_data.equals(test_value)) {
      quit_text = (TextView) view.findViewById(R.id.set_main_land);
      quit_text.setText("退出登录");
      quit_text.setOnClickListener(
          new OnClickListener() {

            @Override
            public void onClick(View v) {
              // TODO Auto-generated method stub
              editor.putString("success", "false");
              editor.putString("name", "");
              editor.commit();
              Toast toast = Toast.makeText(getActivity(), "退出成功", Toast.LENGTH_SHORT);
              toast.show();
              quit_text = (TextView) view.findViewById(R.id.set_main_land);
              quit_text.setText("立即登录");
              quit_text.setOnClickListener(SettingFragment.this);
            }
          });
    } else {

      Toast toast1 = Toast.makeText(getActivity(), "登陆状态:" + login_data, Toast.LENGTH_SHORT);
      toast1.show();

      land_text = (TextView) view.findViewById(R.id.set_main_land);
      land_text.setText("立即登录");
      land_text.setOnClickListener(this);
    }
  }
Exemplo n.º 29
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.info_layout);

    TextView devEmail, devName;

    devEmail = (TextView) findViewById(R.id.devEmail);
    devName = (TextView) findViewById(R.id.devName);

    OnClickListener listener =
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent intent = new Intent(Intent.ACTION_SEND);
            intent.setType("text/html");
            intent.putExtra(Intent.EXTRA_EMAIL, "*****@*****.**");
            intent.putExtra(Intent.EXTRA_SUBJECT, "PAA-SP");

            startActivity(
                Intent.createChooser(intent, getResources().getString(R.string.send_email)));
          }
        };

    devEmail.setOnClickListener(listener);
    devName.setOnClickListener(listener);
  }
  private void initView(View view) {
    // TODO Auto-generated method stub
    tv_count = (TextView) chatView.findViewById(R.id.tv_count);
    dialog = (ProgressBar) chatView.findViewById(R.id.progressBar);
    btn_quguangguang = (Button) chatView.findViewById(R.id.btn_quguangguang);
    btn_quguangguang.setOnClickListener(this);
    tv_guansui = (TextView) chatView.findViewById(R.id.tv_guansui);
    tv_express = (TextView) chatView.findViewById(R.id.tv_express);
    tv_weight = (TextView) chatView.findViewById(R.id.tv_weight);
    ll_other = (LinearLayout) chatView.findViewById(R.id.ll_other);
    ll_cart_bottom = (LinearLayout) chatView.findViewById(R.id.ll_cart_bottom);
    all_choice_layout = (LinearLayout) chatView.findViewById(R.id.all_choice_layout);
    tv_title_right = (TextView) chatView.findViewById(R.id.tv_title_right);
    rl_cart = (RelativeLayout) chatView.findViewById(R.id.rl_cart);
    tv_title_right.setOnClickListener(this);
    ivBack = (ImageView) chatView.findViewById(R.id.iv_back);
    ivBack.setOnClickListener(this);
    // tv_goShop = (TextView) this.findViewById(R.id.tv_goShop);
    tv_cart_Allprice = (TextView) chatView.findViewById(R.id.tv_cart_Allprice);
    tv_cart_buy_Ordel = (TextView) chatView.findViewById(R.id.tv_cart_buy_or_del);
    tv_cart_buy_Ordel.setText(str_del);
    cb_cart_all = (CheckBox) chatView.findViewById(R.id.cb_cart_all);
    ll_cart = (LinearLayout) chatView.findViewById(R.id.ll_cart);
    listView_cart = (ListView) chatView.findViewById(R.id.listView_cart);

    tv_cart_buy_Ordel.setOnClickListener(ShoppingCartFragment.this);
  }