Tag: android-layout

how to colour the outline of my text black in xml for android

i want to make the white coloured text in my android app have a black outline. I do not want to colour the textview so if that is your help then no i already know how to do this. I want to make this happen by using a drawable file in xml format. so is […]

Difference: android:background and android:src?

Possible Duplicate: What is the difference between src and background of ImageView What is the difference between android:background and android:src? Is their working same?

Customize FragmentTabHost set TabWidget on bottom

currently I’m trying to implement the FragmentTabHost for my project. I’m still new on this fragments but I found it very great in terms of reusing the layouts, etc which is why I wanted to push myself further on to it. Now I read the tutorials on how to create a Tabs with fragment and […]

How I can increase the touch area for controls (ToggleButton)?

I have a ToggleButton. I want to have more place for click on this button. If I add layout_width, layout_height etc. the image looks bad. I also tried using android:padding but it did not help me. It is needed for the convenience of users.

How to manage GridView

I have following code for Gridview (To make the Calendar). <GridView android:id=”@+id/calendar” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:layout_above=”@+id/rl1″ android:layout_below=”@+id/ll2″ android:columnWidth=”250dp” android:numColumns=”7″ > </GridView> Grid_Cell is as follows. <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”@drawable/calendar_button_selector” > <Button android:id=”@+id/calendar_day_gridcell” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”@drawable/calendar_button_selector” android:gravity=”center” android:textAppearance=”?android:attr/textAppearanceSmall” android:textColor=”#000″ android:textSize=”14.47sp” > </Button> <TextView android:id=”@+id/num_events_per_day” style=”@style/calendar_event_style” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:gravity=”center” > </TextView> I want to […]

How to get all Buttons ID's in one time on Android

I have 16 Buttons in my Activity and I have to initialize those inside onCreate(). Is there any way to initialize all buttons in one single line code?(loops etc.) Code should take all buttons R.id. from XML Layout and process….

Android image cropping is reducing the size of the image

I need to crop a photo from the android phone gallery and then edit it. The original size of the photo is 3264 *2448 which is displayed in my screen of size 1280 * 720 as a scaled down image. When I crop it, i am getting a image of size 185 * 139. The […]

Change Size: Android Radio Button

In my Android Application I have to use a radio button. I need to make the size of the radio button small. So I created a drawable like this <item android:state_checked=”true” android:drawable=”@drawable/btn_check_on” /> <item android:state_checked=”false” android:drawable=”@drawable/btn_check_off” /> Normal way the radio button look like this but with the small icon, it have a space in […]

Calculating the height of each row of a ListView

I am trying to make the background of a ListView scroll with the ListView. I am basing my approach on this class in Shelves, but while in Shelves everything has the same height, I can’t make the same guarantee. I have an activity like so: public class MainActivity extends Activity { @Override public void onCreate(Bundle […]

how to align parent bottom in android linear layout?

I have a linearlayout and I want to create at the bottom of it a slice. I know there are some options, but I’m a bit confused 1) android:layout_gravity:”bottom” –> this doesn’t work for me for some reason. 2) android:gravity_weight=”0″ and give the sibling before it android:gravity_weight:”1″ 3) android:height=”wrap_content” and give the sibling before it […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.