Android custom toast as in Facebook app - java

Never messed with custom layout in Android.
What I'm basically trying to do is this:
The closest thing I've found is this, but didn't manage to make it work (tried for few hours and no result, it just won't show), and also it would require more work to make it look like the facebook's one.
I'd like to be able to call the toast everywhere from my app, too.
Thanks ahead.

Related

Custom UI for ongoing calls in Android Studio

I'm building an Android Launcher for the elderly, using Android Studio, and I'm trying to change how the UI of an ongoing call looks. I want to know if it's even possible.
I know I could do it by building a Custom ROM, but that's not a solution for me. I'm asking here, because I can't find anything online about this. All I could find was this.
I tried reading the last link 5 times now, but I can't figure out what to do. I feel like I'm overcomplicating something very simple. Remember, I don't want to change how calls are made, nor change any routines and listeners. All I want to change is the user interface.
What I want to change:
Default ongoing android call look

Google map activity doesn't show anything on api23

I have a Google Map activity.
when i run it on Api16 emulator, everything looks fine it shows me the map.
But when i run it on Api23 emulator, it shows me a blank screen whith a google logo.
What's the problem?
We really have to see the code to know what the problem is, but it might be a depreciated api. For instance the .getmap has been replaced with getMapAsynce, but you cant just change that word to fix it. read this:
Replace getMap with getMapAsync

implement list of user's facebook friends that are also using my application

I'm trying to implement an Android activity witch shows a list of images of the user's friends that use the same app also (like in Tinder app). I've searched the web for days and everything I found is too old or doesn't seem to work properly (mainly because they are all based on earlier versions of facebook SDK).
Can somebody please attached an explanation, or even better, an open source of example like that.
There's an example in the docs. I wonder how you didn't find that...
See
https://developers.facebook.com/docs/android/scrumptious/show-friends

Shortcut for creating simple dialogs in Android

Android Newbie here! I spent all yesterday trying to implement a simple dialog in my android app. I realised there is no easy way out. I mean all i just wanted to show to user is a simple choice between importing a video into the app from the gallery or recording a live video. My Parent UI is already consisting of two fragments in a split-pane style(Details on the left, gridview on the right). Now i want to show the options for importing a video as a dialog. Turns out i have to create another fragment(DialogFragment), give the fragment a UI(ListView), create UI for the list items, create adapters for my list, override getView method for my adapter with custom logic. is there no shortcut to this? While this might make me sound lazy (which i'm not btw cos i love coding), what if i want to create 4 additional dialogs, do i have to do this everytime? is there no easy way out?
btw I'm targeting SDK 11 to 19 devices.
Any help will be very much appreciated.
Have you had a look at the AlertDialog.Builder?
You could use this to build your dialog and then set your click handlers on setPositiveButton and setNegativeButton methods if you only want two options.
It was added at API level 1.

Possibly non-intrusive method to change complete android application code with a library

I'm having quite tough problem while developing a testing framework for android apps. The text got a bit long so the actual question is in bold for those that don't want to read the context.
Basically, what I'd like to achieve right now is to trace user activity while he's using the application as one of the features. There's my app that manages context data all the time and developer's app - the one being tested. My idea to do this was to get coordinates where user touched the screen along with taking a screenshot simultaneously. Then I'd use the coordinates to mark the spot on the screenshot to get the idea of what user was doing the whole time with the app. Take hints on user experience and trace crashes.
Non-system apps cannot take a screenshot for security reasons, but application itself can take a screenshot of its Activities without much trouble for non-rooted users, e.g. like here. My only hope here is to interfere with developers' code to implement the functionality of doing so while my testing app is running. Each Activity then would have to extend my overridden Activity instead of regular one, implement an interface, implement broadcast receiver etc.
I am going to write a library for developer who would like his app to be tested with my framework. I'd like it to do the job for me and be as non-intrusive as it's possible for him to use. How to achieve that the best way?
Ideal case would assume linking the library to project with maybe a small addition in manifest that'd get the job done and after just unlinking, removing that bit of xml in manifest for production.
That's an open question. I don't expect any bits of code, but some nifty Java trick, Android OS functionality or even completely other approach that'd solve my problem
I tried to be as clear as possible with the question, but that's a quite tough matter for me to describe so that could have turned out contrary. Don't hesitate to ask me for more details, to speak my mind more clearly or even rewrite the question. Thank you all very much for help!

Categories

Resources