«android» 태그된 질문

Android는 Google의 모바일 운영체제로 디지털 기기 (스마트 폰, 태블릿, 자동차, TV, 마모, 유리, IoT)를 프로그래밍하거나 개발하는 데 사용됩니다. Android 관련 주제의 경우 android-intent, android-activity, android-adapter 등과 같은 Android 관련 태그를 사용하십시오. 개발 또는 프로그래밍 이외의 질문이지만 Android 프레임 워크와 관련된 질문은 다음 링크를 사용하십시오. https : // android.stackexchange.com.

7
TextView가 1 줄보다 큰 경우 어떻게 줄임표를 표시 할 수 있습니까?
작동하지 않는 다음 레이아웃이 있습니다. <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:id="@+id/experienceLayout" android:background="#ffffff" android:layout_height="match_parent" android:paddingLeft="6dp" android:paddingRight="6dp" android:paddingBottom="6dp" android:paddingTop="6dp"> <TextView android:layout_weight="1" android:id="@+id/experienceLabel" android:text="Experience" android:layout_height="wrap_content" android:textColor="#000000" android:layout_width="wrap_content" android:textStyle="bold"> </TextView> <TextView android:id="@+id/experienceTextView" android:text="TextView" android:layout_height="wrap_content" android:textColor="#000000" android:layout_width="wrap_content" android:ellipsize="end" android:lines="1" android:maxLines="1" android:singleLine="true" android:fadeScrollbars="false"> </TextView> </LinearLayout>

9
LinearLayout을 버튼처럼 작동하게 만들기
나는. LinearLayout처럼 보이도록 스타일을 지정 button했으며 몇 가지 text / ImageView 요소가 포함되어 있습니다. 나는 전체를 만들고 싶다LinearLayout 행위를 button, 특히 눌렀을 때 다른 배경을 가지도록 정의 된 상태를 부여하기 위해. ImageButton전체 레이아웃의 크기를 만들고 절대적으로 배치 하는 것보다 더 좋은 방법이 있습니까?

