May i know the name of the below placed image control, also please tell me how to implement similar control in my application.
This control appears, after long press on contact image.
It's called a Quick Actions Popup, and it's not default for the framework... you have to create it yourself.
Another SO question asks about it and the answers have several links to pages telling you how to do it (there's even a couple of code repositories you could download in there).
Good luck.
That is not a built-in control, but it's not difficult to roll your own.
All you need are some nicely crafted images, the outer part can be a LinearLayout, which contains another LinearLayout, which in turn contains 3 Buttons, and you are done with the UI of the control.
The rest of the implementation is to calculate the coordinates to place this control.
Related
I was looking for some auto event capture for every screen and button clicks without manually putting them on every single button or Activity/Fragment and I could find few. But I am really curious to know what to going under the hood and how are they getting these info about screen views and button clicks.
Looking for some tips to create my custom auto capture events in Android App.
You just have your tracking logic in global screen renderer, or button click listener, using whatever available there (screen ids, button ids, class names) to put in your events.
However, this only works if you don't hack around and always use the same methods for rendering and navigations.
Soon enough, the product owner will ask you to make a transparent screen, or to have a screen that flows from right to left, or a screen that opens only to a 1/3 of the screen, or a pop-up, or an overlay, or a weird iframe. You'll have to have defined tracking for those separately.
And then, on top of that, the Analytics team will donate their bit of discord where they don't want to see transparent screens as new screenviews, but also track red buttons differently from green ones. And Toggles should be tracked differently too. By the way, the screen class names aren't useful for analytics, please name them manually. And also, buttons that look like links should be tracked this special way. And don't track the buttons that are just tooltips. Oh, the iframes. The iframes issue messages on activity in them, so listen to those and translate them to events please.
Now, this is an example of what it's going to be like. In real life, it's even more than that. If you have to add an exception for your universal tracking every time Analytics doesn't like it, you will end up with a mess of nested logic that is impossible to maintain. Also, every change to it will cause more bugs in unexpected places than fixes.
Still, universal tracking makes sense when you don't have dedicated analysts or a large marketing team and so you don't want to be able to answer complex business questions frequently.
In all other cases, it's better to hardcode analytics in a structured manner, maybe mapping screen ids to screen names in one neat place, then have analytics sdk wrappers to store the core logic and make use of the name mapping,
[SOLVED = I can't add to it, it's based on the active ROM]
Sorry for the vague questioning, I wasn't sure quite how to create it.
I'm wanting to add toggle buttons, or at least other elements into this part of android;
I can't find any documents on how to add to this element of Android, and I'm wondering if we actually can? Does anyone know what this element is even called and can link me to the appropriate android doc?
Thanks!
This is an application that ships with Android, hence you cannot change its behavior. It has a predefined set of elements that can be present on it. If you want to create a custom version of it, you will need to create a custom ROM.
This looks similar to the quick settings screen on my Samsung and it created by the phone manufacturer. You could create a custom ROM, but I don't think this is what you really want.
The closest I think you can get is the notification bar, which can use a custom layout:
Change Notification Layout
Also Take a look at the WatchOn app, which has a relatively complex control embedded into the notification screen:
Kindle reader has a unique interface compared to all other reading apps. It takes a very large text and show it on screen in such a way that you dont have to scroll but you have to swipe to go to the next page. It reduces the text to be shown on the screen based on the screen size.
I have tried a lot but I am not able to see how they do it. There are number of questions on SO related to this but none of those answered were satisfactory. In many cases the problem is solved by adjusting the font of the text rather than text.
I think the correct approach to achieve this would be the following but I am not sure if all of it is possible in Android.
Create a Buffered reader and read each character.
Go on adding that character to the TextView
Check if the character is going beyond the visible area.
If yes stop and wait for the flick action else go to step1
If anyone can tell me how to achieve point 3 in android rest should be easy. Feel free to suggest other alternatives as well as long as they are not above web view.
A lot of apps that I have (such as gmail) has a feature where you can swipe left and right to go from one record to another. In gmail, this navigation takes you from one email to the next (or previous, depending on which way you swipe). When you reach the end, you get this blue halo effect, and the swiping in that direction doesn't work. My question is, what is this navigation called? Is it something in the sdk, or is it written by the developer for each app? Can I use it in my app where I have data stored in the sqlite database that I would like to show one record at a time this way? Is it available in all sdk versions?
I would search for it, but I don't know what it's called so I can't really think of any good search terms here. If someone just points me in the right direction, I can read the documentation and figure it out.
The component you are looking for calls ViewPager. You'll find in under the compatibility pack jar.
android viewPager implementation
http://android-developers.blogspot.co.il/2011/08/horizontal-view-swiping-with-viewpager.html
You can use something called a viewFlipper if you want to use animations.
There's a nice tutorial here: http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/
Good luck :)
I am looking for some help, not being spoon feed source code (which from some of the threads I have read on this forum wouldn't happen anyway). I am really just wanting to know if what I have conjured up in my head is even possible or not, and if it is if I could get pointed in the right direction. So, I am looking to add a "view", doesn't really matter what type the concept would be the same for all of them, to appear when receiving or placing a phone call. You know the one that has the little droid waving at you or a photo, etc. The only thing is that I would only want like the top 30px to be this "view".
For instance, you receive a phone call and at the top of your screen on top of the receiving call window is a TextView with a note about this person (i.e. - he stinks).
The only thing I have been able to come up with so far is that I would have to bring up a layout that was either invisible or gone, but have yet to figure it out as of yet.
Am I barking up the right tree or do I need to find a different tree to sniff. Any and all help would be appreciated.
I honestly don't know the answer to this, but if it were possible then presumably you would have to have your own custom Activity launch in response to an incoming phone call event. This Activity of your own would replace the standard system phone application. So I did a search on here and the most vaguely related previous questions I could find within a short time are these:
Is it possible to write a new "phone" activity, and if yes then how?
Launch an activity at end of a phone call on Android
Answers on those seem to suggest the phone would need to be rooted before you could replace the standard phone app for receiving calls.