android.view.View.OnClickListener Java Examples

The following examples show how to use android.view.View.OnClickListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: ans-android-sdk   Author: analysys   File: LoginActivityA.java    License: GNU General Public License v3.0 6 votes vote down vote up
private boolean mayRequestContacts() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
        return true;
    }
    if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
        return true;
    }
    if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
        Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
                .setAction(android.R.string.ok, new View.OnClickListener() {
                    @Override
                    @TargetApi(Build.VERSION_CODES.M)
                    public void onClick(View v) {
                        requestPermissions(new String[]{READ_CONTACTS},
                                REQUEST_READ_CONTACTS);
                    }
                });
    } else {
        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
    }
    return false;
}
 
Example #2
Source Project: ans-android-sdk   Author: analysys   File: LoginActivityB.java    License: GNU General Public License v3.0 6 votes vote down vote up
private boolean mayRequestContacts() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
        return true;
    }
    if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
        return true;
    }
    if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
        Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
                .setAction(android.R.string.ok, new OnClickListener() {
                    @Override
                    @TargetApi(Build.VERSION_CODES.M)
                    public void onClick(View v) {
                        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
                    }
                });
    } else {
        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
    }
    return false;
}
 
Example #3
Source Project: Camera2   Author: Yuloran   File: FilmstripBottomPanel.java    License: Apache License 2.0 6 votes vote down vote up
private void setupEditButton()
{
    mEditButton = (ImageButton) mLayout.findViewById(R.id.filmstrip_bottom_control_edit);
    mEditButton.setOnClickListener(new View.OnClickListener()
    {
        @Override
        public void onClick(View view)
        {
            if (mTinyPlanetEnabled)
            {
                mController.openContextMenu(mEditButton);
            } else if (mListener != null)
            {
                mListener.onEdit();
            }
        }
    });
    mController.registerForContextMenu(mEditButton);
    mEditButton.setLongClickable(false);
}
 
Example #4
Source Project: Watch-Me-Build-a-Finance-Startup   Author: llSourcell   File: LoginActivity.java    License: MIT License 6 votes vote down vote up
private boolean mayRequestContacts() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
        return true;
    }
    if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
        return true;
    }
    if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
        Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
                .setAction(android.R.string.ok, new View.OnClickListener() {
                    @Override
                    @TargetApi(Build.VERSION_CODES.M)
                    public void onClick(View v) {
                        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
                    }
                });
    } else {
        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
    }
    return false;
}
 
Example #5
Source Project: FimiX8-RE   Author: wladimir-computin   File: LocalFragmentPresenter.java    License: MIT License 6 votes vote down vote up
private void doPanelTrans(final PanelRecycleViewHolder holder, final int position) {
    final MediaModel mediaModel = getModel(position);
    if (mediaModel != null) {
        holder.tvTitleDescription.setText(getModel(position).getFormatDate());
        if (mediaModel.isSelect()) {
            holder.ivIconSelect.setImageResource(R.drawable.album_btn_category_select_press);
            holder.tvAllSelect.setText(R.string.media_select_all_no);
        } else {
            holder.ivIconSelect.setImageResource(R.drawable.album_btn_category_select_normal);
            holder.tvAllSelect.setText(R.string.media_select_all);
        }
    }
    holder.rlRightSelect.setOnClickListener(new OnClickListener() {
        public void onClick(View view) {
            LocalFragmentPresenter.this.onItemCategoryClick(holder, position, mediaModel);
        }
    });
}
 
Example #6
Source Project: FimiX8-RE   Author: wladimir-computin   File: X9CameraPrensenter.java    License: MIT License 6 votes vote down vote up
private void doPanelTrans(final PanelRecycleViewHolder holder, final int position) {
    final MediaModel mediaModel = getModel(position);
    if (mediaModel != null) {
        holder.tvTitleDescription.setText(getModel(position).getFormatDate());
        if (mediaModel.isSelect()) {
            holder.ivIconSelect.setImageResource(R.drawable.album_btn_category_select_press);
            holder.tvAllSelect.setText(R.string.media_select_all_no);
        } else {
            holder.ivIconSelect.setImageResource(R.drawable.album_btn_category_select_normal);
            holder.tvAllSelect.setText(R.string.media_select_all);
        }
    }
    holder.rlRightSelect.setOnClickListener(new OnClickListener() {
        public void onClick(View view) {
            X9CameraPrensenter.this.onItemCategoryClick(holder, position, mediaModel);
        }
    });
}
 
