android-intent

How to add text to image in grid view?

旧巷老猫 提交于 2019-12-25 06:03:54
问题 well i have gridview , which pulls the images from server & display it in gridview, i want to add related text to each image.it must look like the below image. How to achive that ? 回答1: in order to fill a GridView you got to create an item(Xml layout); then in the adapter you'll got to inflate it and fill it up; so you are able just to create a FrameLayout with an image and a textView with gravity bottom and background #66666666 where #AARRGGBB AA-is an alfa chanel(transparecy); 来源: https:/

How to add text to image in grid view?

China☆狼群 提交于 2019-12-25 06:03:10
问题 well i have gridview , which pulls the images from server & display it in gridview, i want to add related text to each image.it must look like the below image. How to achive that ? 回答1: in order to fill a GridView you got to create an item(Xml layout); then in the adapter you'll got to inflate it and fill it up; so you are able just to create a FrameLayout with an image and a textView with gravity bottom and background #66666666 where #AARRGGBB AA-is an alfa chanel(transparecy); 来源: https:/

Creating cutom dialog box on any apps screen

余生长醉 提交于 2019-12-25 05:52:25
问题 I just want to let it appear that dialog box over any apps screen. I can create dialog box like this.Means Dialog box of application 1 over application 2,3,4... screens. Please Help to create dialog box activity as in the image?? Here http://i.stack.imgur.com/6Gs8G.png let me explain, in chrome first i have clicked the file to download, then using intents "Android download manager" used its editor activity to capture the URI.. and created dialog box like this. but i want to do that, in this

Callback from chooser

ぐ巨炮叔叔 提交于 2019-12-25 05:51:29
问题 I just started implementing a share functionality but was wondering if its possible to tell how my content was shared (facebook/twitter/text/etc) without writing my own implementation of chooser. My initial guess was to use startActivityForResult when launching the chooser but haven't managed to figure out which requestcode to use. public void share(String subject,String text) { final Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA

Pick image from fragment always return resultcode 0 in some devices

╄→гoц情女王★ 提交于 2019-12-25 05:50:06
问题 I trying to pick an image from gallery and set the bitmap to my imageview, but I have a problem: in my device, works well, but it doesn't work in other. I start the image picker in my fragment as follow: Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, SELECT_PHOTO); And this is my onActivityResult : @Override public void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) {

Android - How do I create an email body from a file that contains css and html?

那年仲夏 提交于 2019-12-25 05:38:24
问题 I have looked and found lots of great answers on how to load html into a body of an email Intent, but couldn't find how to load a file that contain css and html. I have a program that shows a webview where I display the file using: webView.loadUrl("file://" + htmlManager.htmlFilePath(HtmlManager.myHtmlFile)); I have the email loading html using Uri data = Uri.parse("mailto:?subject=" + subject + "&body=" + Html.fromHtml(htmlString)); but can I use the same file I used for the loadUrl for the

storing image path from sdcard in android

[亡魂溺海] 提交于 2019-12-25 05:35:16
问题 how to store image path into array.as i'm retrieving images dynamically.n listing them.after clicking on one o the image i want to send it to previous activity. how can i store the image path??please help me below is code- 1st activity- public void importFile(View v){ Intent intent=new Intent(this,ImportFile.class); startActivityForResult(intent, 1); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub super

Using multiple button to start different activities Android

荒凉一梦 提交于 2019-12-25 05:33:22
问题 I have 3 activities. Main activity which is the home screen with two buttons, each button should show up one of the 2 last activity. I tried many methods for multiple buttons both in intent mode and switch mode; but I still can have two working button. The first button starts its linked activity without any problem, but the second button still won't show up. Here is the java code: package com.live.app; import android.app.Activity; import android.content.Context; import android.content.Intent;

Change Camera settings from another App's Activity

天大地大妈咪最大 提交于 2019-12-25 05:32:39
问题 I have an Android app that calls the native camera app to take a picture and returns the image for further manipulation. My problem, is that I run into memory leaks if the camera is set to 2(+) megapixels. Ideally, I want it set to the lowest (VGA) since image quality is not a concern with this app. Is there a way from my app to change the settings of the native device's camera app? Here is the code I am using: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); mImageCaptureUri =

Passing ArrayList Object between activities using parcelable

此生再无相见时 提交于 2019-12-25 05:25:12
问题 Ill first start this off saying i have seen all the other posts that deal with this and have tried all of them. Im trying to do the same thing asked in the other posts, which is to pass the values of a ArrayList from one activity to another using Intent. I feel I have implemented my class(es) correctly. The main class (Route_Class) i am using is below. ``` public class Route_Class implements Parcelable { private double latitude = 0; private double longitude = 0; private double startingLat = 0