Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

Eclipse update failed folder in use


AD MOB

Failed to rename directory ....
If using for update Android SDK manager,
try close Eclipse if is open.
Or change security settings of the folder which have problem.
Or disable antivirus for a moment.

397LW NO topic_id




AD

Další témata ....(Topics)


340

Android Studio hide delete import module | android-studio-hide-delete-import-module


Hide module - open dialog: File > Project Structure Ctrl + Alt + Shift + S
android-studio-hide-module.jpg

Hide module: in opened Dialog select module which will hidden and click on minus (left upper corner)

android-studio-hide-module-from-project-explorer.jpg

If module is hidden, you can permanetly delete module from disk. But if you want using module in future,  copy module into other folder (not into AndroidProjects folder and his subbfolders) and delete module permanetly from project and disc. Right mouse click on module and select from menu Delete.
android-studio-delete-module-from-disc.jpg

If you want import the backup copy to project, use: File>New>Import mudule
android-studio-import-module.jpg
36

Titlebar title bar change text setTile Android example | titlebar-title-bar-change-text-android-example


Change the title associated with this activity. If this is a top-level activity, the title for its window will change. If it is an embedded activity, the parent can do whatever it wants with it.




 String sTitle = "My new title";
 setTitle(sTitle);



364

Center View in RelativeLayout Android | center-view-in-relativelayout-android


RelativeLayout like parent, child Srollview is centered horizontal.
Second RelativeLayout in SrollView have gravity center, every child will centered horizontally and vertically.


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="//schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent"
    android:gravity="center_horizontal">

    <ScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/scrollView2" >

        <RelativeLayout
            android:layout_width="320dp"
            android:layout_height="wrap_content"
            android:background="#e6f825"
            android:gravity="center">

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="New Button"
                android:id="@+id/button" />
        </RelativeLayout>
    </ScrollView>

</RelativeLayout>
59

Relative layout RelativeLayout Android example | relative-layout-relativelayout-android-example


xml RelativeLayout Android example:

Eclipse graphical xml layout editor
[caption id="attachment_896" align="alignleft" width="261" caption="Relativelayout Eclipse graphical editor"]relativelayout-graphical-editor-eclipse[/caption]


res/layout/main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="//schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TextView
        android:id="@+id/idLabel"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Enter word"/>
    <EditText
        android:id="@+id/idEntry"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@android:drawable/editbox_background"
        android:layout_below="@id/idLabel"/>
    <Button
        android:id="@+id/idOk"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/idEntry"
        android:layout_alignParentRight="true"
        android:layout_marginLeft="10dip"
        android:text="OK" />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@id/idOk"
        android:layout_alignTop="@id/idOk"
        android:text="Cancel" />
</RelativeLayout>
335

IllegalArgumentException Unknown Uri content SearchableDict | illegalargumentexception-unknown-uri-content-searchabledict


If you change the package name, you have to add new package name in:

DictionaryProvider.java


public class DictionaryProvider extends ContentProvider {
    String TAG = "DictionaryProvider";

//    public static String AUTHORITY = "com.example.android.searchabledict.DictionaryProvider";
// change to your new package name
public static String AUTHORITY = "com.myweb.mysubdomen.searchabledict.DictionaryProvider";
    public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/dictionary");


// in AndroidManifest.xml
//change com.example.android to your package e.g. com.myweb.mysubdomen
<!-- Provides search suggestions for words and their definitions. -->
        <provider android:name="com.example.android.searchabledict.DictionaryProvider"
            android:configChanges="keyboard|keyboardHidden|orientation"
                  android:authorities="com.example.android.searchabledict.DictionaryProvider" />

        <!-- Points to searchable activity so the whole app can invoke search. -->
        <meta-data android:name="android.app.default_searchable"
            android:configChanges="keyboard|keyboardHidden|orientation"
                   android:value=".SearchableDictionary" />

// I change like this:
        <!-- Provides search suggestions for words and their definitions. -->
        <provider android:name=".DictionaryProvider"
            android:configChanges="keyboard|keyboardHidden|orientation"
                  android:authorities="cz.okhelp.android.searchabledict.DictionaryProvider" />

        <!-- Points to searchable activity so the whole app can invoke search. -->
        <meta-data android:name="android.app.default_searchable"
            android:configChanges="keyboard|keyboardHidden|orientation"
                   android:value=".SearchableDictionary" />


Do not forget change package name in all java class and xml/searchable.xml
In my project I changed like this:

<searchable xmlns:android="//schemas.android.com/apk/res/android"
        android:label="@string/search_label"
        android:hint="@string/search_hint"
        android:searchSettingsDescription="@string/settings_description"
        android:searchSuggestAuthority="cz.okhelp.android.searchabledict.DictionaryProvider"
        android:searchSuggestIntentAction="android.intent.action.VIEW"
        android:searchSuggestIntentData="content://cz.okhelp.android.searchabledict.DictionaryProvider/dictionary"
        android:searchSuggestSelection=" ?"
        android:searchSuggestThreshold="1"
        android:includeInGlobalSearch="true"
        >
 </searchable>




Editace: 2015-02-26 12:26:43
Počet článků v kategorii: 397
Url:eclipse-update-failed-folder-in-use

AD
11 Share
Share
Tweet