android – How to properly use setOnLongClickListener() with Kotlin-ThrowExceptions

Exception or error: I’ve been trying to set up a long click listener event, but keep getting the following error: Type mismatch. Required:Boolean Found:Unit I’ve had no issues with the setOnClickListener event, but for some reason I’m having zero luck with the setOnLongClickListener event. I’m currently trying to display a simple Toast: view.setOnLongClickListener{ Toast.makeText(this, “Long …

xamarin – Visual Studio 2017 Android Device Manager thinks WHPX is not properly installed-ThrowExceptions

Exception or error: I just update Visual Studio 2017 to version 15.8.0, the one that I’ve been waiting for a while now, due to its support for Hyper-V accelerated Android emulators using Windows Hypervisor Platform (WHPX). I’ve been running Windows 10 version 1803 since May, and I have installed/enabled Windows Hypervisor Platform from “Turn Windows …

java – How to properly remove padding (or margin?) around buttons in Android?-ThrowExceptions

Exception or error: Currently, I have the following bottom log in button. When button is not being pressed When button is being pressed The XML looks like this <LinearLayout android:background=”?attr/welcomeBottomNavBarBackground” android:orientation=”horizontal” android:id=”@+id/sign_in_bottom_nav_bar” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:layout_alignParentBottom=”true”> <Button style=”?android:attr/buttonBarButtonStyle” android:id=”@+id/sign_in_button” android:layout_width=”0dp” android:width=”0dp” android:layout_weight=”1.0″ android:layout_height=”48dp” android:gravity=”center” android:layout_gravity=”center” android:enabled=”true” android:textAllCaps=”true” android:text=”@string/log_in” /> </LinearLayout> I would like to remove the …

Android TextView Hyperlink-ThrowExceptions

Exception or error: I’m implementing a TextView with a string containing two hyperlinks as below but the links are not opening a new browser window: <TextView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”center” android:gravity=”center” android:textColor=”#ffffff” android:paddingLeft=”50dp” android:paddingRight=”50dp” android:textSize=”14sp” android:clickable=”true” android:linksClickable=”true” android:textColorLink=”@color/colorPrimary” android:autoLink=”web” android:text=”@string/agree_terms_privacy”/> In string.xml <string name=”agree_terms_privacy”>By continuing, you agree to our <a href=”http://link1/terms”>Terms of Use</a> and read the …