android-layout

How to make shape's child TextView white when state_pressed=“true”

孤街醉人 提交于 2020-01-25 07:52:06
问题 This shape is the backround of a linearLayout, how can I make any TextViews within the LinearLayout change their text color to white during the statePressed =true of the parent selector? Also see my previous question to see more of the code: Shape does not show <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#FFFFFF" /> <stroke android:width="1dp" android:color="#AA000000" /> <corners android:topLeftRadius="10dp" android:topRightRadius="10dp" />

Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory)

橙三吉。 提交于 2020-01-25 06:40:08
问题 Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:17:5-122:19 to override. org.gradle.api.tasks.TaskExecutionException: Execution

Alert message is not displaying in alert dialog box?

自古美人都是妖i 提交于 2020-01-25 03:13:45
问题 I want to display the alert dialog box to device screen size. I got the solution through this link How to make an alert dialog fill 90% of screen size? I use the solution given there, it works just fine but my alert message is displaying in very small size. we can't even make out the message in landscape orientation. I have used the following code. AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.app_description).setPositiveButton( "Ok", new

How do I set my status bar transparent but keep by navigation bar black?

老子叫甜甜 提交于 2020-01-25 01:02:24
问题 As my question suggests, I am trying to figure out how to set my status bar color transparent while keeping my navigation bar black/natural color (without affecting the screen height) I referred to this site : Android Completely transparent Status Bar? one of the solutions that partially worked was : getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); but that pushes my screen content below navigation bar making it

How do I set my status bar transparent but keep by navigation bar black?

蓝咒 提交于 2020-01-25 01:02:07
问题 As my question suggests, I am trying to figure out how to set my status bar color transparent while keeping my navigation bar black/natural color (without affecting the screen height) I referred to this site : Android Completely transparent Status Bar? one of the solutions that partially worked was : getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); but that pushes my screen content below navigation bar making it

Get access to Zxing QR scanner camera view

好久不见. 提交于 2020-01-25 00:17:05
问题 I am new to android development and I am working on an android project where I have to integrate QR scanner. So I thought I would integrate Zxing QR scanner and came across this library https://github.com/dm77/barcodescanner, Following the instructions provided I have successfully integrated and scanned a QR as well. Now I want to customise the camera view. The problem is there is no documentation on how to get access to the camera layout. Since I am new I might be missing something. I have

should I move from layout_weight to dip?

僤鯓⒐⒋嵵緔 提交于 2020-01-24 23:42:26
问题 I have created a widget. I intentionally used layout_weight so it would fit any screen size. The widget is always spanned to 1X4. I now look at different devices in the graphic editor and I see the weight doesn't help. should I move to dip size? The linear-layouts are spanned differently in relation to the background image. My XML: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/app_widget_root" android:layout_width="fill_parent" android:layout_height

Empty space above the app bar

試著忘記壹切 提交于 2020-01-24 21:49:09
问题 How do I get rid of the empty space shown below (the space between the horizontal red lines)? I didn't see this on my app until getting a new phone (Samsung S8), which has more vertical screen space than my old HTC One. The beginning of the layout file for that activity is: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout ... My values

How to make an app tablet compatible?

随声附和 提交于 2020-01-24 20:13:45
问题 I would like to make my app tablet compatible, I have read all about it and made sure none of the uses-feature are specific for phones and added supports-screens for all sizes (as you can see in my manifest). But still I see that playstore does not recognize my app as tablet compatible. Please provide me with a step by step instructions to help me solve this problem or a copy of a manifest that is compatible. (I have already looked for some opensource apps and they provide none of these tags

How can I scale textView inside parent view with motion layout?

独自空忆成欢 提交于 2020-01-24 18:23:24
问题 I'm trying to scale a textView inside a container view. Activity uses a motion layout. I can scale the textView if I don't place it inside the container. Here is my activity layout and the motion layout description file. How can I make scaleX and scaleY work? Activity Layout <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.motion.MotionLayout xmlns:tools="http://schemas.android.com/tools" android:id="@+id/motionLayout" xmlns:android="http://schemas.android.com/apk/res