Codota Logo
BaseActivity
Code IndexAdd Codota to your IDE (free)

How to use
BaseActivity
in
com.wss.common.base

Best Java code snippets using com.wss.common.base.BaseActivity (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: wutq/AndroidModuleDemo

public void showEmptyOrErrorView(String text, int img) {
  if (emptyView == null) {
    emptyView = findViewById(R.id.vs_empty);
  }
  emptyView.setVisibility(View.VISIBLE);
  findViewById(R.id.iv_empty).setBackgroundResource(img);
  ((TextView) findViewById(R.id.tv_empty)).setText(text);
  findViewById(R.id.ll_empty).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
      onPageClick();
    }
  });
}
origin: wutq/AndroidModuleDemo

protected void showEmptyView() {
  showEmptyView(getString(R.string.no_data));
}
origin: wutq/AndroidModuleDemo

protected void showErrorView() {
  showErrorView(getString(R.string.error_data));
}
origin: wutq/AndroidModuleDemo

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mContext = this;
  getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
  if (isActionBar()) {
    setContentView(R.layout.activity_base);
    ((ViewGroup) findViewById(R.id.fl_content)).addView(getLayoutInflater().inflate(getLayoutId(), null));
  } else {
    setContentView(getLayoutId());
  }
  //初始化ButterKnife
  unbinder = ButterKnife.bind(this);
  //沉浸式状态栏
  initImmersionBar(R.color.blue);
  //加入Activity管理器
  BaseApplication.getApplication().getActivityManage().addActivity(this);
  if (regEvent()) {
    EventBusUtils.register(this);
  }
  loadingDialog = new LoadingDialog(mContext);
}
origin: wutq/AndroidModuleDemo

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
  super.onRequestPermissionsResult(requestCode, permissions, grantResults);
  Logger.e("permissions:" + Arrays.toString(permissions) + " grantResults:" + Arrays.toString(grantResults));
  //如果有未授权权限则跳转设置页面
  if (!requestPermissionsResult(grantResults)) {
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(Uri.parse("package:" + getPackageName()));
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);
  }
}
origin: wutq/AndroidModuleDemo

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
  handler.sendEmptyMessageDelayed(0, loadingTime);
}
origin: wutq/AndroidModuleDemo

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  initView();
}
origin: wutq/AndroidModuleDemo

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  //创建present
  presenter = createPresenter();
  if (presenter != null) {
    presenter.attachView(this);
  }
}
com.wss.common.baseBaseActivity

Javadoc

Describe:所有Activity的基类 Created by 吴天强 on 2018/10/15.

Most used methods

  • onCreate
  • findViewById
  • getLayoutId
  • getLayoutInflater
  • getPackageName
  • getString
  • getWindow
  • initImmersionBar
    沉浸栏颜色
  • initView
  • isActionBar
    是否需要ActionBar TODO 暂时用此方法 后续优化
  • onDestroy
  • onEventBus
    子类接受事件 重写该方法
  • onDestroy,
  • onEventBus,
  • onPageClick,
  • onResume,
  • regEvent,
  • requestPermissionsResult,
  • setContentView,
  • showEmptyOrErrorView,
  • showEmptyView,
  • showErrorView

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now