小编Man*_*nsi的帖子

Android:如何通过意图在Facebook上与文本共享图像?

我想通过Facebook上的分享意图与我的应用程序预先填充的标题分享照片.

示例代码

Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("image/*");      

intent.putExtra(Intent.EXTRA_TEXT, "eample");
intent.putExtra(Intent.EXTRA_TITLE, "example");
intent.putExtra(Intent.EXTRA_SUBJECT, "example");
intent.putExtra(Intent.EXTRA_STREAM, imageUri);

Intent openInChooser = new Intent(intent);
openInChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
startActivity(openInChooser);
Run Code Online (Sandbox Code Playgroud)

这是我得到的屏幕截图

文本未显示

如果设置类型为图像/*,则上传照片时不会预填充文本.如果设置为文本/普通照片不显示.....

android facebook android-intent

45
推荐指数
2
解决办法
9万
查看次数

如何在我的Android应用程序中实现应用内购买?

如何在我的Android应用程序中实现应用程序内购买?

我提到了

http://developer.android.com/guide/market/billing/billing_integrate.html#billing-service

这个链接,但我不明白绑定到MarketBillingService步骤.

请给我一个恰当的例子..

android in-app-purchase

18
推荐指数
1
解决办法
2万
查看次数

来自PopupWindow的Android ListView的setOnItemClickListener未被调用

我正在尝试从PopupWindow中显示ListView.但是当我尝试调用ListView的setOnItemClickListener时,没有任何问题可以解决.这是Java文件

PopupWindowActivity.java

public class PopupWindowActivity extends Activity {
    String[] data = { "DATA 1", "DATA 2", "DATA 3", "DATA 4", "DATA 5", "DATA 6" };
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.a);
    final Button btnOpenPopup = (Button) findViewById(R.id.openpopup);
    btnOpenPopup.setOnClickListener(new Button.OnClickListener() {

        public void onClick(View arg0) {
            LayoutInflater layoutInflater = (LayoutInflater) getBaseContext()
                    .getSystemService(LAYOUT_INFLATER_SERVICE);
            View popupView = layoutInflater.inflate(R.layout.main, null);
            final PopupWindow popupWindow = new PopupWindow(popupView,
                    LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

            ListView listView = (ListView) popupView.findViewById(R.id.listView1); …
Run Code Online (Sandbox Code Playgroud)

java android popupwindow

13
推荐指数
2
解决办法
1万
查看次数

Genymotion剂量不是从API 21开始的

我在我的电脑上安装了最新的genymotion.它的工作依赖于API 18和19但是当我尝试使用API​​ 21启动Genymotion模拟器时,它不起作用.永远用" android " 显示黑屏.

在此输入图像描述

android android-emulator genymotion android-5.0-lollipop

8
推荐指数
1
解决办法
940
查看次数

android - 内存不足异常

我开发了一个用于读书的Android应用程序.Book页面和音频从Amazon Bucket下载.下载后,它存储在SD卡上.

我为下一页和上一页放置了两个按钮.当我显示页面它给了我内存异常.

11-03 10:59:39.199: E/AndroidRuntime(13566): FATAL EXCEPTION: main
11-03 10:59:39.199: E/AndroidRuntime(13566): java.lang.OutOfMemoryError
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:493)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at  android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:299)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:324)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.graphics.drawable.Drawable.createFromPath(Drawable.java:880)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at org.Infoware.childrenbible.GeneralHelper.setImgfromSDCard(GeneralHelper.java:608)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at org.Infoware.childrenbible.CoverPageActivity.onCreate(CoverPageActivity.java:205)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.app.Activity.performCreate(Activity.java:4465)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
11-03 10:59:39.199: E/AndroidRuntime(13566):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
11-03 …
Run Code Online (Sandbox Code Playgroud)

android bitmap out-of-memory

3
推荐指数
1
解决办法
6376
查看次数