Can you make a EditText input from right to left in Android? - android-studio

I was asking if you can control input on an EditText to move from right to left? The EditText would have to support insert/delete etc. from right to left as well. Like if I keep inserting 1, 2, 3 it would be like 321. Is there a way to do this?

Have a Look at this Can you make an EditText input from right to left?. Anyways answer to your problem is android:textDirection="rtl"

Related

MapView - how to disable it and keep it swipeable to left and right fragments?

What I'm trying to do is to make an "untouchable map". I need to be it kind of a background instead of a real map, and I need to keep it swipeable to left and right fragments. How can I implement that? I've tried to put a layer overlay, but it doesn't work, it's keep focusing on the map when I try to swipe to other fragment. Maybe there is a "switch" for the XML part? Thanks!
map.getUiSettings().setAllGesturesEnabled(false); - this is exactly what I was looking for.

Android Studio Widget, Text Field, Large, Medium and Small Text is missing all I have is Plain which gives a Name. How can I get it and others?

I'm looking at Youtube examples and I see the instructor has Widgets I don't have, Like different size Text Fields and an analogue clock.
Is there somewhere I can get more Widgets?
I obtained a text size same as to the "tutorial" using:
android:textAppearance="#style/TextAppearance.AppCompat.Large"
Looks like AndroidStudio has undergone some change. Best option is to enter the "Text" mode and type the style yourself. For ex. if you need an equivalent of LargeText view, then add a TextView and move onto the Text mode and add this line:
android:textAppearance="#style/?android:attr/textAppearanceLarge"
Or you could also edit the properties of TextView too.
You should add this line android:textAppearance="#android:style/TextAppearance.Large"
inside the TextView after clicking on the Text tab near Design tab located in the middle left to the right of design tab.
but you have to consider that first of all you need to drag and drop TextView from Widgets into the user interface or Design section.
Click into the Text tab located middle left to the right of the Design tab, find the TextView element and within it simply enter this line of code:
style="/?android:attr/textAppearanceLarge"
Remember this line of code has to be within the element in order for it to work.
Go to properties and then select text appearance and select app.
combat.large
Use this:
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge"
Add it inside your Textview tag.

How to have multiple layouts in one activity in android?

What i want in my activity is two buttons on the top in one single line.. and below that i want a framelayout in which i want an imageview and i wil add my custom view on the top of imageview. I tried a lot but i am having a lot of confusion.
Shown in the image below is somewhat like i want.
I want to use framelayout because i want to add my custom view over my imageview. But if i add button on framelayout it comes above the image. It is getting really confusing and messy for me.
I did'nt know that we could nest two layouts in a single activity. I nested LinearLayout with FrameLayout and my problem got solved.. Cheers!

A keyboard with a UITextField

I have a table listing some strings, and what I want is when I tap the add button on the navigation bar, a keyboard with a textField would jump up, so I can input a string in the textField, then when I tap the return key, the keyboard disappear as well as the textField, and the new string is added to the table.
I already make up a nib file with a toolBar containing a textField, and I just failed to go on.
How can I implement this idea? Use the inputAccessoryView? If so, that means the inputAccessoryView of the textField which belongs to the toolBar is gonna be the toolBar itself!
This seem kind of weird and I have not been able to make it work till now.
Or is there another way for this idea?
Thanks a lot!
I've solved the problems by using notification instead of inputAccessoryView.
There is a sample code in XCode called "KeyboardAccessory", and it gives a good example about using keyboard notifications!
Or custom a view with a tab, and set it as the textField's inputAccessoryView, that would also work!

How can I prevent edit text being hidden by the Android keyboard?

I have around 4-5 edit text on the screen, now when user types, some EditText are hidden behind the soft keyboard and user can not see what he is typing.
Please give ideas what can be done.
Thanks
Ok.. I got the solution put a LinearLayout containing all TextViews and EditText in scroll view and then when user presses next view is scrolled and user will be able to see what he is typing.

Resources