android-gallery

Splitting a TextView into multiple TextViews relative to screen height

倖福魔咒の 提交于 2019-12-06 07:23:06
问题 So I have what I consider a rather complex problem. I have this massive TextView that is several screen lengths long. What I want to do is split the TextView up into smaller TextViews, each the height of the visible screen (So no vertical scrolling), and place the smaller TextViews in a horizontal-scrolling Gallery. I can do the latter no problem, but I can't think of a good way to break up the TextViews. It's also worth noting the TextView contains many different styled text within it

Images not being saved when picture is taken by camera app that isn't the stock camera

南笙酒味 提交于 2019-12-06 07:09:41
问题 I'm currently trying to save images taken from a phone to its gallery, but the code below only works if I choose the stock camera app when the chooser dialog pops up. Whenever I choose another camera app(e.g., the Google camera), the taken picture doesn't get saved any where. To make things even stranger, sometimes the picture does show up in its designated directory in the gallery, but after 15 mins or so, the same goes for when I use the stock camera app: the picture will get saved in the

Android: Scanning a directory and displaying pictures (thumbnails) (pictures are not stored in the mediastore)

丶灬走出姿态 提交于 2019-12-06 05:48:20
问题 I have recently done some tests with display pictures using a custom gallery that i designed using the media queries and mediastore... It worked great but i really need to do something custom. I don't wish the pictures to be scanned or available in the mediastore hence i would like to have my app scan a directory and create thumbnails and display these thumbnails. I am finding it really thin on the ground to find any good quality examples to do this. Can anyone help with a small example. Here

Android Gallery's getView() returning incorrect position

南楼画角 提交于 2019-12-06 00:02:18
Thanks for reading! I am using the Android Gallery with both LayoutParams as MATCH_PARENT to show one full screen image at a time. Here's my code: layout.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Gallery android:id="@+id/gallery" android:layout_width="fill_parent" android:layout_height="fill_parent"> </Gallery> <TextView android:id="@+id/tvShowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout

How to filter out unwanted files using Intent.ACTION_GET_CONTENT

*爱你&永不变心* 提交于 2019-12-05 18:52:53
I'm using intent.ACTION_GET_CONTENT to allow a user to select images or video files only. this is the way am preparing my intent Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/* | video/*"); intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true); intent.addCategory(Intent.CATEGORY_OPENABLE); XActivity.startActivityForResult(intent, ACQUIRE_IMAGE_AND_VIDEOS_CODE); When i click the button that start this intent, the following apps are display in my customized dialog below is the method that fills my dialog with apps that can handle the above intent and also what happens

HTML File Upload Doesn't Show Gallery on Android

。_饼干妹妹 提交于 2019-12-05 13:05:41
问题 I'd like my PHP app to accept a photo chosen from a mobile user's gallery. I'm testing on Android 4.4.4 using Chrome. This is my form: <form enctype="multipart/form-data" action="index.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="20000000" /> <input type="submit" value="Add" /> </form> I've tried three different type="file" inputs and none of them give me the Gallery as an option: <input name="userfile" type="file" /> Options: Camera, Camcorder, Sound Recorder and

Android gallery slideshow animation

佐手、 提交于 2019-12-05 12:57:32
I'm developing a gallery app, in this app I'm displaying images in slideshow using gallery. It's working fine, but I want to add some animation. I can apply only one animation with this code but I want to add two animation effects in gallery view. Say in translation effect, right-to-center and center-to-left. Please anyone help me out. public void slidShow(){ Runnable runnable = new Runnable() { @Override public void run() { myslideshow(); handler.postDelayed(this, 3000); } }; new Thread(runnable).start(); } private void myslideshow(){ PicPosition = gallery.getSelectedItemPosition() +1; if

Xamarin Choose Image From Gallery Path is Null

本秂侑毒 提交于 2019-12-05 06:55:42
问题 using this recipe to try and choose an image from the gallery and then upload it to s3 but my path always returns null. private string _imgPath; public void InitializeMediaPicker() { Intent = new Intent(); Intent.SetType("image/*"); Intent.SetAction(Intent.ActionGetContent); StartActivityForResult(Intent.CreateChooser(Intent, "Select Picture"), 1000); } public string GetImage() { InitializeMediaPicker(); return _imgPath; } protected override void OnActivityResult(int requestCode, Result

auto scroll a Gallery widget

ぐ巨炮叔叔 提交于 2019-12-05 06:11:31
I need to implement a gallery which scrolls one item at a time, and which can do 'autoscroll': i.e. every couple of seconds, it automatically scrolls to the next item. As per this thread: Android: Programmatically animate between images in Gallery widget , I extended Gallery, overriding onFling to ignore the fling event and instead simulate a DPAD arrow left or right in order to move a single item at a time: @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { int kEvent; if(isScrollingLeft(e1, e2)){ //Check if scrolling left kEvent = KeyEvent

android camera and gallery not working in nexus 5

[亡魂溺海] 提交于 2019-12-05 06:09:29
问题 In my application I use camera and gallery to upload the selected image to server. it's working fine till 4.4.2, but in 4.4.4 nexus5 both camera and gallery don't work. my camera part is in a Fragment .If I try to take a photo using the camera or pick a photo using the gallery I get "please retry" message as per my code. camera action code: String path = Environment.getExternalStorageDirectory() + "/appname"; File photopath = new File(path); if (!photopath.exists()) { photopath.mkdir(); } try