xml – Android: How to fill RelativeLayout to full width of screen?-ThrowExceptions

Exception or error: I am creating an Android app which has a main RelativeLayout and some LinearLayout within it. Now i have this problem. When dragging items to the editor, e.g. a LinearLayout, it doesn’t fit to the full width of the screen. How can I make this possible? This is my XML: <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” …

android – Google Play Services version 5.2.08 too recent for my device-ThrowExceptions

Exception or error: I use this method to check the availability of play services: private boolean checkPlayServices() { int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if (status != ConnectionResult.SUCCESS) { if (GooglePlayServicesUtil.isUserRecoverableError(status)) { showErrorDialog(status); } else { Toast.makeText(this, “This device is not supported.”, Toast.LENGTH_LONG).show(); finish(); } return false; } return true; } status is now set to 2 …

android – Installing HAXM on osx Yosemite-ThrowExceptions

Exception or error: I’m following the instructions to install Intel HAXM on OS X. https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-mac-os-x These instructions say to install the driver, and once it’s done run kextstat | grep intel to see if it’s installed. If not, then run sudo kextload –b com.intel.kext.intelhaxm. However, at least on OS X Yosemite, I get the following …

Add android:name="something" to AndroidManifest.xml "application" tag from Cordova plugin.xml-ThrowExceptions

Exception or error: I decided to open new question because none of those that are already posted, has a good answer. I need to update AndroidManifest.xml “from plugin.xml”, so that the <application> tag has the following property, alongside those it already has: android:name=”mypackage” How can do that? Thank you How to solve: I had the …

java – Android Realm copyToRealmOrUpdate creates duplicates of nested objects-ThrowExceptions

Exception or error: I have following classes: public class Note extends RealmObject { @PrimaryKey private String id; private Template template; // other primitive fields, getters & setters } public class Template extends RealmObject { private String name; private String color; // other primitive fields, getters & setters } I get my data from backend via …

android – getSupportActionBar().setTitle() vs toolbar.setTitle()-ThrowExceptions

Exception or error: I am aware that there are two methods to setting a title in an Android Activity. Assuming I already have the following code… @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_activity); … Toolbar toolbar = (Toolbar) findViewById(R.id.my_toolbar); setSupportActionBar(toolbar); …I can use either this… getSupportActionBar().setTitle(“My title”); …or this… toolbar.setTitle(“My title”); …to set my …

java – AsyncTask and Contexts-ThrowExceptions

Exception or error: So I’m working out my first multi-threaded application using Android with the AsyncTask class. I’m trying to use it to fire off a Geocoder in a second thread, then update the UI with onPostExecute, but I keep running into an issue with the proper Context. I kind of hobbled my way through …