Example #7
Source Project: homeassist   Author: axzae   File: ConnectActivity.java    License: Apache License 2.0 6 votes vote down vote up
private void showError(String message) {
    Drawable warningIcon = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_warning_white_18dp, null);
    SpannableStringBuilder builder = new SpannableStringBuilder();
    builder.append(message);
    mSnackbar = Snackbar.make(findViewById(android.R.id.content), builder, Snackbar.LENGTH_LONG)
            .setAction(getString(R.string.action_retry), new OnClickListener() {
                @Override
                public void onClick(View view) {
                    attemptLogin();
                }
            });
    TextView textView = mSnackbar.getView().findViewById(android.support.design.R.id.snackbar_text);
    textView.setCompoundDrawablesWithIntrinsicBounds(warningIcon, null, null, null);
    textView.setCompoundDrawablePadding(getResources().getDimensionPixelOffset(R.dimen.icon_8dp));
    mSnackbar.getView().setBackgroundColor(ResourcesCompat.getColor(getResources(), R.color.md_red_A200, null));
    mSnackbar.show();
}
 
Example #8
Source Project: FimiX8-RE   Author: wladimir-computin   File: X8AiLinePointValueAdapter.java    License: MIT License 6 votes vote down vote up
public void setSigleListener(X8AiPointValueViewHolder holder) {
    if (this.listener != null) {
        holder.root.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                boolean isSelect = true;
                int pos = ((Integer) v.getTag()).intValue();
                if (pos == X8AiLinePointValueAdapter.this.selectIndex) {
                    isSelect = false;
                }
                X8AiLinePointValueAdapter.this.listener.onItemClicked(pos, X8AiLinePointValueAdapter.this.selectIndex, isSelect);
                if (isSelect) {
                    X8AiLinePointValueAdapter.this.selectIndex = pos;
                } else {
                    X8AiLinePointValueAdapter.this.selectIndex = -1;
                }
            }
        });
    }
}
 
Example #9
Source Project: FoodOrdering   Author: yangxch   File: BottomMenu.java    License: Apache License 2.0 6 votes vote down vote up
public BottomMenu(Activity context,OnClickListener clickListener) {
    LayoutInflater inflater = LayoutInflater.from(context);
    this.clickListener=clickListener;
    mContext=context;
    mMenuView = inflater.inflate(R.layout.layout_popwindow, null);
    btn_wxLogin = (Button) mMenuView.findViewById(R.id.btn_wxLogin);
    btn_msgCheckLogin = (Button) mMenuView.findViewById(R.id.btn_msgCheckLogin);
    btnCancel = (Button) mMenuView.findViewById(R.id.btn_cancel);
    btnCancel.setOnClickListener(this);
    btn_wxLogin.setOnClickListener(this);
    btn_msgCheckLogin.setOnClickListener(this);
    popupWindow=new PopupWindow(mMenuView,LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT,true);
    popupWindow.setAnimationStyle(R.style.popwin_anim_style);
    ColorDrawable dw = new ColorDrawable(context.getResources().getColor(R.color.white));
    popupWindow.setBackgroundDrawable(dw);
    mMenuView.setOnTouchListener(this);
}
 
Example #10
Source Project: FimiX8-RE   Author: wladimir-computin   File: X8LocalFragmentPresenter.java    License: MIT License 6 votes vote down vote up
private void doPanelTrans(final PanelRecycleViewHolder holder, final int position) {
    final MediaModel mediaModel = getModel(position);
    if (mediaModel != null) {
        holder.tvTitleDescription.setText(getModel(position).getFormatDate().split(" ")[0]);
        if (mediaModel.isSelect()) {
            holder.mBtnAllSelect.setImageResource(R.drawable.x8_ablum_select);
        } else {
            holder.mBtnAllSelect.setImageResource(R.drawable.x8_ablum_unselect);
            holder.mBtnAllSelect.setSelected(false);
        }
    }
    holder.mBtnAllSelect.setOnClickListener(new OnClickListener() {
        public void onClick(View view) {
            X8LocalFragmentPresenter.this.onItemCategoryClick(holder, position, mediaModel);
        }
    });
    if (this.isEnterSelectMode) {
        holder.mBtnAllSelect.setVisibility(0);
    } else {
        holder.mBtnAllSelect.setVisibility(8);
    }
}
 
