Posts Tagged ‘android’

Remove Shadow from ListView in Android

If you need to remove shadow from top and bottom of your ListView, you can do the following :

android:fadingEdge="none"

For example :

1
2
3
4
5
6
<ListView 
    android:fadingEdge="none"
    android:id="@android:id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
/>

or if you want to do it programmatically, you can use :

listView.setVerticalFadingEdgeEnabled(false);

How to Make Tiled Background in Android

Assuming you have tile pattern name type.png, you need to create xml in drawable directory.

background.xml

1
2
3
4
5
6
7
<?xml version="1.0" encoding="utf-8"?>
<bitmap
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/type"
    android:tileMode="repeat"
    android:dither="true" 
/>

In your layout, set the value of background to your xml background.

1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/background"
    >    
    ...
</LinearLayout>

Rounded TextView in Android

Create res/drawable/rounded.xml

1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
	<solid android:color="#ffffff"/>
	<corners android:radius="5px"/>
	<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> 
</shape>

Set your TextView background value to rounded.xml

1
2
3
4
5
6
<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    android:text="Hello World"
    android:background="@drawable/rounded"
/>

One App In Two Weeks

I really want to learn and improve my programming skill in Android, but never have a chance to do it. Like everybody else, I always find an excuse to get away from this. But after reading One App in Four Weeks, I start to encourage myself to do the same.

I also like the idea to build an app in a week, but apparently I’ll end up creating another junk apps. So instead I’ll make an app in two weeks and I’ll try to make different kind app each time.

I’ll document the process, idea, branding and marketing strategy.

For first app, I want to finish up my Freelance Jobs app.

Current features :
- freelance jobs from oDesk, Freelancer and Elance.
- search job

I want to fix several things. Right now, you always need internet connection and the app will always feed the latest job when you open it. It would be better if the app store the latest jobs so we don’t always need an internet connection. I also want the ability to save/bookmark the job so I know where to look at next time, and job alert is a must!

Do you have any suggestion for this app?