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 my templates store Android


Where file(s) does eclipse store Java code style settings to?
If you need copy any old templates to the new workspace.

workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs


You can edit the Eclipse Templates from menu Window - Preferences - Java - Editor - Templates.

397LW NO topic_id



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


257

Not request focus EditText if startup Android | not-request-focus-edittext-if-startup-android


Not request focus EditText if startup Android - hide keyboard if startup.

Remove: from EditText

Create a LinearLayout and set the:
attributes android:focusable="true" android:focusableInTouchMode="true"


   <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:focusable="true" 
        android:focusableInTouchMode="true"
        android:orientation="vertical" >
</LinearLayout>
342

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
354

How to test dual panels - panes fragments on small device screen Android | how-to-test-dual-panels-fragments-on-small-device-screen-android


If You have old PC (Android in emulator with high screen resolution uses a lot of memory) or your testing phone have small screen, You can try this trick.
Rename layout folder for small device screen f.g. from layout into layout-swXXXdp and a large layout-sw600dp into layout.
Your phone with small screnn will do select xml file from renamed layout folder (for small screen).
You can to testing rotation with device en stability of fragments if an application changed orientation.
If you have old pc, you can try to make a new virtual device running on older version of Android, which uses less memory of computer.
For testing of rotation stability - application orientation changed - use on emulator Ctrl+F11, Ctrl+F12 key (Windows).

Important
Before the release of application, you have to rename layout folder to older name layout-sw600dp and layout-swXXXdp to layout.
360

Resource Entry already defined | resource-entry-already-defined


Check if in drawable folder have two picture with same name and delete one.
For example:

image_1.jpg
image_1.png


Check the module build folder in Android Studio for two files with same names.

C:\Users\myFolder\AndroidStudioProjects\Project\yourModule\build\intermediates\res\merged\debug\drawable\
158

Check Internet connection Android example | check-internet-connection-android-example



public boolean isConnected() {
	 try {
		ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
		 return cm.getActiveNetworkInfo().isConnectedOrConnecting();
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		Log.e("isConnected", e.getMessage());
		Toast.makeText(getApplicationContext(), e.getMessage(),
				Toast.LENGTH_LONG).show();
		return false;
	}




Editace: 2014-02-15 20:28:29
Počet článků v kategorii: 397
Url:eclipse-my-templates-store-android
Share
Share
Tweet