大约有 4,100 项符合查询结果(耗时:0.0250秒) [XML]
First letter capitalization for EditText
...
Statically (i.e. in your layout XML file): set android:inputType="textCapSentences" on your EditText.
Programmatically: you have to include InputType.TYPE_CLASS_TEXT in the InputType of the EditText, e.g.
EditText editor = new EditText(this);
editor.setInputType(InputT...
What's “tools:context” in Android layout files?
...
i see . according to the screenshot here : tools.android.com/_/rsrc/1337185954574/recent/newconfigchooser/… , it means that doesn't have to be a class that extends Context , right? if so, i think it does more that what you are saying , though i'm not sure what .
...
Soft keyboard open and close listener in an activity in Android
...
This only works when android:windowSoftInputMode of your activity is set to adjustResize in the manifest. You can use a layout listener to see if the root layout of your activity is resized by the keyboard.
I use something like the following bas...
Change Image of ImageView programmatically in Android
...
Use in XML:
android:src="@drawable/image"
Source use:
imageView.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.your_image));
share
...
Jar Mismatch Found 2 versions of android-support-v4.jar in the dependency list
I am trying to create 2 versions of an Android app (free/paid). I have an Android Library that contains files common to both. I created a new Android project and am trying to use the Library but get the error below:
...
Android Studio: Plugin with id 'android-library' not found
...
Instruct Gradle to download Android plugin from Maven Central repository.
You do it by pasting the following code at the beginning of the Gradle build file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
class...
LinearLayout not expanding inside a ScrollView
I have a LinearLayout inside a ScrollView that has android:layout_height="fill_parent" , but it doesn't expand to the full height of the ScrollView . My layout looks something like:
...
Can't make the custom DialogFragment transparent over the Fragment
...ception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window android.app.Dialog.getWindow()' on a null object reference.
– CoolMind
Aug 16 '16 at 14:10
...
Force an Android activity to always use landscape mode
I am using the Android VNC viewer on my HTC G1 . But for some reason, that application is always in landscape mode despite my G1 is in portrait mode. Since the Android VNC viewer is open source, I would like know how is it possible hard code an activity to be 'landscape'. I would like to change i...
Create an Android Jar library for distribution
I know of Android Library projects, which allow you to create a shared-source project that can be pulled into Android Applications as needed. However, that requires that source be available.
...