Android Open Source - AndroidSIP Profile Activity






From Project

Back to project page AndroidSIP.

License

The source code is released under:

Apache License

If you think the Android project AndroidSIP 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 net.gongmingqm10.sipsample.activity;
//  w  ww.  java 2  s  .  c om
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;
import android.widget.TextView;

import net.gongmingqm10.sipsample.R;
import net.gongmingqm10.sipsample.SipApplication;
import net.gongmingqm10.sipsample.data.Account;

import butterknife.ButterKnife;
import butterknife.InjectView;

public class ProfileActivity extends BaseActivity {

    @InjectView(R.id.userName)
    TextView userName;
    @InjectView(R.id.domain)
    TextView domain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_profile);
        getActionBar().setDisplayHomeAsUpEnabled(true);
        ButterKnife.inject(this);
        Account account = SipApplication.getInstance().getAccount();
        userName.setText("Username?" + account.getUsername());
        domain.setText("Domain?" + account.getDomain());
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch(item.getItemId()) {
            case android.R.id.home:
                this.finish();
                return true;
        }
        return super.onOptionsItemSelected(item);

    }
}




Java Source Code List

net.gongmingqm10.sipsample.ApplicationTest.java
net.gongmingqm10.sipsample.SipApplication.java
net.gongmingqm10.sipsample.activity.BaseActivity.java
net.gongmingqm10.sipsample.activity.LoginActivity.java
net.gongmingqm10.sipsample.activity.MainActivity.java
net.gongmingqm10.sipsample.activity.ProfileActivity.java
net.gongmingqm10.sipsample.data.Account.java
net.gongmingqm10.sipsample.receiver.IncomingCallReceiver.java