(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package de.bsr.android.util; | |
import com.example.app.BuildConfig; | |
import timber.log.Timber; | |
/** | |
* Wrapper class for Timber that evaluates <code>BuildConfig.DEBUG</code> on construction | |
* and uses Timber.DEBUG or Timber.PROD appropriately. In PROD mode, no logging is done at all. | |
* | |
* @author Sebastian Engel <engel.sebastian@gmail.com> |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle" | |
android:dither="true"> | |
<corners android:radius="2dp"/> | |
<solid android:color="#ccc" /> | |
package com.mdaisuke.sample; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.text.Editable; | |
import android.text.TextWatcher; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; | |
import android.widget.Button; |
Tried to follow the naming conventions as mentioned in | |
http://android-developers.blogspot.com/2013/08/actionbarcompat-and-io-2013-app-source.html | |
res/values/styles.xml | |
<resources> | |
<style name="Theme.Styled" parent="@style/Theme.AppCompat.Light"> | |
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item> | |
</style> |
Basic card layout with drawables and styles. | |
Missing icons: ic_action_remove, ic_action_accept and ic_action_cancel (all can be found in the standard android icon pack) | |
Example screenshot: https://pbs.twimg.com/media/BmTdvKhIYAAkrPa.png |
// Compose a single request to send to the server: | |
HttpClient client = new DefaultHttpClient(); | |
HttpPost post = new HttpPost("http://www.myserver.com/apis/users/" + userId + "/profile"); | |
List<NameValuePair> bodyParams = new ArrayList<NameValuePair>(); | |
pairs.add(new NameValuePair("first_name", firstName)); | |
pairs.add(new NameValuePair("last_name", firstName)); | |
pairs.add(new NameValuePair("street1", firstName)); | |
pairs.add(new NameValuePair("street2", firstName)); | |
pairs.add(new NameValuePair("zip", firstName)); |
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" | |
android:interpolator="@android:anim/accelerate_interpolator" > | |
<alpha | |
android:fromAlpha="0" | |
android:toAlpha="1" | |
android:duration="2000" > | |
</alpha> |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle" | |
android:dither="true"> | |
<corners android:radius="2dp"/> | |
<solid android:color="#dbdbdb" /> | |
</shape> | |
</item> |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle" | |
android:dither="true"> | |
<corners android:radius="2dp"/> | |
<solid android:color="#ccc" /> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.