Metro.Just scheme


A week on habré raging passions on the program Yandex.Metro. Haven't included, I decided to look again. And suddenly I caught myself thinking that the app annoys me.

Do not argue, this is a great app for couriers, visitors and certain categories of passengers who are comfortable with automatic location detection, search, computation time, etc.
But the Muscovites, who all his conscious life reached by metro from their sleeping areas to work, to visit, on a date and football, approx know the location of the stations and use the scheme just to refresh your memory and clarify where to change trains. All!
What happens to Yandex.Metro. I launch the app and first thing it starts looking for updates. Why? Like metro do not open every hour, what's the hurry. Okay, a couple of seconds passed. Next, run the program. One careless swipe of your finger and the screen POPs some buttons: Show the map (???), The name of the station Here, Here. Similar to the behavior of some sites, hung with advertising and pop-UPS. In this case, it turns out that they have something to send to their servers taking resources from my device.

Realizing that the use of 1% of all functionality nice app, came across several reviews of geeks who just took a picture of the diagram and use it. Remember that before the advent Yandex.Metro, and maybe even earlier, running on Windows Mobile 5.0, I did that. I was not satisfied with just one detail to look for metro scheme in the gallery of the top pictures is not wanted.
And then I decided to write a simple program with a straightforward name of Metro.Simply scheme for Android. The funny thing is, I didn't even have to write code for it. Copy and paste. From design to placing the application in Google Play it took about 30 minutes.
The metro and the logo in vector I took on a site of Studio Lebedev. About the scheme it is clearly written — take it and enjoy it. Logo terms of use is not found. Artemy wrote personally to your e-mail does not hide. About fifteen minutes later got the answer — Yes.
Converted vector image to PNG. On Android Asset Studio to create the icons. Launched the project and put the icons in the right subfolders. Then choose a theme without a header to increase useful space.
To embed images in Android using the ImageView. But out of the box it does not support scaling and processing gestures. But at the time I saved to my bookmarks library TouchImageView. Yesterday, browsing your bookmarks, I saw the forgotten link and thought that it would be necessary to study it. Today I decided to check, not will it fit to my application. Library — it was too loudly. Simply copy class that extends ImageView, and paste into your project.
Placed the component in the markup
the
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="parent"
android:layout_height="parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">

<EN.alexanderklimov.metrosimpeschema.TouchImageView
android:id="@+id/imageViewSchema"
android:src="@drawable/moscow_metro"
android:layout_width="parent"
android:layout_height="parent" />

</FrameLayout>

All! Run the program and admire. Component out of the box support touch with two fingers, double tap and motion pictures under your finger. All the same, and Yandex.card.
Tested on an old Samsung S2, then on the tablet and new phone. I was completely satisfied. The screenshots are badly squeezed for savings, so they are a little tatty.



If anyone needs the address in Google Play — Metro.Simply scheme.

Here is my source code, any programmer will be able to reproduce my steps alone.

Upd. Habr does not allow to write two articles in a row in the category "I'm a PR". Therefore, the continuation had to publish in your blog.
Metro.Moscow.Part two
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Tactoom. How about the middle of blogging?

SumIT Weekend of 18-19 February, the idea for iPad and Hackathon

Knowledge base. Part 2. Freebase: make requests to the Google Knowledge Graph