Android Open Source - demo-app-android Base Activity






From Project

Back to project page demo-app-android.

License

The source code is released under:

MIT License

If you think the Android project demo-app-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package io.rong.imkit.demo;
/*  w ww.  jav  a  2  s . com*/
import java.io.Serializable;

//import com.sea_monster.core.network.AbstractHttpRequest;
import com.umeng.analytics.MobclickAgent;

import android.app.Activity;
import android.media.AudioManager;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.Window;

/**
 * Created by zhjchen on 14-4-8.
 */
public abstract class BaseActivity extends FragmentActivity {

  @Override
  protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);

    setVolumeControlStream(AudioManager.STREAM_MUSIC);// ????????????
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(setContentViewResId());
    initView();
    initData();

  }

  @SuppressWarnings("unchecked")
  protected <T extends View> T getViewById(int id) {
    return (T) findViewById(id);
  }

  protected abstract int setContentViewResId();

  protected abstract void initView();

  protected abstract void initData();


    public void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);
    }
    public void onPause() {
        super.onPause();
        MobclickAgent.onPause(this);
    }
}




Java Source Code List

io.rong.imkit.demo.BaseActivity.java
io.rong.imkit.demo.BaseApiActivity.java
io.rong.imkit.demo.BlackListActivity.java
io.rong.imkit.demo.BlackListAdapter.java
io.rong.imkit.demo.DefaultExceptionHandler.java
io.rong.imkit.demo.DemoActivity.java
io.rong.imkit.demo.DemoApplication.java
io.rong.imkit.demo.DemoContext.java
io.rong.imkit.demo.FunctionListAdapter.java
io.rong.imkit.demo.GroupListActivity.java
io.rong.imkit.demo.GroupListAdapter.java
io.rong.imkit.demo.LocationActivity.java
io.rong.imkit.demo.LoginActivity.java
io.rong.imkit.demo.MainActivity.java
io.rong.imkit.demo.ParcelUtils.java
io.rong.imkit.demo.RegisterActivity.java
io.rong.imkit.demo.TestFragment2Activity.java
io.rong.imkit.demo.TestFragmentActivity.java
io.rong.imkit.demo.UserInfoActivity.java
io.rong.imkit.demo.common.DemoApi.java
io.rong.imkit.demo.model.CustomerService.java
io.rong.imkit.demo.model.Status.java
io.rong.imkit.demo.model.User.java
io.rong.imkit.demo.parser.GsonArrayParser.java
io.rong.imkit.demo.parser.GsonParser.java
io.rong.imkit.demo.parser.JsonObjectParser.java
io.rong.imkit.demo.parser.RegisterParser.java
io.rong.imkit.demo.ui.BaseFrameLayout.java
io.rong.imkit.demo.ui.LoadingDialog.java
io.rong.imkit.demo.ui.WinToast.java