Profile

Cover photo
Sebastian Roming
Attends FernUniversität Hagen
Lives in Dunningen
910 followers|469,867 views
AboutPostsPhotosYouTube+1'sReviews

Stream

 
Lollipop on Nexus 7: check. 
2
Add a comment...

Sebastian Roming

Shared publicly  - 
 
It's a bit scaring. Everytime I open Google+ (web or app...) the FIRST post is from +Sebastian Mauer :D
2
Sebastian Mauer's profile photo
 
"Quality Posts" is my middle name ;)
Add a comment...

Sebastian Roming

Shared publicly  - 
 
 
Android App Tricks: Custom Settings Dividers

Soon after I released URL Shortener [0], few people asked me how I implemented certain features in the app. Following +Cyril Mottier's initiative when Capitaine Train was launched, I thought it would be a good idea to humbly contribute to the Android community by sharing some tricks and things I've learned along the way.

If you have an app with a fair amount of features, chances are you have a Settings activity. Some will argue Settings are not necessary altogether, but sometimes one option can't fit all. There is actually a good article in Android documentation about when to "make it a setting" or not [1].

Luckily, Android has a nice set of APIs making it easy to create simple Settings. You don't have to bother creating custom layouts, views and listeners or a lot of boilerplate code. You can build Settings using subclasses of the Preference class, all defined in an XML file [2].

As a result, Settings look the same in all apps - and that's a good thing. People statistically never go to Settings though (in URL Shortener, it's less than 0.5% of visits according to Google Analytics). Another good reason not to invest much time on it and stick to standards.

Still, I felt Settings were a bit too boring with default grey text and titles, making it hard to quickly navigate between sections. A cheap way to fix this is to customize dividers with your brand color. I think it gives the screen a much more appealing touch.

All you have to do is giving your SettingsActivity a custom theme in AndroidManifest.xml, and override listSeparatorTextViewStyle.

<activity
  android:name="SettingsActivity"
  android:theme="@style/MyAppTheme.Settings"/>
  
<style name="MyAppTheme.Settings">
  <item name="android:listSeparatorTextViewStyle">@style/ListSeparatorTextView</item>
</style>

You just need to provide a custom text color and a 9-patch [3] for the underline.
Unfortunately, the default Widget.TextView.ListSeparator from Holo is private, meaning you can't simply extend it that way:

<style name="ListSeparatorTextView" parent="android:Widget.TextView.ListSeparator">
  <item name="android:background">@drawable/list_section_divider</item>
  <item name="android:textColor">@color/theme_primary</item>
</style>

Instead, you need to extend the closest public parent and apply the full style of ListSeparator:

<style name="ListSeparatorTextView" parent="@android:style/Widget.TextView.ListSeparator">
  <item name="android:layout_width">match_parent</item>
  <item name="android:textAllCaps">true</item>
  <item name="android:background">@drawable/list_section_divider</item>
  <item name="android:layout_height">wrap_content</item>
  <item name="android:textStyle">bold</item>
  <item name="android:textColor">@color/theme_primary</item>
  <item name="android:textSize">14sp</item>
  <item name="android:gravity">center_vertical</item>
  <item name="android:paddingStart">8dp</item>
</style>

The good thing? Material Design already takes care of using your colorAccent for Settings dividers. So if you plan your app's theme to extend some android:Theme.Material.xxx in values-v21, it will be done for free (but only for Android L and above).

#android #AndroidAppTricks  

[0] https://play.google.com/store/apps/details?id=com.tdevaux.googleurlshortener
[1] http://developer.android.com/design/patterns/settings.html
[2] http://developer.android.com/guide/topics/ui/settings.html
[3] https://drive.google.com/file/d/0B8bJ81jFo9yQV1JaZzJjYTA5X1k/edit?usp=sharing
11 comments on original post
1
Add a comment...

Sebastian Roming

Shared publicly  - 
 
 
I'm selling the #domains techlr.com and licensr.com.
Please contact me if you are interested.

Thanks for sharing :-)
View original post
1
Add a comment...

Sebastian Roming

Shared publicly  - 
 
I'm selling the #domains techlr.com and licensr.com.
Please contact me if you are interested.

Thanks for sharing :-)
1
1
Sebastian Roming's profile photo
Add a comment...
Have him in circles
910 people
Karim Kadena's profile photo
Cathy Mashup's profile photo
Douglas Stewart's profile photo
Marc Lamschick's profile photo
Murat Aydin's profile photo
Thomas Reindler's profile photo
Jomar Tigcal's profile photo
Taki Badr's profile photo
James Banks's profile photo

Sebastian Roming

Shared publicly  - 
 
Anyone interested in an OnePlus invite? (OnePlus One 64GB Sandstone Black). I have 2 invites! 
1
Dan Gramadă's profile photoRichard Nijenhuis's profile photoSebastian Roming's profile photopavan reddy's profile photo
9 comments
 
thank you
Add a comment...
 
Someone needs an Inbox Invite? I have one left...
1
Sebastian Roming's profile photo
2 comments
 
As already said: I had ONE invite left. 

Sebastian Roming

Shared publicly  - 
 
I have one to sell, including a third Controller and sie games. Interested? ;)
 
Arghh... hard to resist :)
View original post
1
Add a comment...
 
 
Ich habe noch 2 Einladungen für das OnePlus One übrig und möchte diese gern mit den Nutzern dieser App teilen. Wer noch eine braucht oder jemanden kennt der eine braucht, gibt einfach +1, schreibt einen Kommentar oder noch besser: teilt diesen Beitrag.

