Tag: android-layout

Android: animated custom views

EDIT: Answers sum up I found 5 ways to animate in Android: Animate the properties of a View with Property Animation to smoothly change rotation, alpha, scale etc. Frame Animations (AnimationDrawable): change the pictures quickly, so that it looks animated Design the images with vectors (VectorDrawable) and animate them by editing them over time with […]

Getting Can't find common super class of after enabling Pro-guard

After enabling pro-guard, I was receiving around 1000 warnings. So after adding rules and following this and this answers on Stackoverflow, I am now receiving 1 warning and 1 error. This is what i am getting now. Warning:Exception while processing task java.io.IOException: java.lang.IllegalArgumentException: Can’t find common super class of [com/loopj/android/http/MySSLSocketFactory] (with 1 known super classes) […]

Items inside GridView getting repeated when screen scrolls

I’m using a GridView to show a set of Categories that user can chose. Each item of the grid is consisted by an ImageView and a TextView, both retrieved from server. When an item is touched, another activity is started. I thought everything was going right, until I’ve noticed that some itens were getting repeated […]

Dialog activity to wrap content

There have been similar questions to this related to dialog activities and how to make these full screen, but I have a slightly different problem. I want these dialogs to wrap the activity content. Now, the “dialog activities” all inherit the following theme, <style name=”tabDialog” parent=”@android:Theme.Dialog”> <item name=”android:windowBackground”>@drawable/panel_background</item> <item name=”android:windowNoTitle”>true</item> <item name=”android:windowFullscreen”>false</item> </style> Example of […]

Android:Textview with vertical scrolling text

This question already has an answer here: Making TextView scrollable on Android 21 answers

SplashScreen with Vector streched full screen

I did my splash screen with this tutorial and it works great. https://www.bignerdranch.com/blog/splash-screens-the-right-way/ Basically I set up a splascreen through theme: <style name=”ThemeSplash” parent=”Theme.AppCompat.NoActionBar”> <item name=”android:windowBackground”>@drawable/drawable_splashcreen</item> </style> I wanted to put a vector image inside like this: (drawable_splashcreen) <item android:drawable=”@color/color_background_splash_screen” /> <item android:drawable=”@drawable/vector_najdiflet_logo” /> The image will streched through the full screen. On API 23 […]

FragmentTabHost – No tab known for tag null

Few days ago I implemented TabHostFramgent in a Fragment with a NavigationDrawer, and I faced with a problem that is the following error : java.lang.IllegalStateException: No tab known for tag null The thing is that all works perfectly since my first item list of my NavigationDrawer is my TabHostFragment, so it works perfect, but the […]

How to make Android 4.0 apps backwards compatible?

Android 4.0 (ICS) has lots of new UI guidelines which are great. The problem is that going forward, I’m not sure how to build an app for Android 4.0 and make sure that the app looks the same/similar on devices running Android 2.2 and 2.3. There is the Android compatibility library, and a backwards compatible […]

Android: ViewPager gets stuck in between views

I have a ViewPager which swipes between Fragments. I’m using a FragmentStatePagerAdapter to feed the Fragments to the ViewPager. If the user swipes left at a normal pace, and then swipes right very quickly, they can get the ViewPager into a weird state where it shows multiple Fragments. For example, if the user is on […]

Add Icons to Android Navigation Drawer?

I have scoured the web for an answer to this question but cannot seem to find one, even in the official Android documentation. I am in the process of creating an app that implements Android’s new Navigation Drawer layout. Documentation of this layout can be found here and here. In the design documentation as well […]

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