大约有 5,000 项符合查询结果(耗时:0.0292秒) [XML]
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.
...
Android emulator shows nothing except black screen and adb devices shows “device offline”
I am just trying to start development in Android.
So, the problem is that when I try to launch an emulator by issuing the command emulator @A2 , an emulator comes up on the screen. But even after waiting for as long as 2-3 hrs, all it shows is a black screen. Not even the android home screen or t...
How do you set the max number of characters for an EditText in Android?
How do you set the max number of characters for an Android EditText input? I see setMaxLines, setMaxEMS, but nothing for the number of characters.
...