Android list screen custom background - android

I've a screen with the following layout
Also I've a list view
How can i bring a box like background (similar to first screen) for the list view
out may look like
Is it possible to do with ListView? any suggestions, i can post the code for the current layouts if necessary

Put your list in a layout.. set the background and add padding ... for list listview again put up background.

Related

Trying to load two vertically image in a Screen

Need some help!!..
I'm try to implement a list view with two images in the initial screen, after scrolling other images can be seen.
Can you suggest anyway to implement it!
Use can achieve it by creating custom adapter for list view. Have a look :-
http://www.learn2crack.com/2013/10/android-custom-listview-images-text-example.html
You need to do some updation like removing text view from custom list layout.

Using a layout inside a layout?

Which is the best way to change the content inside a layout by pressing buttons?
I want 6 buttons and different content for each push.
I cannot use tab layout because i already used it so..
I would suggest using the gridview that is set up in API Demos. You can import it in as a new project from the Android SDK.
It works effectively like the list of 'All Apps'. However you can change the way it lays out the buttons/icons/text.
In an app I'm working on, I have a list of message types as buttons. Clicking a button changes the display to a layout for composing the selected message. To do this, I have a FrameLayout for the area I want to change. I reference this view as 'compose_content'. When I want to change the content, I run the following code:
compose_content.removeAllViews();
LayoutInflater.from(activity).inflate(R.layout.new_content,compose_content, true);
This will change the FrameLayout content to the content from the specified layout.
One solution can be to have all the 6 views inside your inflated xml and depending on the button pressed set the visibility of that particular view visible and the rest gone

GridView in android

I have a gridview of images in android. When i click any item on it, i want to show a new set of items over it. This is the screen shot .
Can this be done using gridview? Also what should be the type of view which must come over the gridview? The background should become preferably faded.
I am not so sure if you can achieve the second view using a grid view. In the grid view AFAIK you don't have any option of specifying the location of the grid elements. It just arranges it from left to right and wraps around.
But here is how I would do it -
First view can be done using the grid
view, as you already know/done.
For the second view since you want the the first view to remain in the background, there are two ways to go about this -
First option
You can use a dialog, you can create your own custom dialog which has makes it translucent.
In this custom dialog you can add further elements like images.Custom dialog example. For details on how to make it translucent you can look the sample app in android sdk.
Second option -
Use a layoutInflater. Put all your views into it.
You can display one view on top of another using the visibility attribute of the view. Layout Inflater

Customized ListView with scolling background

EDIT: Solved this by from Java-code adding headers and footers with transparent background to the ListView.
Hi, I'm trying to make a ListView that has a gradient as a background and the content inside a frame. I have some screenshots of what I'm trying to acheive.
The first screenshots shows how I want it too look from start. The list is shown in a box with rounded corners and a green background. This is acheived by adding padding to the LinearLayout surronding the ListView. However, when I add padding on top, the scrolling looks like in the third picture, which is not what I want. The first field with name and phonenumber is a header for the listview.
Any suggestions on how to make the listview behave like this?
You should use Relative layout for solving this problem.

how to design this UI

I am trying to design a UI as like in an iPhone app. The image of the design is as follows
In the above image all the white boxes are of a list view. In those list view i am placing an image View and two set of text view. I have placed a overall custom list view and in that custom list view using relative layout i have place the image view and two text view.
now i want to draw a line between the two text view and when i click on the second text view i am moving to a new activity. At that time i want to show that only the second text view is been clicked.
Use a RelativeLayout:
The image android:layout_alignParenLeftt="true"
the first two textViews android:layout_toRightOf="#id/myimage",
the other textviews below the previous ones (e.g. android:layout_below="#id/author" and with a layout_width="fill_parent"
Check Romain Guy's blog post for a tutorial on a similar (simpler) setup: http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html
Check this http://www.androidsnippets.com/clickable-listview-items
The ClickableListAdapter bases on the
API-Demo-Example "Efficient List
Adapter". It was refactored to provide
a better reusability. Additionally,
you can connect OnClickListener and/or
OnLongClickListener to each View of
your list item. This allows you to
create complex interactive lists, or
simply using a customized checkbox
version.
I had implemented this in a project minus the image view. Heres a screenshot.

Categories

Resources