android-studio

Programatically change background of Drawable, maintaining the corner radius

落爺英雄遲暮 提交于 2020-08-20 05:29:50
问题 interview_timeline_row.xml <LinearLayout android:id="@+id/interviewTimelineIconLayout" android:layout_width="52dp" android:layout_height="52dp" android:layout_marginTop="20dp" android:background="@drawable/timeline_row_icon_layout_bg" android:gravity="center" android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"> <ImageView android:id="@+id/interviewTimelineRowIcon" android:layout_width="40dp" android:layout_height="40dp" android

Programatically change background of Drawable, maintaining the corner radius

谁说我不能喝 提交于 2020-08-20 05:29:26
问题 interview_timeline_row.xml <LinearLayout android:id="@+id/interviewTimelineIconLayout" android:layout_width="52dp" android:layout_height="52dp" android:layout_marginTop="20dp" android:background="@drawable/timeline_row_icon_layout_bg" android:gravity="center" android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"> <ImageView android:id="@+id/interviewTimelineRowIcon" android:layout_width="40dp" android:layout_height="40dp" android

“AndroidManifest.xml doesn't exist or has incorrect root tag” Error

喜夏-厌秋 提交于 2020-08-19 11:18:36
问题 I am new to AndroidStudio AND Gradle. I imported a project from eclipse, created a module, and tried to run the project, but I got this error: AndroidManifest.xml doesn't exist or has incorrect root tag I have been looking at this previous solution for it: How to build an android library with Android Studio and gradle? But that solution is WAY too advanced for me. Could someone please help me understand in simpler terms what is going wrong and how I can fix it? Thank you! Update after one of

“AndroidManifest.xml doesn't exist or has incorrect root tag” Error

筅森魡賤 提交于 2020-08-19 11:15:24
问题 I am new to AndroidStudio AND Gradle. I imported a project from eclipse, created a module, and tried to run the project, but I got this error: AndroidManifest.xml doesn't exist or has incorrect root tag I have been looking at this previous solution for it: How to build an android library with Android Studio and gradle? But that solution is WAY too advanced for me. Could someone please help me understand in simpler terms what is going wrong and how I can fix it? Thank you! Update after one of

Android Studio: Rendering Problems with CoordinatorLayout

孤街浪徒 提交于 2020-08-18 04:55:00
问题 When I set a CoordinatorLayout as my root element I get the following error when Android Studio is rendering a preview. java.lang.NoClassDefFoundError: Could not initialize class android.support.design.widget.CoordinatorLayout at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java

Android Studio: Rendering Problems with CoordinatorLayout

拈花ヽ惹草 提交于 2020-08-18 04:54:25
问题 When I set a CoordinatorLayout as my root element I get the following error when Android Studio is rendering a preview. java.lang.NoClassDefFoundError: Could not initialize class android.support.design.widget.CoordinatorLayout at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java

android studio - manually download system image for emulator

∥☆過路亽.° 提交于 2020-08-17 13:01:45
问题 Good day,I'm a student and I'm trying to create a virtual device in Android Studio, however my home internet is too slow to download a System Image, there is an internet cafe near me that has very fast internet and I plan to download the System Image there by accessing in my browser this link : https://dl.google.com/android/repository/sys-img/google_apis/x86-25_r08.zip From this message in the window where Android Studio downloads the System Image for Android Nougat To install: - Google APIs

How to show rtf content from raw file in TextView android?

怎甘沉沦 提交于 2020-08-17 12:18:52
问题 I want to load rtf file content from raw folder in textview. Can I convert rtf to html in android?. Below is my code, RTF File Content {\rtf1 \ansi \ansicpg1252 \deff0 \stshfdbch2 \stshfloch0 \stshfhich0 \deflang16393 \deflangfe16393 {\fonttbl {\f0 \froman \fcharset0 \fprq2 {*\panose 02020603050405020304}Times New Roman{*\falt Times New Roman};}{\f2 \fnil \fcharset134 \fprq0 {*\panose 02010600030101010101}SimSun{*\falt SimSun};}{\f3 \fnil \fcharset2 \fprq0 {*\panose 05000000000000000000

How to set AlterDialog globally in android studio

这一生的挚爱 提交于 2020-08-17 12:16:13
问题 Using this solution, I am trying to display a loading box using 'AlterDialog'. public void setProgressDialogRelayResponse() { int llPadding = 30; LinearLayout ll = new LinearLayout(mContext); ll.setOrientation(LinearLayout.HORIZONTAL); ll.setPadding(llPadding, llPadding, llPadding, llPadding); ll.setGravity(Gravity.CENTER); LinearLayout.LayoutParams llParam = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); llParam.gravity =

how to remove cache from webView

穿精又带淫゛_ 提交于 2020-08-15 16:56:55
问题 I have recyclerView and in each items I've have displaced facebook in webView. I loged in one of the item (position 1) of the webview by facebook. And, all other items (position 1,2,3..) are automatically logged in same fb account. But, I want to login different fb account in different item. this is my activity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); webView = findViewById(R.id.webView);