Am developing an android chat application. Everything works well but except for one thing; I want to set the visibility of a layout to gone and then set a different layout to visible when user starts typing in the edittext like the one implemented on whatsapp.
But I cant seem to figure it out.
Any help will be appreciated
Basically, what I want to do is set the visibility of a layout which contains an image button to upload image to gone and then show a layout which contains an image button to send the message or text in the edittext to visible when the user starts typing
Can you explain in detail?
Do you wan edit text to come up when keyboard is hoped up.
then use below in your manifest.
<activity
android:name=".Activityname"
android:windowSoftInputMode="adjustPan">
If not, then please explain your question in more detail
Take a look at the TextChangedListener. With help of the TextWatcher you should be able to run commands when the input changes.
Please describe in more detail, if you need further assistance.
Related
I am building an E-Commerce App and I have an activity showing image slider, description and related items, and in image slider I have put an arrow to change the product on the arrow click I want to be in the same activity but data should be different.How should I do that need your help guys.
You should try doing it by urself in one of the many ways its possible to. Then we could provide some help with your idea or show you better solution. I think you are looking for RecyclerView (https://developer.android.com/guide/topics/ui/layout/recyclerview). It lets you show some similar views but with different data inside. Also as an item inside RecyclerView you can try CardView.
Using only RecyclerView you can also use:
https://stackoverflow.com/a/46084182/8713068
You can also search for a library that has everything you want inside already implemented. For example the first library that came out after i typed it in google : https://github.com/Ramotion/cardslider-android.
I would like to know if it is possible to set voice listener on my searchView, like the suggestion listener:
http://developer.android.com/reference/android/support/v7/widget/SearchView.OnSuggestionListener.html
I want to overwrite the default behavior. I don't want to launch another activity. I just want to get the recorded voice as a string and use it.
I read what you ask for, but Why don't you want to use an activity?
Just in case this can help you, you should take a look at these if you havn't till now:
Andriod developers:
http://developer.android.com/guide/topics/search/search-dialog.html#VoiceSearch
Examples:
http://www.codeproject.com/Articles/821839/A-Beginners-Guide-to-Working-With-Speech-and-Audio
http://www.truiton.com/2014/06/android-speech-recognition-without-dialog-custom-activity/
Hope it helps,
yakobom
To show the microphone icon you need to add a search configuration and set it to your SearchView. See this question and my answer here https://stackoverflow.com/a/48527608/114549
I am trying to build an app using the new material design specs.
I am currently trying to get a cusdtom FAB layout working, similar to the one in the new Inbox app.
I have one main button, which when clicked, expands to several smaller ones.
However i want to add a textview to the left of the smaller buttons, like the inbox app.
I cant seem to find a way of doing this.
The floating action button i am using is based off this library, but with a few modifications https://github.com/futuresimple/android-floating-action-button/blob/master/README.md
If someone could suggest a way of doing this, it would be much appreciated.
Thanks
Corey :)
I have an app that uses this RibbonMenu and I wanted to know if it was possible to use the menu items to change the ContentView of the Activity instead of another activity to reduce the size of my app. I've tried doing this already,and it changed the content view perfectly, but i was not able to press the home button. I'm in a bit of a rush here, but i'll try to post code if anyone asks for it. thank you!
Menu items is UI element. It does nothing by itself. It however can trigger some more actions in your code. As for changing activity layout, yes, you can call setContentView() at any time you want.
to reduce the size of my app
this is not the way optimalizations should be done
I'm a noob Android developer. I learned of the basic UI controls and different types of views that I can utilize.
Now my problem is, I need to show list of items using the ListView that is being shown full screen. when I click on an item it should load a TextView full screen. when I click the back button it should go back to ListView again..
Can someone point me where I can learn such stuff?? any support or even external link is greatly appreciated.
Thanks in advance.
Write your text view in a different activity. And when ever you click on a list item start that activity putting your text in the intent. Fetch the text in that text view activity in onCreate() from the intent and set it to text view. Obviously when ever you click back you 'll come back to list view activity.
Check out this website... http://www.xtensivearts.com/topics/tutorials/
He's no longer updating but what you've asked is covered in the video tutorials he did create. It's not answered directly but by watching them, you should have a solid enough understanding to piece it together yourself.
Best of luck!