Example #11
Source Project: FimiX8-RE   Author: wladimir-computin   File: X8CameraFragmentPrensenter.java    License: MIT License 6 votes vote down vote up
private void doPanelTrans(final PanelRecycleViewHolder holder, final int position) {
    final MediaModel mediaModel = getModel(position);
    if (mediaModel != null) {
        holder.tvTitleDescription.setText(getModel(position).getFormatDate());
        if (mediaModel.isSelect()) {
            holder.mBtnAllSelect.setImageResource(R.drawable.x8_ablum_select);
        } else {
            holder.mBtnAllSelect.setImageResource(R.drawable.x8_ablum_unselect);
        }
    }
    holder.mBtnAllSelect.setOnClickListener(new OnClickListener() {
        public void onClick(View view) {
            X8CameraFragmentPrensenter.this.onItemCategoryClick(holder, position, mediaModel);
        }
    });
    if (this.isEnterSelectMode) {
        holder.mBtnAllSelect.setVisibility(0);
    } else {
        holder.mBtnAllSelect.setVisibility(8);
    }
}
 
Example #12
Source Project: sample-videoRTC   Author: androidthings   File: CallActivity.java    License: Apache License 2.0 6 votes vote down vote up
private void disconnectWithErrorMessage(final String errorMessage) {
    if (!activityRunning) {
        Log.e(TAG, "Critical error: " + errorMessage);
        disconnect();
    } else {
        new AlertDialog.Builder(this)
                .setTitle(getText(R.string.channel_error_title))
                .setMessage(errorMessage)
                .setCancelable(false)
                .setNeutralButton(R.string.ok,
                        new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int id) {
                                dialog.cancel();
                                disconnect();
                            }
                        })
                .create()
                .show();
    }
}
 
Example #13
Source Project: FimiX8-RE   Author: wladimir-computin   File: SwitchButton.java    License: MIT License 6 votes vote down vote up
public void setup(AttributeSet attrs) {
    this.paint = new Paint(1);
    this.paint.setStyle(Style.STROKE);
    this.paint.setStrokeCap(Cap.ROUND);
    this.springSystem = SpringSystem.create();
    this.spring = this.springSystem.createSpring();
    this.spring.setSpringConfig(SpringConfig.fromOrigamiTensionAndFriction(50.0d, 7.0d));
    setOnClickListener(new OnClickListener() {
        public void onClick(View arg0) {
            SwitchButton.this.onViewSwitch();
        }
    });
    TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.SwitchButton);
    this.onSpotColor = typedArray.getColor(R.styleable.SwitchButton_onColor, this.onSpotColor);
    this.offSpotColor = typedArray.getColor(R.styleable.SwitchButton_spotColor, this.offSpotColor);
    this.toggleOn = typedArray.getBoolean(R.styleable.SwitchButton_onToggle, this.toggleOn);
    this.spotColor = this.offSpotColor;
    this.borderWidth = typedArray.getDimensionPixelSize(R.styleable.SwitchButton_borderWidth, (int) AbViewUtil.dip2px(getContext(), (float) this.borderWidth));
    this.defaultAnimate = typedArray.getBoolean(R.styleable.SwitchButton_animate, this.defaultAnimate);
    typedArray.recycle();
}
 
Example #14
Source Project: wear-os-samples   Author: android   File: AccessibilityActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_accessibility);

    AmbientMode.attachAmbientSupport(this);

    ImageView accessibilityImage = findViewById(R.id.icon_image_view);
    accessibilityImage.setImageDrawable(getDrawable(R.drawable.settings_circle));

    TextView accessibilityText = findViewById(R.id.icon_text_view);
    accessibilityText.setText(R.string.accessibility_settings);

    findViewById(R.id.accessibility_button_include)
            .setOnClickListener(
                    new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            startActivityForResult(
                                    new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS), 0);
                        }
                    });
}
 
Example #15
Source Project: Build-an-AI-Startup-with-PyTorch   Author: llSourcell   File: LoginActivity.java    License: MIT License 6 votes vote down vote up
private boolean mayRequestContacts() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
        return true;
    }
    if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
        return true;
    }
    if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
        Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
                .setAction(android.R.string.ok, new View.OnClickListener() {
                    @Override
                    @TargetApi(Build.VERSION_CODES.M)
                    public void onClick(View v) {
                        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
                    }
                });
    } else {
        requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
    }
    return false;
}
 
Example #16
Source Project: android_9.0.0_r45   Author: lulululbj   File: TextClassification.java    License: Apache License 2.0 6 votes vote down vote up
private TextClassification(
        @Nullable String text,
        @Nullable Drawable legacyIcon,
        @Nullable String legacyLabel,
        @Nullable Intent legacyIntent,
        @Nullable OnClickListener legacyOnClickListener,
        @NonNull List<RemoteAction> actions,
        @NonNull Map<String, Float> entityConfidence,
        @Nullable String id) {
    mText = text;
    mLegacyIcon = legacyIcon;
    mLegacyLabel = legacyLabel;
    mLegacyIntent = legacyIntent;
    mLegacyOnClickListener = legacyOnClickListener;
    mActions = Collections.unmodifiableList(actions);
    mEntityConfidence = new EntityConfidence(entityConfidence);
    mId = id;
}
 
