I am currently trying to use ktlint and I want the same style to be followed by all developers so I want to override the AS styles with my own using the **.editorconfig **file but when I run ktlintFormat and then run alt + cmd + L there are new formatting changes. Ideally the .editorconfig should over ride the studio styles but it doesn't seem to be happening.
PS : I have checked the enabled editorconfig support in preference.
Tried adding my .editorconfig file and formatted styles but it is not being honoured and still picking up AS styles on manual formatting while there should be no change when manually formatting.
Related
I'm using Visual Studio 2017 with the latest update.
I created a new Xamarin Forms solution (.net standard) and when I click on Resource.Designer.cs or when I try to "open with" with many options - I don't get any designer.
Since the text in the file says
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
Something must be missing.
How do I get the designer working?
According to an answer in the comments this is not like the Visual Studio designer file. It should not be edited, but also does not have a designer mode associated with it.
I developed a simple javafx application to be ported in Android Environment, however I cant type any characters in the TextField. I guess its a bug, how to fix this one?
Th problem on galaxy S5 android 5.0.1 is not present but on galaxy tab 4 android 5.0.2 it doesn't work i type but none is displyed.
Tried with normal textfield. And the problem persist also I have added the properties .
Another strange rhig is that the space where recognizer. And the del button . The text not
THe code by example is very easy
Rectangle2D visualBounds = Screen.getPrimary().getVisualBounds();
double width = visualBounds.getWidth();
double height = visualBounds.getHeight();
TextField tt= new TextField();
tt.setTranslateY(-150);
StackPane stackPane = new StackPane();
stackPane.getChildren().addAll(tt);
borderpane.setCenter(stackPane);
Scene scene = new Scene(borderpane, width, height);
stage.setScene(scene);
Assuming that CustomTextField is just a custom TextField, this is a known issue, not related to the CustomTextField itself, given that it works in other device.
If you debug it:
./adb logcat -v threadtime
you surely find an exception that explains the issue: a StackOverFlow exception.
On older devices it can be solved adding this: create a java.custom.properties file, and include in it this property:
monocle.stackSize=128000
You may also include this one:
monocle.platform=Android
(it will be soon included by default in the next version)
Put the file at the root of your classpath, e.g. in the folder src/android/resources of your project.
Build and deploy the project on your mobile and check again.
What I have:
I have a customised code format (.xml) file that my team wants to use in our project. This file includes predefined coding styles and conventions for java file.
What I want to do:
Now I have to add this formatter as a default code format, so that when click the shortcut of auto code format, the entire file will be formatted according to the the conventions defined in the formatter.
After a long 2days effort I managed the steps to integrate Eclipse Code Formatter in Android Studio
Here I am sharing step by step procedures to integrate Eclipse Code Formatter in Android Studio:
Step 1: Go to the Plugins Section of Android Studio.
The easiest way is Click Shift twice and type Plugins. Now go to the plugins menu.
Step 2: Click on Browse Repositories
Step 3: Type Eclipse Code Formatter in the search box. Select it and Click Install button in the right section
Step 4: After successful installation you can see a blue Eclipse Icon in the top pen
Step 5: Now go to Settings >> Other Settings >> Eclipse Code formatter
Click the Browse button.
Step 6: Then select the Code Format XML file
Thats it
Any time you click the code formatting command your full code will be formatted according to the code formatter.
Code formatting shortcut:
Windows:
Ctrl + Alt + L
Linux:
Ctrl + Start + Alt + L
Mac:
Option + Command + L
In case anyone want to see how the code formatter xml looks, you can check this one.
One of the mostly used code style used by google is here.
i am facing problem in android studio. In eclipse when i want to use class like Intent, then i write intent starting with lower case it give me suggestion box indicating class name Intent, but in android studio if i type intent starting with lower case it does not Provide Suggestion class name Intent.Thanks in advance.
In my case Ctrl + Space was overloaded by mac shortcuts. And even in the case, I disabled them, they conflict with Android Studio.
So, I gave them another keys and it solved the problem.
Go to the System Preferences -> Keyboard -> Shortcuts -> Input Sources and use new keys for them.
The problem is that Android Studio has different key binding than Eclipse, but you can set the key binding to be the same as in eclipse in android studio settings. Also by default ctrl + space is case sensitive in Android studio, you need to turn that off too.
Move to File -> Settings -> Keymap and change keymaps settings to eclipse so that you can use the short cut keys like in eclipse.
You can set 'Case sensitive completion' to 'None' in IDE Settings > Editor > Code Completion.
That should do it :)
File --> Settings --> Editor --> General --> Code Completion --> Case sensitive completion --> None
I am getting a new problem which may be due to version changes, but I don't know. The exception raised during rendering is as follows:
java.lang.System.array copy([CI[CII)V
Exception details are logged in Window > Show View > Error Log .
The following classes could not be found: - Edit Text (Change to
android.widget.Edit Text, Fix Build Path, Edit XML)
its not getting the class of edit text. From where would I get/add it?
From https://stackoverflow.com/a/24502370/826670. it looks like you are using android Wear to render it, change android version in rendered.
Check the "Android version to use when rendering layouts" and make
sure you're not using a version that ends in "W" for Android Wear
(e.g. API 20: Android 4.4W). I don't believe Wear supports
EditText.
In both Android Studio and Eclipse, it's the dropdown with the green
android in the layout preview's toolbar. You may want to set it
explicitly and not allow the IDE to choose the Android version
automatically.