
package com.ltc.commontitle.sample;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.ltc.lib.commontitle.CommonTitle;
import com.ltc.share.ShareInfo;
import com.ltc.share.ShareUtil;

public class MainActivity extends Activity {
    
    private CommonTitle commonTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        commonTitle = (CommonTitle) findViewById(R.id.title);
        commonTitle.setOnTitleClickListener(new CommonTitle.TitleClickListener() {
            
            @Override
            public void onRightClicked(View parent, View v) {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public void onRight2Clicked(View parent, View v) {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public void onLeftClicked(View parent, View v) {
                // TODO Auto-generated method stub
            	
            	ShareInfo shareInfo = new ShareInfo("title", "www.baidu.com",
						"summary", "wxcontent", "wxMomentsContent", "normalText", R.drawable.ic_launcher, 
						"https://res.wx.qq.com/open/zh_CN/htmledition/res/img/pic/app-create/pic_logo_282168b9.png");
            	
                ShareUtil.getInstance().showShareWindow(MainActivity.this, shareInfo);
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}

@@ -79,17 +79,73 @@
 oid.
-os.Bundle
+content.Intent;%0Aimport android.os.Bundle;%0Aimport android.util.Log
 ;%0Aim
@@ -302,16 +302,48 @@
 areUtil;
+%0Aimport com.ltc.share.qq.QQUtil;
 %0A%0Apublic
@@ -1320,16 +1320,23 @@
 itle%22, %22
+http://
 www.baid
@@ -1634,36 +1634,872 @@
 Info
-);%0A            %7D%0A        %7D);
+, new ShareUtil.ShareListener() %7B%0A%09%09%09%09%09%0A%09%09%09%09%09@Override%0A%09%09%09%09%09public void onError(String errorMessage) %7B%0A%09%09%09%09%09%09// TODO Auto-generated method stub%0A%09%09%09%09%09%09Log.e(%22aaaaaaaaaaaaaa%22, %22qq onError%22 + errorMessage);%0A%09%09%09%09%09%7D%0A%09%09%09%09%09%0A%09%09%09%09%09@Override%0A%09%09%09%09%09public void onComplete() %7B%0A%09%09%09%09%09%09// TODO Auto-generated method stub%0A%09%09%09%09%09%09Log.e(%22aaaaaaaaaaaaaa%22, %22qq onComplete%22);%0A%09%09%09%09%09%09%0A%09%09%09%09%09%7D%0A%09%09%09%09%09%0A%09%09%09%09%09@Override%0A%09%09%09%09%09public void onCancel() %7B%0A%09%09%09%09%09%09// TODO Auto-generated method stub%0A%09%09%09%09%09%09Log.e(%22aaaaaaaaaaaaaa%22, %22qq onCancel%22);%0A%09%09%09%09%09%09%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D);%0A            %7D%0A        %7D);%0A    %7D%0A    %0A    @Override%0A    protected void onActivityResult(int requestCode, int resultCode, Intent data) %7B%0A    %09%0A    %09QQUtil.getInstance().getTencentInstance(getApplicationContext()).onActivityResult(requestCode, resultCode, data);%0A    %09%0A    %09super.onActivityResult(requestCode, resultCode, data);%0A    %09%0A    %09
 %0A   

add share result listener