Example #17
Source Project: styT   Author: stytooldex   File: Viewhtml.java    License: Apache License 2.0 6 votes vote down vote up
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        selectVideo = (TextView) findViewById(R.id.select_video);
        selectVideo.setOnClickListener(clickListener);
        tip = (TextView) findViewById(R.id.tip);
        toolbar = (android.support.v7.widget.Toolbar)
                findViewById(R.id.toolbar);
//		初始化Toolbar控件
        setSupportActionBar(toolbar);
        toolbar.setTitle("视频转换Gif");
//		设置标题
//		设置副标题
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
//		设置导航图标
        toolbar.setNavigationOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View p1) {
                finish();
            }
        });
//		用Toolbar取代ActionBar

    }
 
Example #18
Source Project: zom-android-matrix   Author: zom   File: OnboardingActivity.java    License: Apache License 2.0 6 votes vote down vote up
public void showUpgradeMessage () {

        if (TextUtils.isEmpty(Preferences.getValue("showUpgradeMessage"))) {

            android.support.v7.app.AlertDialog alertDialog = new android.support.v7.app.AlertDialog.Builder(this).create();
            alertDialog.setTitle(R.string.welcome_message);
            alertDialog.setMessage(this.getString(R.string.upgrade_message));
            alertDialog.setButton(android.support.v7.app.AlertDialog.BUTTON_NEUTRAL, this.getString(R.string.ok),
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.dismiss();
                        }
                    });
            alertDialog.show();

            PreferenceManager.getDefaultSharedPreferences(this).edit().putString("showUpgradeMessage","false").commit();

        }


    }
 
Example #19
Source Project: TraceByAmap   Author: ShihooWang   File: PoiKeywordSearchActivity.java    License: MIT License 6 votes vote down vote up
@Override
public View getInfoWindow(final Marker marker) {
	View view = getLayoutInflater().inflate(R.layout.poikeywordsearch_uri,
			null);
	TextView title = (TextView) view.findViewById(R.id.title);
	title.setText(marker.getTitle());

	TextView snippet = (TextView) view.findViewById(R.id.snippet);
	snippet.setText(marker.getSnippet());
	ImageButton button = (ImageButton) view
			.findViewById(R.id.start_amap_app);
	// 调起高德地图app
	button.setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			startAMapNavi(marker);
		}
	});
	return view;
}
 
Example #20
Source Project: TraceByAmap   Author: ShihooWang   File: PoiAroundSearchActivity.java    License: MIT License 6 votes vote down vote up
private void setup() {
		mPoiDetail = (RelativeLayout) findViewById(R.id.poi_detail);
		mPoiDetail.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
//				Intent intent = new Intent(PoiSearchActivity.this,
//						SearchDetailActivity.class);
//				intent.putExtra("poiitem", mPoi);
//				startActivity(intent);
				
			}
		});
		mPoiName = (TextView) findViewById(R.id.poi_name);
		mPoiAddress = (TextView) findViewById(R.id.poi_address);
		mSearchText = (EditText)findViewById(R.id.input_edittext);
	}
 
