this is what I am trying to achieve
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The black rectangle is an image asset which i need to move left and right on related touch events/drags
Being relatively new to Android , I am finding this difficult to implement.
So was hoping I could get some tips,guides,examples if there are any.
I Have tried viewflipper but that is not what I need here, I tried making a slider like a seek bar , but didn't work out.
Some one suggested that I use a framelayout over the main image to slide but I don't know how to do it.
So any help which will help me out here is appreciated
viv_jen said:
Some one suggested that I use a framelayout over the main image to slide but I don't know how to do it.
Click to expand...
Click to collapse
I've got two ideas on how you can accomplish this and I think a FrameLayout would be the simplest solution.
Simple - Using a FrameLayout. A FrameLayout essentially lets you stack views on top of each other. You would have to put two ImageViews in a FrameLayout and set it up so that the black frame is in the overlaying ImageView while the picture in in the bottom ImageView. Here's a nice tutorial on setting that up. Once that's done, you'll have to set an onTouch listener to the overlaying ImageView and move the view as the user drags it. Use this to get started.
Complicated - Create a custom view. You could subclass view and override the onDraw() to render both your picture and the black frame. You would use the same technique of overriding onTouch() to move the frame. Check out the Android Documentation for more info.
You may use this method from Canvas
Code:
public void drawBitmap (Bitmap bitmap, Rect src, RectF dst, Paint paint)
Related
Hey,
Ive written a Listcontrol with Scroll support. It supports scrolling, activating
and dragging ( wait short when touch the Display, then you can drag ).
This Zip contains two files, grid view and list view.
It would be nice if you can test it, and give me a feedback. For testing it is also a little ApplicationLauncher, which should work for english ROMs.
It requires .net compact 2.0
greets doena
The control itself seems to work fine on my T-Mobile Wing, although the font in the grid is way too small and the grid's scrolling seems smoother than the list's. The list is kind of slow.
Also when clicking on the task (outlook) application in the start menu (both list and grid), it crashes:
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfor startInfo). It's part of my recent programs list, so I don't know if that could be the reason?
Do you plan to release the control?
Working ok on my prophet grid icons and text to small list just plain white grid runs better and managed to start screen shot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey,
thanks for your answers, its nice to show you're interested.
I have just changed the ListView, so it scroll like the Grid one, and shows Icons.
With the icons and App Launch Exception I have to look, what could be done, but I will find a reason ;-)
Sorry for second Post,
I have now changed the Font size in Grid view,
you ll find it in Atachment
greets doena
PS: please dont use the minimize button, it doesnt work well
I'm having trouble populating my Spinner, so I'm using the tutorial on Google website,
http://developer.android.com/resources/tutorials/views/hello-spinner.html
When I get to part 4, and I put the code in the the java folder, a bunch of red X's pop up, giving me errors.
My questions is do I delete everything in the oncreate () .jave file and insert the code from Googles site? When I do it give me errors, this is what happens,
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm know my coding is wrong, can anybody point me in the right direction?
Hold your mouse over that first "Spinner" that is underlined....I bet you get a hint
You're missing a closing '}' tag at the end, it looks like your missing a spinner called "spinner" in your main.xml and it looks like you've not imported 'Spinner' or 'ArrayAdapter'.
I do have a Spinner in my main.xl, I don't have an arrayadapter though
Ok, I fixed 2 parts of the Spinner issue in the first error line,
I imported a Spinner like Root said, than the second error was it was looking for:
findViewById(R.id.spinner);
Than I realize my spinner is not called 'spinner', it was 'spinner1", so I put the 1 on and the error when away.
Now my next issue is the arrary adapter. I know I don't have one in my main.xml, but based on how far im in the tutorial I havent gotten to the part yet which is #5.
EDIT: It's telling me to "Now create a nested class that implements AdapterView.OnItemSelectedListener. This will provide a callback method that will notify your application when an item has been selected from the Spinner."
Where do I implement that?
Bump, please!
This was posted in Development, but I wanted to make sure all my fellow Thunderbolt Themers knew about this. Enjoy
Attention Moderator
If this is posted in the wrong section please relocate. I'd like to keep it in the Thunderbolt forum if possible.
If you've worked on the Android Flip clock before then you know how much time is devoted to theming this bad boy. I've put together a nice "Action" that can be used in Adobe Photoshop.
This Action will do the following:
1) Mod the clock digit however you choose. You'll need to create the initial recorded action.
2) After you've created the initial recorded action, the "Actions" will go through 0-9, use your created action, save each digit's upper and bottom half using the correct dimensions on the flip clock.
3) It will also name the clock digits their correct name when opening the Fusion.apk (Based off of EVO & Thunderbolt) I'm not sure if this will carry over to other phones using the fusion.apk
All you'll need to do is rotate the clock digits upside down and of course design the initial digit.
Adobe Photoshop Saved Actions
Change log:
Latest ZIP:
http://www.multiupload.com/E2KSEHXTU0
*Includes FOUR zips. The fourth ".atn" gives you the ability to edit just the background if you have two layers.
http://www.multiupload.com/HG9JQSE9ZG
http://www.multiupload.com/50GQQ6US06
Here's a quick video demonstration:
*Sorry, but my mic wasn't working so no audio.
http://www.youtube.com/watch?v=KqsPjC3wvjw
At the request of another member, I've included a copy of the clock made with this "action." I've also included all the clocks I've designed so far. All I ask is that I be referenced if any of them are used in ROMS/Themes. Thanks.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Multi-http://www.multiupload.com/1E094Y1RGO
I have an android app.I have a preference in my app which allows a user to enter his desired storage location for video recording it can be internal or external now the question is how can i determine if the user has entered the correct storage location path if he didnt enter the right path then how to show a toast and reset the path.
This is the preference
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the editext
Now if the user enters wrong path for example there are spaces in the path or the path is incorrect for video recording how can i check that
Without seeing some code it would be difficult to show you a way that would be easily integrated in to your app.
zalez said:
Without seeing some code it would be difficult to show you a way that would be easily integrated in to your app.
Click to expand...
Click to collapse
Yep, and when is it the "right" path?
The right oath is where a video recording file can be created it can be internal or external
If you've got a file object, you could check these:
Code:
boolean isFile = myFile.isFile();
boolean isDirectory = myFile.isDirectory();
I would implement a chooser instead of relying on your end user to type the correct path.
Take a look at this:
http://www.codeproject.com/Articles/547636/Android-Ready-to-use-simple-directory-chooser-dial
zalez said:
I would implement a chooser instead of relying on your end user to type the correct path.
Take a look at this:
http://www.codeproject.com/Articles/547636/Android-Ready-to-use-simple-directory-chooser-dial
Click to expand...
Click to collapse
Oh, you're right. Much more fool proof. :good:
Hi XDA,
long time since my last posting here. I am trying to teach myself Android developing and recently i published my first android app (it connects to my forum and reads certain data from which are displayed on a map and in lists). My App is based on the Android Studio Navigation Drawer template, which i extended with fragments for the views.
So everything seems fine, but users with old android devices told me, that the burger icon in the left top corner, which triggers the navigation drawer, is missing.
I can reproduce this with my old Huwai MediaPad (CM 11, Android 4.4) but not with my newer devices (Android 5/6). I am getting no errors in the debug view and so i realy have no glue where to start. May this is a typical error? Googling it has no success, but i am also not sure, which code i can give you, to help me.
I have created a new Project, based on the same template. Here the drawer icon is shown also with Android 4.4, so it must be some stupid mistake by me.
Any help or hints would be very helpful, because i do not want to use the "sledgehammer" methode and creating a new projekt and copy line by line into it.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Best regards,
Jacob
In case you haven't solved the problem yet, you should provide more info and piece of code about how you set your navigation drawer icon and whether you are using appcompat or not. check this code and let me know:
Under extends Fragment object
Code:
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
// Sync the toggle state after onRestoreInstanceState has occurred.
mDrawerToggle.syncState();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mDrawerToggle.onConfigurationChanged(newConfig);
}