709 views

Cross road – Game for Android Download

Crossroad – Determine the order of passing the crossroads (Right-hand traffic, Right-of-way system).
Thick line indicates the main road.
The lines have same thickness – not the main road in crossroad.

Wikipedia:
Priority to the right is a right-of-way system, in which a driver of a vehicle is required to give way to vehicles approaching from the right at intersections. The system is stipulated in Article 18.4.a of the Vienna Convention on Road Traffic for countries where traffic keeps to the right and applies to all intersections where it is not overridden by priority signs (uncontrolled intersections), including side roads and roundabouts (but not paths or earth-tracks).
The system is widely used in countries with right-hand traffic, including most European countries.
Source: https://en.wikipedia.org/wiki/Priority_to_the_right

Download

Download Cross road from play.google.com

 

křižovatky testy autoškola pravidla pravé ruky

Posted in Android Software Download, Smartphone | Tagged , | Comments Off on Cross road – Game for Android Download
633 views

Křižovatky testy pro Android

Hra, na které si nacvičíte pořadí projíždění základními typy křižovatek.

Download

Download křižovatky testy z play.google.com

křižovatky testy autoškola pravidla pravé ruky

Posted in Android Software Download, Smartphone | Tagged , | Comments Off on Křižovatky testy pro Android
553 views

ListView set the item as checked to be highlighted

Important: Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB

int layout = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ?
android.R.layout.simple_list_item_activated_1 :
android.R.layout.simple_list_item_1;

getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
getListView().setItemChecked(position, true);

Example of usage:

 
public void updateList() {
		Context ctx = getActivity();
		Notes notes = new Notes(ctx);
 
		String[] from = { Notes.COLUMN_TITLE };
		int[] to = { android.R.id.text1 };
		int layout = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ?
				android.R.layout.simple_list_item_activated_1 : android.R.layout.simple_list_item_1;
		ListAdapter adapter = new SimpleCursorAdapter(ctx,
				layout, notes.getNotes(), from,
				to, 0);
 
		setListAdapter(adapter);
 
		notes.close();
	}
 
/..................
@Override
    public void onListItemClick(ListView l, View v, int position, long id) {
 
        // Set the item as checked to be highlighted when in two-pane layout
        getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        getListView().setItemChecked(position, true);
 
    }
Posted in Android Examples Code | Tagged , | Comments Off on ListView set the item as checked to be highlighted
897 views

FrameLayout fragment not visible Android

ListFragment show only one item issue

Try to change layout_width to 0dp

   <fragment android:name="cz.okhelp.android.fragchangfromlist.ArticleFragment"
              android:id="@+id/article_fragment"
              android:layout_weight="2"
              android:layout_width="0dp"
              android:layout_height="match_parent" />
<!--todo LAYOUT_WIDTH have to be 0dp !!!!!!!!!!!!!!!!!!!!! -->
 
    <FrameLayout android:id="@+id/article_fragment"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="2" />
Posted in Android Studio, Bugs, warnings, errors | Comments Off on FrameLayout fragment not visible Android
975 views

NumberFormatException Color value drawable must start with

NumberFormatException Color value drawable must start with
NumberFormatException: Color value ‘@drawable/my_picture’ must start with #

Check all colors tags if value start with#
Read this
and check path c:\Users\me\AndroidStudioProjects\myProject\myModule\build\intermediates\res\merged\debug\ values folder for corupted values or delete ALL values folders or ALL folder in debug directory
Check folders in included modules
and rebuild project

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on NumberFormatException Color value drawable must start with
1,052 views

Android Studio failed to convert drawable into a drawable

Try this:
– check names of drawables (file name must contain only abc…xyz 012…789 _ . in Resources folder ,
names have to start with lower case
MyImage.jpg == problem ,
names with space
my image.jpg == problem,
names with –
my-image.png == problem)
– check duplicate names with other extension ( my_image.jpg – my_image.png makes the problem)
– restart Android Studio
– if problem persist:
– check c:\Users\me\AndroidStudioProjects\myProject\myModule\build\intermediates\res\merged\debug\ drawable folder for corupted names or delete ALL drawable folders
synk projekt, rebuild projekt
– if problem persist:
– restart Android Studio, wait for complete closure of the Android Studio!

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on Android Studio failed to convert drawable into a drawable
910 views

ClassCastException fragments.MainActivity must implement OnHeadlineSelectedListener

Problem:
You have two class with similar names HeadLinesFragment and HeadMyLinesFragment with OnHeadlineSelectedListener.
Check if call correct class in MainActivity.
For example if use HeadMyLinesFragment change implement to HeadMyLinesFragment too!

public class MainActivity extends FragmentActivity 
        implements HeadLinesFragment.OnHeadlineSelectedListener { 
// wrong implements you need correct class name 
//implements  HeadMyLinesFragment.OnHeadlineSelectedListener
//............
HeadMyLinesFragment firstFragment = new HeadMyLinesFragment(); // because in code using HeadMyLinesFragment
Posted in Android Examples Code, Bugs, warnings, errors | Tagged | Comments Off on ClassCastException fragments.MainActivity must implement OnHeadlineSelectedListener
761 views

Who has higher priority build.gradle or AndroidManifest Android Studio

build.gradle in module have higher priority then AndrodiManifest.xml
Try this.
AndroidManifest.xml have code:

    <uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="23" />

build.gradle have code:

   defaultConfig {
        applicationId "cz.okhelp.words"
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 107
        versionName "1.0.7"
    }

Warning in AndroidManifest.xml:
This targetSdkVersion value (23) is not used; it is always overridden by the value specified in the Gradle build script (19) less... (Ctrl+F1)
The value of (for example) minSdkVersion is only used if it is not specified in the build.gradle build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity.

Posted in Android Studio, Bugs, warnings, errors | Tagged | Comments Off on Who has higher priority build.gradle or AndroidManifest Android Studio
829 views

View getId is null Android

If you create a button or view programmatically with OnClickListener you can set a tag key before button in parent layout is added.
And get correct button by this tag getTag() instead getId() in OnClickListener etc.

Button button = new Button(getApplicationContext());
int idOfButton = button.getId(); // return -1
 
button.setTag("my_button");
String sTag = (String) button.getTag(); // return "my_button"
Posted in Android Examples Code | Tagged , | Comments Off on View getId is null Android
479 views

Words CZ Vyjmenovaná slova jako test paměti

Aplikace umožňuje procvičovat jak vyjmenovaná slova, tak i trénovat paměť. Download na tomto odkaze.
Náhodná slova se ukáží zhruba na 15 sekund.
Vašim úkolem je určit, které slovo nebylo zobrazeno na seznamu kliknutím na určité tlačítko.
V seznamu jsou i slova podobná pravopisem, ale mající jiný význam. Ta jsou označena hvězdičkou * a píšeme v nich měkké i.

Posted in Android Software Download | Tagged , | Comments Off on Words CZ Vyjmenovaná slova jako test paměti
479 views