Example #21
Source Project: wallpaper   Author: kysonzhu   File: WallWrapperAlertDialogue.java    License: GNU General Public License v2.0 6 votes vote down vote up
public WallWrapperAlertDialogue buildWithInput(MessageDialogListener listener) {

		LayoutInflater inflater = LayoutInflater.from(mContext);
		View view = inflater.inflate(R.layout.dialog_vin, null);

		TextView btn_click = (TextView) view.findViewById(R.id.btn_click);

		btn_click.setOnClickListener(new OnClickListener() {

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

		this.setContentView(view);
		this.setWidth(LayoutParams.MATCH_PARENT);
		this.setHeight(LayoutParams.MATCH_PARENT);
		this.setFocusable(true);
		ColorDrawable dw = new ColorDrawable(-00000);
		this.setBackgroundDrawable(dw);
		this.setOutsideTouchable(false);

		return this;
	}
 
Example #22
Source Project: wallpaper   Author: kysonzhu   File: WallWrapperAlertDialogue.java    License: GNU General Public License v2.0 6 votes vote down vote up
public WallWrapperAlertDialogue buildWithInput(MessageDialogListener listener) {

		LayoutInflater inflater = LayoutInflater.from(mContext);
		View view = inflater.inflate(R.layout.dialog_vin, null);

		TextView btn_click = (TextView) view.findViewById(R.id.btn_click);

		btn_click.setOnClickListener(new OnClickListener() {

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

		this.setContentView(view);
		this.setWidth(LayoutParams.MATCH_PARENT);
		this.setHeight(LayoutParams.MATCH_PARENT);
		this.setFocusable(true);
		ColorDrawable dw = new ColorDrawable(-00000);
		this.setBackgroundDrawable(dw);
		this.setOutsideTouchable(false);

		return this;
	}
 
Example #23
Source Project: styT   Author: stytooldex   File: wlflActivity.java    License: Apache License 2.0 6 votes vote down vote up
public void initViews() {
        //btMore = (Button) findViewById(R.id.bt_more);
        lvWifiList = (ListView) findViewById(R.id.lv_wifi_list);
        etSearch = (EditTextWithDel) findViewById(R.id.et_search);
        tvNodata = (TextView) findViewById(R.id.tv_nodata);
        toolbar = (android.support.v7.widget.Toolbar) findViewById(R.id.toolbar);
//		初始化Toolbar控件
        setSupportActionBar(toolbar);
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
//		设置导航图标
        toolbar.setNavigationOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View p1) {
                finish();
            }
        });
    }
 
Example #24
Source Project: java-unified-sdk   Author: leancloud   File: LoginActivity.java    License: Apache License 2.0 6 votes vote down vote up
private boolean mayRequestContacts() {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
    return true;
  }
  if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
    return true;
  }
  if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
    Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
        .setAction(android.R.string.ok, new View.OnClickListener() {
          @Override
          @TargetApi(Build.VERSION_CODES.M)
          public void onClick(View v) {
            requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
          }
        });
  } else {
    requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
  }
  return false;
}
 
Example #25
Source Project: styT   Author: stytooldex   File: HCActivity.java    License: Apache License 2.0 6 votes vote down vote up
public void showEditTextDialog(Context context, String title, final int itemPosition) {
    final EditText edit = new EditText(context);
    //设置只能输入小数
    edit.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
    edit.setText(items.get(itemPosition).get("delay") + "");
    new AlertDialog.Builder(context)
            .setTitle(title)
            .setView(edit)
            .setPositiveButton("确定",
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface p1, int p2) {
                            // TODO: Implement this method
                            items.get(itemPosition).put("delay", edit.getText().toString());
                            adapter.notifyDataSetChanged();
                        }
                    })
            .setNegativeButton("取消", null).show();
}
 
Example #26
Source Project: styT   Author: stytooldex   File: HCActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
    protected void onStart() {
        // TODO: Implement this method
        super.onStart();
        toolbar.setTitle("GIF合成");
//		设置标题
//		设置副标题
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
//		设置导航图标
        toolbar.setNavigationOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View p1) {
                finish();
            }
        });
    }
 
Example #27
Source Project: styT   Author: stytooldex   File: FJActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
    protected void onStart() {
        // TODO: Implement this method
        super.onStart();
        toolbar.setTitle("GIF分解");
//		设置标题
//		设置副标题
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
//		设置导航图标
        toolbar.setNavigationOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View p1) {
                finish();
            }
        });
    }
 
Example #28
Source Project: FimiX8-RE   Author: wladimir-computin   File: BaseFragment.java    License: MIT License 5 votes vote down vote up
private void initTrans() {
    this.lbBottomDelect.setOnClickListener(new OnClickListener() {
        public void onClick(View view) {
            if (BaseFragment.this.mBaseFragmentPresenter == null) {
                return;
            }
            if (BaseFragment.this.mBaseFragmentPresenter.querySelectSize() > 0) {
                BaseFragment.this.mBaseFragmentPresenter.deleteSelectFile();
            } else {
                Toast.makeText((Context) BaseFragment.this.contextWeakReference.get(), R.string.no_select_file, 0).show();
            }
        }
    });
}
 
Example #29
Source Project: FimiX8-RE   Author: wladimir-computin   File: CountrySelectListActivity.java    License: MIT License 5 votes vote down vote up
public void doTrans() {
    this.mIbtnDeleteSearch.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            CountrySelectListActivity.this.mEtSearch.setText(null);
        }
    });
}
 
Example #30
Source Project: FimiX8-RE   Author: wladimir-computin   File: TitleView.java    License: MIT License 5 votes vote down vote up
public TitleView(Context context, AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater.from(context).inflate(R.layout.sub_login_title, this);
    this.mIvLeft.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            ((Activity) TitleView.this.getContext()).finish();
        }
    });
    FontUtil.changeFontLanTing(context.getAssets(), this.mTvRight, this.mTvTitle);
}