Septu Jamasoka has written 23 articles

Android Database Storage (SQLite)

Membuat Database dan Table Contract Class (table, and column name) [code lang=”java”] public final class SPBGContract { // To prevent someone from accidentally instantiating the contract class, // give it an empty constructor. public SPBGContract() {} /* Inner class that defines the table contents */ public static abstract class SPBG implements BaseColumns { public static…

Android ListView Layout with Custom Data

activity_main.xml [code lang=”xml”] <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.rekadia.simpleapps.HttpExampleActivity" > <!–<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"–> <!–xmlns:tools="http://schemas.android.com/tools"–> <!–android:layout_width="match_parent"–> <!–android:layout_height="wrap_content"–> <!–tools:context="com.rekadia.simpleapps.HttpExampleActivity"–> <!–android:orientation="horizontal" >–> <!–<EditText android:id="@+id/myUrl"–> <!–android:layout_weight="1"–> <!–android:layout_width="0dp"–> <!–android:layout_height="wrap_content"–> <!–android:hint="@string/myUrl" />–> <!–<Button–> <!–android:layout_width="wrap_content"–> <!–android:layout_height="wrap_content"–> <!–android:text="@string/button_fetch"–> <!–android:onClick="myClickHandler" />–> <!–</LinearLayout>–> <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/swipe_container" android:layout_width="match_parent" android:layout_height="match_parent" > <ListView android:id="@+id/list" android:fadingEdge="vertical" android:fadingEdgeLength="10dp" android:longClickable="true" android:layout_width="match_parent" android:layout_height="match_parent" > </ListView> </android.support.v4.widget.SwipeRefreshLayout> <TextView android:id="@+id/empty" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="Loading feed…

WordPress: Allow Using Ajax Request on Theme

Sometimes we need to have ajax in wordpress element in order to retrieve sub-categories, or anything. To allow using ajax, this several steps can make it happen. Add below code under the functions.php file inside theme folder. [code lang=”php”] function implement_ajax() { if(isset($_POST[‘main_catid’])) { $categories= get_categories(‘child_of=’.$_POST[‘main_catid’].’&hide_empty=0′); foreach ($categories as $cat) { $option .= ‘<option value="’.$cat->term_id.’">’;…

WordPress: How To Make Themes Support Multilanguage

WordPress is a powerful blogging platform. It can support creating and using custom theme. Sometimes, people need to create their theme multilanguage supported. In this post, the technique in order to achieve multilanguage is revealed. Create languages folder inside the theme folder. This folder will be used to saved translated text in .po and .mo…

Ask, “What Would the User Do?” (You Are Not the User) by Giles Colborne

WE ALL TEND TO ASSUME THAT OTHER PEOPLE THINK LIKE US. But they don’t. Psychologists call this the false consensus bias. When people think or act differently from us, we’re quite likely to label them (subconsciously) as defective in some way. This bias explains why programmers have such a hard time putting themselves in the…