Search in sources :

Example 1 with FeedbackAgent

use of com.umeng.fb.FeedbackAgent in project SimplifyReader by chentao0707.

the class HomeActivity method initViewsAndEvents.

@Override
protected void initViewsAndEvents() {
    mFeedbackAgent = new FeedbackAgent(this);
    mFeedbackAgent.sync();
    mFeedbackAgent.closeFeedbackPush();
    mFeedbackAgent.closeAudioFeedback();
    mFeedbackAgent.setWelcomeInfo(getResources().getString(R.string.feedback_welcome_info));
    mHomePresenter = new HomePresenterImpl(this, this);
    mHomePresenter.initialized();
}
Also used : HomePresenterImpl(com.github.obsessive.simplifyreader.presenter.impl.HomePresenterImpl) FeedbackAgent(com.umeng.fb.FeedbackAgent)

Example 2 with FeedbackAgent

use of com.umeng.fb.FeedbackAgent in project android-app by eoecn.

the class MainActivity method onClick.

// [end]
// [start]继承方法
@Override
public void onClick(View v) {
    // TODO Auto-generated method stub
    switch(v.getId()) {
        case R.id.Linear_above_toHome:
            showMenu();
            break;
        case R.id.login_login:
            SharedPreferences share = this.getSharedPreferences(UserLoginUidActivity.SharedName, Context.MODE_PRIVATE);
            // [start] 修复上一个bug
            String Key = share.getString(UserLoginUidActivity.KEY, "");
            if (Key != "" && !Key.contains(":")) {
                Editor edit = share.edit();
                edit.putString(UserLoginUidActivity.KEY, "");
                edit.commit();
            }
            // [end] 下一版本删除掉
            if (share.contains(UserLoginUidActivity.KEY) && !share.getString(UserLoginUidActivity.KEY, "").equals("")) {
                IntentUtil.start_activity(this, UserCenterActivity.class);
            } else {
                IntentUtil.start_activity(this, UserLoginActivity.class);
            }
            break;
        case R.id.imageview_above_more:
            if (isShowPopupWindows) {
                new PopupWindowUtil(mViewPager).showActionWindow(v, this, mBasePageAdapter.tabs);
            }
            break;
        case R.id.imageview_above_query:
            if (NetWorkHelper.isNetworkAvailable(MainActivity.this)) {
                IntentUtil.start_activity(this, SearchActivity.class, new BasicNameValuePair("tag", current_page));
            } else {
                Toast.makeText(getApplicationContext(), "网络连接失败,请检查网络", Toast.LENGTH_LONG).show();
            }
            break;
        case R.id.cbFeedback:
            FeedbackAgent agent = new FeedbackAgent(this);
            agent.startFeedbackActivity();
            break;
        case R.id.cbAbove:
            IntentUtil.start_activity(this, AboutActivity.class);
            break;
        case R.id.bn_refresh:
            switch(mTag) {
                case 0:
                    imgQuery.setVisibility(View.GONE);
                    new MyTask().execute(topDao);
                    break;
                case 1:
                    new MyTask().execute(newsDao);
                    break;
                case 2:
                    new MyTask().execute(wikiDao);
                    break;
                case 3:
                    new MyTask().execute(blogsDao);
                    break;
                default:
                    break;
            }
            break;
    }
}
Also used : SharedPreferences(android.content.SharedPreferences) BasicNameValuePair(org.apache.http.message.BasicNameValuePair) Editor(android.content.SharedPreferences.Editor) PopupWindowUtil(cn.eoe.app.utils.PopupWindowUtil) FeedbackAgent(com.umeng.fb.FeedbackAgent)

Example 3 with FeedbackAgent

use of com.umeng.fb.FeedbackAgent in project SunDay by iQuick.

the class SettingActivity method clickFeedback.

/**
     * 用户反馈
     */
@Click(R.id.setting_user_feedback)
void clickFeedback() {
    FeedbackAgent agent = new FeedbackAgent(SettingActivity.this);
    agent.startFeedbackActivity();
}
Also used : FeedbackAgent(com.umeng.fb.FeedbackAgent) Click(org.androidannotations.annotations.Click)

Example 4 with FeedbackAgent

use of com.umeng.fb.FeedbackAgent in project umeng-android-sdk-theme by umeng.

the class ConversationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.umeng_fb_activity_conversation);
    try {
        agent = new FeedbackAgent(this);
        defaultConversation = agent.getDefaultConversation();
        replyListView = (ListView) findViewById(R.id.umeng_fb_reply_list);
        setListViewHeader();
        adapter = new ReplyListAdapter(this);
        replyListView.setAdapter(adapter);
        // sync up the conversations on Activity start up.
        sync();
        // contact info entry
        View contact_entry = findViewById(R.id.umeng_fb_conversation_contact_entry);
        contact_entry.setOnClickListener(new OnClickListener() {

            @SuppressLint("NewApi")
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(ConversationActivity.this, ContactActivity.class);
                startActivity(intent);
                // http://stackoverflow.com/questions/6495007/verifyerror-deploying-on-api-1-6
                if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.DONUT) {
                    overridePendingTransition(R.anim.umeng_fb_slide_in_from_right, R.anim.umeng_fb_slide_out_from_left);
                }
            }
        });
        if (agent.getUserInfoLastUpdateAt() > 0)
            contact_entry.setVisibility(View.GONE);
        findViewById((R.id.umeng_fb_back)).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                finish();
            }
        });
        userReplyContentEdit = (EditText) findViewById(R.id.umeng_fb_reply_content);
        findViewById(R.id.umeng_fb_send).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                String content = userReplyContentEdit.getEditableText().toString().trim();
                if (TextUtils.isEmpty(content))
                    return;
                userReplyContentEdit.getEditableText().clear();
                defaultConversation.addUserReply(content);
                // adapter.notifyDataSetChanged();
                // scoll to the end of listview after updating the
                // conversation.
                // replyList.setSelection(adapter.getCount()-1);
                sync();
                // hide soft input window after sending.
                InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                if (imm != null)
                    imm.hideSoftInputFromWindow(userReplyContentEdit.getWindowToken(), 0);
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
        this.finish();
    }
}
Also used : ContactActivity(com.umeng.fb.ContactActivity) OnClickListener(android.view.View.OnClickListener) SuppressLint(android.annotation.SuppressLint) Intent(android.content.Intent) InputMethodManager(android.view.inputmethod.InputMethodManager) FeedbackAgent(com.umeng.fb.FeedbackAgent) View(android.view.View) AbsListView(android.widget.AbsListView) TextView(android.widget.TextView) ListView(android.widget.ListView)

Aggregations

FeedbackAgent (com.umeng.fb.FeedbackAgent)4 SuppressLint (android.annotation.SuppressLint)1 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 Editor (android.content.SharedPreferences.Editor)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 InputMethodManager (android.view.inputmethod.InputMethodManager)1 AbsListView (android.widget.AbsListView)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 PopupWindowUtil (cn.eoe.app.utils.PopupWindowUtil)1 HomePresenterImpl (com.github.obsessive.simplifyreader.presenter.impl.HomePresenterImpl)1 ContactActivity (com.umeng.fb.ContactActivity)1 Click (org.androidannotations.annotations.Click)1 BasicNameValuePair (org.apache.http.message.BasicNameValuePair)1