15
`__android_log_print '에 대한 정의되지 않은 참조
내 make 파일에 어떤 문제가 있습니까? Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := foo LOCAL_SRC_FILES := foo.c LOCAL_EXPORT_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY) foo.c #include <string.h> #include <jni.h> #include <android/log.h> #define LOG_TAG "foo" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) void test() { LOGI("test"); } ndk 빌드 foo.c:9: undefined reference to …

11
Notification.Builder를 정확히 사용하는 방법
noficitations (notification.setLatestEventInfo ())에 더 이상 사용되지 않는 메서드를 사용하고 있음을 발견했습니다. Notification.Builder를 사용하라는 메시지가 표시됩니다. 어떻게 사용하나요? 새 인스턴스를 만들려고하면 다음과 같은 메시지가 표시됩니다. Notification.Builder cannot be resolved to a type


7
Android에서 뷰의 onClick 이벤트를 부모에게 전달하는 방법은 무엇입니까?
배경이 선택기 인 레이아웃에 TextView가 있습니다. 그리고 TextView의 텍스트는 HTML에서 스팬으로 설정됩니다. 그런 다음 LinkMovementMethod로 TextView를 설정합니다. 이제 TextView를 탭하면 클릭 이벤트가 상위 레이아웃으로 전송되어 선택기를 트리거하지 않습니다. 이 문제를 어떻게 해결해야합니까?

5
android에서 두 이미지를 오버레이하여 imageview를 설정하십시오.
내 앱에서 두 개의 이미지를 오버레이하려고하는데 내 canvas.setBitmap()라인 에서 충돌하는 것 같습니다 . 내가 뭘 잘못하고 있죠? private void test() { Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.t); Bitmap mBitmap2 = BitmapFactory.decodeResource(getResources(), R.drawable.tt); Bitmap bmOverlay = Bitmap.createBitmap(mBitmap.getWidth(), mBitmap.getHeight(), mBitmap.getConfig()); Canvas canvas = new Canvas(); canvas.setBitmap(bmOverlay); canvas.drawBitmap(mBitmap, new Matrix(), null); canvas.drawBitmap(mBitmap2, new Matrix(), …
100 android  image 

13
Android 용 줄 바꿈 위젯 레이아웃
사용자에게 일부 데이터를 제공하는 활동을 만들려고합니다. 데이터는 각각 위젯 인 '단어'로 나눌 수 있으며 '단어'의 시퀀스는 단어를 포함하는 ViewGroup 위젯 인 데이터 ( 'sentence'?)를 형성합니다. '문장'의 모든 '단어'에 필요한 공간이 디스플레이의 사용 가능한 가로 공간을 초과하므로 일반적인 텍스트처럼 이러한 '문장'을 래핑하고 싶습니다. 다음 코드 : public class WrapTest extends Activity …



16
장치에서 sqlite 데이터베이스의 위치
확장 SQLiteOpenHelper및 재정 의 기본 방법을 사용하여 프로그래밍 방식으로 sqlite 데이터베이스를 만들었습니다 onCreate(). 이런 식으로 db는 필요할 때 즉시 생성됩니다. sqlite 브라우저를 사용하여 OS X 컴퓨터에서 db 파일의 내용을 확인하고 싶습니다. db 파일의 이름을 알고 있지만 장치에서 찾을 수 없습니다. USB를 통해 장치에 연결하고 파인더와 터미널을 확인했지만 db 파일을 찾을 …
100 android  sqlite 

7
Android 5.1.1 이상-getRunningAppProcesses ()는 내 애플리케이션 패키지 만 반환합니다.
Google은 마침내 현재 포 그라운드 애플리케이션 패키지를 얻기 위해 모든 문을 닫은 것 같습니다. 이 답변getRunningTasks(int maxNum) 덕분에 Lollipop 업데이트 후 Lollipop 이후 포 그라운드 애플리케이션 패키지를 가져 오는 데이 코드를 사용했습니다. final int PROCESS_STATE_TOP = 2; RunningAppProcessInfo currentInfo = null; Field field = null; try { field = RunningAppProcessInfo.class.getDeclaredField("processState"); …

16
IOException : 읽기 실패, 소켓이 닫힐 수 있음-Android 4.3의 Bluetooth
현재 Android 4.3 (Build JWR66Y, 두 번째 4.3 업데이트)을 사용하여 Nexus 7 (2012)에서 BluetoothSocket을 열 때 이상한 예외를 처리하려고합니다. 일부 관련 게시물 (예 : /programming/13648373/bluetoothsocket-connect-throwing-exception-read-failed )을 보았지만이 문제에 대한 해결 방법을 제공하는 것은 없습니다. 또한 이러한 스레드에서 제안했듯이 재 페어링은 도움이되지 않으며 멍청한 루프를 통해 지속적으로 연결을 시도해도 효과가 없습니다. …

4
기본 AVD 구성 폴더 (.android) 이동
Android SDK 설치 후 드라이브에 .android폴더 가 생성 되었습니다 E:\. 내가 아는 한 이것이 구성 파일에 대한 Android Virtual Devices의 기본 폴더입니다. .android폴더를 다른 위치 로 이동 하려면 어떻게 해야합니까? (예.부터 E:\.android행 E:\Android\.android)

9
Espresso를 사용하여 RecyclerView 항목 내부보기 클릭
Espresso를 사용하여 RecyclerView 항목 내의 특정보기를 클릭하려면 어떻게 해야합니까? 다음을 사용하여 위치 0에서 항목을 클릭 할 수 있다는 것을 알고 있습니다. onView(withId(R.id.recyclerView)) .perform(RecyclerViewActions.actionOnItemAtPosition(0, click())); 하지만 항목 자체가 아닌 해당 항목 내부의 특정보기를 클릭해야합니다. 미리 감사드립니다. -- 편집하다 -- 더 정확하게 말하자면, CardView ( ) 항목 인 RecyclerView ( R.id.recycler_view)가 있습니다 …

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.