Ich werde dann am 02.08. im Laufe des Tages zwei Glückliche zufällig aussuchen, die jeweils eine Einladung bekommen.

Bitte nur mitmachen, wenn wirklich Bedarf besteht. Es wäre doch sehr schade, wenn die Einladung ungenutzt bleibt. Die Einladungen berechtigen nur zum Kauf des Smartphones, bezahlen müsst ihr es dann selbst!

#oneplusone   #invite   #giveaway  
 ·  Translate
38 comments on original post
5
1
Andreas Tischer (funkydrgonzo)'s profile photoMichel Racic (rac)'s profile photo
 
vielen dank für den post. über einen invite würde ich mich massiv freuen. lg.
 ·  Translate
Add a comment...
 
Ich möchte beim #techlounge #cebit2014 Livestream die Google Glass gewinnen! http://nbn.li/techlounge2014
 ·  Translate
1
Add a comment...
People
Have him in circles
910 people
Karim Kadena's profile photo
Cathy Mashup's profile photo
Douglas Stewart's profile photo
Marc Lamschick's profile photo
Murat Aydin's profile photo
Thomas Reindler's profile photo
Jomar Tigcal's profile photo
Taki Badr's profile photo
James Banks's profile photo
Work
Occupation
Software Engineer
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Dunningen
Previously
Schramberg
Links
Contributor to
Story
Tagline
Software Engineer / Firefighter / GDG Black Forest & GDG Stuttgart / PHP Evangelist / loves good whisky
Introduction
I love to use and develop with Google Technologies and / or Google Products. Also I am the founder of GDG Black Forest and a member of the board at GDG Stuttgart. Passionate PHP Evangelist. Like giving talks and contributing to the Open Source Community.

If you need more information about myself, visit my personal website or just ask Google, and if you are interested in me giving a talk on your event: just contact me.
Education
  • FernUniversität Hagen
    Business Information Systems, 2011 - present
  • FernUniversität Hagen
    Computer Science, 2011 - 2011
Basic Information
Gender
Male
Looking for
Networking
Apps with Google+ Sign-in
Sebastian Roming's +1's are the things they like, agree with, or want to recommend.
Gradle, please
gradleplease.appspot.com

Gradle, please. dependencies { // Google Play Services compile 'com.google.android.gms:play-services:' // Support Libraries compile 'com.and

Loot Crate
plus.google.com

Epic geek and gamer gear delivered monthly.

Instagram
market.android.com

Over 200 million users love Instagram! It's a simple way to capture and share the world's moments on your Android. Customize your photos and

This Week in Android Development - January 13th 2014
www.youtube.com

Android Design in Action: 2013 Recap - http://goo.gl/qW4E50 UXD - What is Context and Why Does it Matter? - http://goo.gl/1gnCkY DevBytes: P

Navigation Drawer Android Example | JavatechIG.com
javatechig.com

Navigation Drawer Android Example. Navigation drawer is a panel that displays the app’s main navigation commands on the left side of the scr

IBAN Rechner
market.android.com

Im Rahmen der S€PA (SEPA) Einführung 2014 werden alle Kontoverbindungen in Europa auf IBAN (International Bank Account Number) und BIC (Busi

NewGadgets.de
plus.google.com

Immer auf dem neusten Stand der Technik!

Gmail
market.android.com

Gmail is built on the idea that email can be more intuitive, efficient, and useful. And maybe even fun. Get your email instantly via push no

Maps
market.android.com

Explore new places, discover local favorites, and navigate your world with Google Maps. Available on Android phones and tablets with a simpl

SMS Backup +
market.android.com

Automatically backup SMS, MMS and call log entries using a separate label in Gmail / Google Calendar. It is also possible to restore SMS and

Google Accounts
developers.google.com

Google Accounts. Sign in to personalize your Google experience. Google has more to offer when you sign in to your Google Account. Sign in on

Google Plus Nick
gplus.to

Nick Name. Your Google+ ID. Note&#39;s Your username; Could be at least 3 characters to at most 25 characters, Should not contain numbers or

Google Developers
plus.google.com

Inspiring developers everywhere

WhatsApp Messenger - Apps on Android Market
market.android.com

Get WhatsApp Messenger and say goodbye to SMS! WhatsApp Messenger is a smartphone messenger available for Android, BlackBerry, iPhone, Windo

DRK und Feuerwehr üben Zusammenarbeit
dunningen112.de

Webseite der Feuerwehr Dunningen mit den Abteilungen Dunningen, Lackendorf und Seedorf

Feuerwehr Dunningen
dunningen112.de

Webseite der Feuerwehr Dunningen mit den Abteilungen Dunningen, Lackendorf und Seedorf

Kleinbrand Turn- und Festhalle
dunningen112.de

Webseite der Feuerwehr Dunningen mit den Abteilungen Dunningen, Lackendorf und Seedorf

Hervorragendes Rindersteak mit Kräuterbutter. Schneller Service, super Ambiente, freundliches Personal. Die Speisekarte nicht zu überladen - so lass ich mir das gefallen. Sehr zu empfehlen!
Quality: ExcellentFacilities: ExcellentService: Excellent
Public - 2 years ago
reviewed 2 years ago
Schramberger Tradition. Ein Eis? Dann führt kein Weg am Rino vorbei.
Quality: ExcellentAppeal: ExcellentService: Excellent
Public - 2 years ago
reviewed 2 years ago
2 reviews
Map
Map
Map