Android EditText just like Google's Allo messaging app [closed] - android

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to design edit-text just like Allo messaging app in which on scrolling down the list of messages, message-view is still visible behind that edit text view as shown in image.
How to design this type of edit text view?

Aligning the EditText at the bottom in front of the list should be pretty easy. I would recommend the following layout:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ScrollView>
<EditText
android:layout_alignParentBottom="true"
android:layout_margin="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
You will still have to add elements to your ScrollView or replace it with a ListView, but this should do the trick.
As a side note, elements in the layout file that are added last will be 'in front' of the other views. Because the last element in our layout is the EditText, it will always hover on top of the ScrollView.
Hope this helps!

Related

Android: Any Ideas on how to make a Hearthstone/Magicka type of card? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Details:
I was wondering how to create an object in android that has multiple layers of graphical elements. A good example would be a Magicka or Hearthstone card. They have 3 elements: the background of the card, the image of the creature, text describing something + stats.
The idea behind this is to have fewer images that can be put together to create a great amount of cards. I should mention that in my case the background card and the creature are vectors (SVG).
How do you put all of these elements together in one card-thing that can later be displayed&animated?
You can use proper layout.
Most reasonable to me is using RelativeLayout.
You can put all views:
background (can be a separate view or background view param)
image (ImageView)
text (TextView)
For example:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="160dp"
android:layout_height="240dp"
android:background="#color/aaa">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:src="#drawable/cat_filmy_main" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:text="Movie Killer" />
</RelativeLayout>
And the effect is:
Also, consider creating your own view. How to do that can be found here:
https://code.tutsplus.com/tutorials/android-sdk-creating-custom-views--mobile-14548

How to make each cell of listview like card or box? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to make a listView where the each cell is separated by some dp's like a card in cardView and also give some shadow. I want something like this how can I get it ?
it is called CardView
CardView is another major element introduced in Material Design. Using CardView you can represent the information in a card manner with a drop shadow (elevation) and corner radius which looks consistent across the platform
compile this library
compile 'com.android.support:cardview-v7:25.3.1'
than add cardview to your layout like this
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="10dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
// add all your controls here
</LinearLayout>
</android.support.v7.widget.CardView>
for more information androidhive or here or Android Developers

how to make one screen working for mutlple tasks in android [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to make an android app which contains four buttons on top of screen and when pressing each button i need different screens below those four buttons.please tell how to make it.
You should Use Fragment...
You can build an activity that contains 1 fragment for buttons, and one view for replace it with a fragment
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
class:"com.example.ButtonFragment"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
tools:layout="#layout/button_fragment" />
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="10"
android:id="#+id/LayoutForReplace"/>
Then you can set action listener of buttons like this:
getActivity().getFragmentManager().beginTransaction().replace(r.id.LayoutForRepalce, new SomeFragment()).commit();

Android Top and Bottom menu [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am new in Android and i don't have much programming knowledge. I want to create top and bottom menus for my android app. i have attached a sample image. Please someone help me
There are two possibilities of how you can achieve something like that:
1) Use a split ActionBar (more information on the ActionBar)
2) You can define it yourself inside an XML-layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="#+id/top_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
</LinearLayout>
<!-- Your page-content can go here -->
<LinearLayout
android:id="#+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" >
</LinearLayout>
</RelativeLayout>
Design two custom layout xml one for top menu bar and one for bottom menu bar. And include these xml file in your main xml. Then call the button in custom xml same as calling from main xml in the java file.

Join the two EditBox into 1 EditBox in Android [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am new in android.
I want to join two EditBox into 1 EditBox.
Anyone can help me here.
Thanks in Advance.
Give background to a linear layout with vertical orientation and add two transparent text box in it.
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/background_of_big_edittext"
android:orientation="vertical" >
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/transparent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/color_of_your_divider" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/transparent" />
</LinearLayout>
I dont know if you are talking about the UI. But you can take the texts from the edit text by get text method. Why cant you join both the texts to a single string and use the combined string in program?

Categories

Resources