extras

Is there way to tell IntelliJ IDEA which output folder to use for GWT compiler?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 08:50:46
问题 Is there way to tell IntelliJ IDEA which output folder to use for GWT compiler ? I know it copies artifacts to project folder but it doesn't copy extras which I set using "-extra" command line parameter of gwt compiler. IntelliJ IDEA leaves it in USER_HOME/.IntelliJIdea10/system/gwt/project_name_with_hash/module_name_with_hash/compile/www UPDATE : Strangely I didn't find list of possible path macroses on IntelliJ's website. But I found them in idea.jar . Possible macroses are: APPLICATION

Start activity using intent with extra does not show all the extras

纵然是瞬间 提交于 2019-12-11 19:39:00
问题 Inside a setOnItemClickListener I use an intent to start a new activity. I put 7 strings as extras for this intent. When I click an item (of a ListView) I want all these extras to be displayed (on a new screen). But I see only the first 4 extras. Here's the layout file for the new activity: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation=

Intent extras in Unit test Android Mockito

我的未来我决定 提交于 2019-12-10 20:44:47
问题 I am trying to verify that specific extras are added to Intent, but all the time I get null for the Intent in Unit test Android. I have the following class that need to be test: public class TestClass extends SomeNotifier { private Intent mIntent = new Intent("testintent"); public TestClassConstructor(Context context) { super(context); } @Override public void notifyChange() { mIntent.putExtra("Key one", 22); mIntent.putExtra("Key two", 23); mIntent.putExtra("Key three", 24); getContext()

Shortcut intent extras lost after restart?

早过忘川 提交于 2019-12-07 15:57:35
问题 My application listens to the android.intent.action.CREATE_SHORTCUT broadcast, in my code I am creating a shortcut which includes a String extra like this: Intent shortcutIntent = new Intent(Intent.ACTION_VIEW); shortcutIntent.setClassName("com.some.name","com.some.name.Activity"); shortcutIntent.putExtra("stringid", "some string value"); ShortcutIconResource iconResource = Intent.ShortcutIconResource.fromContext(ShortcutActivity.this,iconIdentifier); Intent intent = new Intent(); intent

Shortcut intent extras lost after restart?

[亡魂溺海] 提交于 2019-12-06 00:57:57
My application listens to the android.intent.action.CREATE_SHORTCUT broadcast, in my code I am creating a shortcut which includes a String extra like this: Intent shortcutIntent = new Intent(Intent.ACTION_VIEW); shortcutIntent.setClassName("com.some.name","com.some.name.Activity"); shortcutIntent.putExtra("stringid", "some string value"); ShortcutIconResource iconResource = Intent.ShortcutIconResource.fromContext(ShortcutActivity.this,iconIdentifier); Intent intent = new Intent(); intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); intent.putExtra(Intent.EXTRA_SHORTCUT_NAME,

How do I write an android JUnit test when my activity relies on extras passed through an Intent?

淺唱寂寞╮ 提交于 2019-12-05 00:14:34
I am writing an android Junit test for a class that relies on extras passed to it through an Intent. I was able to get the class working properly, but I would still like to know how to write a unit test for such a class, as the test still fails. public class AddClassEvent extends Activity{ private String eventType; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle extras = getIntent().getExtras(); final String cNo = extras.getString("CourseNum"); // create a model instance final StudentDBModel model = new StudentDBModel(this); setContentView

Passing Extras and screen rotation

∥☆過路亽.° 提交于 2019-12-04 06:48:37
问题 This kind of questions appear periodically. Sorry if this has been covered before, but I'm a newbie and couldn't find the appropriate answer. It deals with the correct implementation of communication between classes and activities. I made a gallery app. It has 3 main activities: the Main one, to search for filenames using a pattern; a Thumb one, that shows all the images that matched the pattern as thumbnails in a gridview, and a Photo activity, that opens a full sized image when you click a

How to launch front camera with intent?

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using an intent to open the camera with the native application: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri photoUri = Uri.fromFile(getOutputPhotoFile()); intent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri); startActivityForResult(intent, CAMERA_PHOTO_REQUEST_CODE); Every time the camera that is opened (front/back camera) is like the last time this native camera application was open. Meaning that if the last time I closed the native camera application the back camera was active, so when I launch the intent for camera,

Passing Extras and screen rotation

ⅰ亾dé卋堺 提交于 2019-12-02 11:51:53
This kind of questions appear periodically. Sorry if this has been covered before, but I'm a newbie and couldn't find the appropriate answer. It deals with the correct implementation of communication between classes and activities. I made a gallery app. It has 3 main activities: the Main one, to search for filenames using a pattern; a Thumb one, that shows all the images that matched the pattern as thumbnails in a gridview, and a Photo activity, that opens a full sized image when you click a thumb in Thumbs . I pass to the Photo activity via an Intent the filenames (an array), and the position

Intent send is not intent received

牧云@^-^@ 提交于 2019-12-02 10:11:15
问题 So I am trying to launch a new activity after the item in a list is selected.... pretty basic based on what I've read. I am also trying to send a value in the extras. So I can select the item in a list, and the new activity starts, extras is set, but the value in the extras is empty. I've noticed the id of the intent on the new activity doesn't match the one from the 1st activity. I don't know if it is supposed to or not. From Activity 1: public void onItemClick(AdapterView<?> parent, View