Some sources tell that layout_width and layout_height are attributes of the class LayoutParams. (https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) However, we can use these attributes in XML code of TextView class. <Te
I am trying to animate a view outside of its parent view and when I do the child view is not able to animate beyond its parent. I solved this by using the setClipChildren(false) and it worked... When the view is animated up. When I animate the view d
I want create application Scan Barcode using ZXING Barcode Scanner Like Blackberry Messenger This is my code "MainActivity.java" package com.example.ridwan.myapplication; import android.app.Activity; import android.content.Intent; import android
I keep getting a FileNotFoundException when trying to initialize my app with Firebase saying it cannot find my adminsdk.json service key. This is a specific error as I am trying to initialize Firebase in an Android Module Servlet. Here is what my mod
I'm trying to use Android Studio 2.2 preview 1, but if i create a new project and add a simple EditText and try to run, i got the following error. 05-20 15:53:00.748 11798-11798/br.com.tutorialandroid.sqlite E/AndroidRuntime: FATAL EXCEPTION: main Pr
I don't know if I'm doing this correctly, I made a java file var.java public class var { public static boolean u = true ; } in the main activity I have buUn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //var
I am implementing an Android app that will allow users to purchase something by dialing a number from my app pressing a button. In single SIM devices it works nicely, but in dual sim devices, when I run my app and click on the "Purchase Button"
I've been searching for a solution to hide any one of the following spinners from the DatePicker. For Android 5.0 the internal variables were changed and, in my case, the Day and Month spinners were visible again after the update to my device. Androi
All of the examples I see are pushing notifications from the server to the client. How do I contact the server from the client and how would the path look? Normal http requests can be matched using app.get('path',callback). Is this same matcher used
I have few buttons and I have the following click listener for the same: private View.OnClickListener onclick = new View.OnClickListener() { @Override public void onClick(View v) { switch(v.getId()){ case R.id.home: break; case R.id.contact: break; c
I'm trying to run my first android studio project but I get this error message and the emulator doesn't start : Created filesystem with 11/4224 inodes and 1302/16896 blocks Failed to create Context 0x3005 emulator: WARNING: Could not initialize Openg
In Android API 19 was added contructor of PopupMenu which allows specify gravity. public PopupMenu (Context context, View anchor, int gravity) How i can set gravity in older versions?Change line import android.widget.PopupMenu; to import android.supp
I've read that due to Scala compiler magic it is possible to implement the Android Parcelable pattern in Scala (that requires a static class member). However there is very little information about that and I'm not sure ... ... if this is even true ..
I am trying to read a data from a file. I have following code. public void ReadFile() { File sdcard = android.os.Environment.getExternalStorageDirectory(); File directory = new File(sdcard.getAbsolutePath()+ "/MyDirectory"); File file = new File
I would like to simulate behavior of soft Home button. I'd like that when user tap back button in a specific Activity of my application, this go in background and show device homepage. How can i do (i know i should override onBackPressed() inside act
I'm going insane!! I don't manage to pass data from a fragment(A) to an another fragment(B). I read about using a public interface... and it seems to work, but i don't understand how to use this method. Fragment(A) package it.anddev.pagertabs; public
My table is not being created because of a FOREIGN KEY syntax error but I cant seem to figure it out. I made sure I created the int first before I called the FK. Here's teh code for my class with the FK public class PlayerStatsDatabase { public stati
I have a Linearlayout and I want to make it scrollable without using ScrollView. Is it possible. Any suggestions will be appreciated. Here's the detail: If I wrap the LinearLayout using ScrollView, it is ok but when I used a ListView inside LinearLay
I am developing an application in which when i click a number in activity, it should make a phone call but should not hide my activity. I want to make the call in background and display that in notification bar. Is there any way to do it?Check this c
as the question stated. I am planning to copy android SDK library from my microsoft windows pc to my new Mac PC. Should I download the mac version of sdk or copying the directory from windows to mac is enough ?The SDK (Java part) is identical, but th
I just started coding a new application for Android and stumble over a warning. This tag and its children can be replaced by one and a compound drawable Another problem I have is the image placed on the right side. How can I do this without having tr
I want to launch a dialog from a service that hovers over whatever the user is currently looking at. The dialog gets launched like this: service gets trigger to open dialog > start transparent activity > transparent activity shows dialog. My problem
I am able to getting all messages with its data, type ,address,status etc. but I am not able restore these messages.I tried the following way. It inserts correctly but it shows current date not date of message recieved or send.Please help me how can
Is there any way I can get datetime format like 'YYYY-MM-DD HH:MM:SS' to be stored as datetime format in mysql from android date of format 'MM-DD-YY' and time of format 'HH:MM' Input : android date 'MM-DD-YY' and android time 'HH:MM' Output: mysql da
For development , sometimes we need for a faster programming , the SQLite database state of our programs . But i can only extract database if it's on emulator , not mobile . Then my exactly question is ¿Is there a way to see the android sqlite db or
I'm in the process of converting from an startActivity/Intent based model to a fragment based model. Is there any way I can preserve all my code which passes information to an activity (which I'm now converting into Fragments) via Intent??Fragments n
I want to launch my app from link in email. this the link is base on special schema. I use the in my app's activity (AndroidManifest.xml) : <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:nam
I recently discovered, through Ubuntu's empathy im client, that exists a protocol that enables the user to talk with anyone on his actual local network. It seems empathy calls this service "People Nearby" and Windows "People Near Me".
I have followed this tutorial http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/ and like to add an on click for the listview. now here is my main.xml: <?xml version="1.0" encoding="utf-8"?> <Lin
I've implemented a service that does an asynchronous sync between my application and google docs. I want to update the top level activity of my application when the sync is complete. However because of the service it's possible that the app could be