Question: I followed [this tutorial](http://www.joellipman.com/articles/google/android/application-development/android-os-add-googlemap-as-fragment.html) to add a map to one of my tabs. It works, but when I open the map tab I cannot swipe up/down, zoom in/out (except when I double click). Swiping left/right works, but the map moves very little. I made a customViewPager, and it disables swiping the tabs, but does nothing for he map.

At first I used tabActivity and my map fragment worked as it should, and looked like this:

```
   mapActivity extends FragmentActivity...

```

Since tabActivity is deprecated I added sliding tabs, following the tutorial above. Map could not be added with FragmentActivity, only with Fragment so I changed map fragment to: 

```
   mapActivity extends Fragment...

```

Now I have the following problem - I cannot navigate the map. Swipe and touch inputs are not detected. I cannot move up or down, zoom in or out, and the only thing I can do is move from left to right, but it is very slow.

Answer: 
One solution to this problem was introduced in Java 8 in the form of default methods in interfaces. It allowed to add new methods to existing Java SE interfaces without breaking existing code, since it supplied default implementation to all the new methods.

For example, the `Iterable` interface, which is widely used (it's a super interface of the `Collection` interface) was added two new default methods - `default void forEach(Consumer<? super T> action)` and `default Spliterator<T> spliterator()`.
Interfaces are contracts between the developer and clients, so you're right - they are carved in stone and should not be changed. Therefore, an interface should expose (= demand) only the basic functionality that's absolutely required from a class.

Take the `List` interface for example. There are many implementations of lists in Java, many of which evolve over time (better under-the-hood algorithms, improved memory storage), but the basic "concept" of a list - add an item, search for an item, remove an item - should not and will not ever change.

So, to your question: Instead of writing interfaces which classes implement, you can use **abstract classes**. Interfaces are basically purely-abstract classes, in the sense that they do not provide any built-in functionality. However, one *can* add new, non-abstract methods to an abstract class that clients will not be required to implement (*override*).

Take this abstract class (= interface) for example:

```
abstract class BaseQueue {
    abstract public Object pop();
    abstract public void push(Object o);
    abstract public int length();
    public void clearEven() {};
}

public class MyQueue extends BaseQueue {
    @Override
    public Object pop() { ... }

    ...
}

```

Just like in interfaces, every class that extends `BaseQueue` is contractually bound to implement the abstract methods. The `clearEven()` method, however, is not an abstract method (and already comes with an empty implementation), so the client is not forced to implement it, or even use it.

That means that you can leverage the power of abstract classes in Java in order to create non-contractually-binding methods. You can add other methods to the base class in the future as much as you like, provided that they are not abstract methods.