In my values/styles.xml file I declare 2 themes - light and dark.
In the manifest file, in the application element - i set the theme to one
of the two - works fine.
When I have light theme set in the manifest file and in my main activity, I
have
protected void onCreate(Bundle
How can I find out current theme values - e.g. windowBackground
I defined this in my styles.xml file
?android:attr/windowBackground
Then in a layout set
That that results in an exception.
What am I doing wrong
--
You received this message because you are subscribed to the Google
I think the problem is the JRE.
Which one do I need.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Installed JRE 7 and works fine.
Thanks.
On Monday, November 24, 2014 1:29:49 PM UTC-5, Jonathan S wrote:
JRE = Java Runtime Enviorment
JDK = Java Development Kit
I think you need to get the latest version of JDK 7
On Monday, November 24, 2014 12:35:34 PM UTC-5, dashman wrote:
I think
I created a layout and attached to a preference
Preference
android:key=key
android:layout=@layout/image_preference
/
That displays correctly - title, sub-title w/ a imagebutton to the right.
The layout's root is a LinearLayout w/ an id of
How can I set the system default styles for the title and summary elements
of a custom preference - in xml.
Looked all over the styles.xml - couldn't find it.
TextView
android:id=@+android:id/title
android:layout_width=match_parent
How can I change the background color of icon notifications.
That is - the circular icon that's displayed when the
notification panel is opened.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I've got a Preference (not a sub-class) in a settings page...
Like to add an imagebutton on the right side.
How can I do that?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
How can I center text in pre api 17.
Both for TextView and EditText.
In my XML for the above elements, I have
android:textAlignment=center
and ok it doesn't work for pre api 17 - but any reason
why it should not work automatically in api 17+ devices.
Unless the compiler removes it.
Thanks.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options,
Which layout should I use if I want the view to be resized when the
keyboard panel is open.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this
I'm developing a new app and is close to beta testing.
i was wondering how folks did this.
I'd like to release it - get feedback - but not allow users to rate it
until production
version is released.
that's my initial thoughts.
Any ideas or suggestions welcome.
--
You received this message
Have a small bitmap - that i draw on a Canvas.
I'd like to animate it - e.g. make it larger and smaller etc.
Any suggestions?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Trying to create a map fragment with rounded corners.
fragment
android:id=@+id/map
android:layout_width=match_parent
android:layout_height=match_parent
class=com.google.android.gms.maps.MapFragment/
I then made it a child of a linearlayout
LinearLayout
I've got a view that goes into a listview and would like each to have a
rounded corners.
For the custom view layout, I set the parent to a RelativeLayout and
and set the background to a shape - that sets rounded corners.
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
I've got an edit activity.
I'd like to change the BACK icon at the top to a CHECK-MARK and a label DONE
(much like what the Google contacts edit activity does).
How can I do that?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to
Ok finally got it to work.
I uninstalled the Android SDK and deleted the eclipse (basically the folder)
Then I deleted the .android folder under USER_HOME also.
Restarted computer - no remnants of the previous install should be there
now.
Redownloaded the ADT+eclipse package and unzipped it
something in the registry?
I'd like clear all info and then do a fresh install.
On Thursday, September 11, 2014 6:50:50 PM UTC-4, dashman wrote:
Using eclipse to generate Android app.
All of a sudden when I export a project - I get an apk file that's not
valid. e.g. missing
Using eclipse to generate Android app.
All of a sudden when I export a project - I get an apk file that's not
valid. e.g. missing *AndroidManifest.xml* and *res* folder.
It was working a few days ago and I didn't make any config changes.
I've reinstalled eclipse + sdk - same problem (this
Created another AVD - and getting a Power Off message (and wait animation)
on emulator startup.
Nothing else happens.
On Monday, September 1, 2014 1:20:47 PM UTC-4, dashman wrote:
I created a new emulator.
Defined it as a standard phone - nexus 4.
When the Window is displayed - it's
I created a new emulator.
Defined it as a standard phone - nexus 4.
When the Window is displayed - it's in portrait orientation (i.e. the frame)
But the contents of the window (i.e. the emulated screen is landscape -
rotated 90 deg. to the right.
i..e if I turn my head right 90 deg - then
There are some serious problems with the Google Play geofencing api.
Most notably - not detecting fence transitions.
Wrote my own.
On Tuesday, July 29, 2014 2:10:08 AM UTC-4, Abhishek Kumar Gupta wrote:
In Android 4.4+ versions, I am not able to add/remove geofence over
3G/WiFi. Every
Can one assume that the menu icon (3 veritical dots) will always be on the
top-right corner.
Reason - I'm creating some app hint screens and would like to point int the
direction of the
menu icon.
--
You received this message because you are subscribed to the Google
Groups Android
Is it possible to create a shape with a pattern fill - instead of a solid
color.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send
I've got an activity and would like to set the background to the current
theme background color.
I set the activity's layout android:background=?android:windowBackground
and that seems to work
Inside the activity I would like to draw some boxes/panels and set the
background to a slightly
I'm creating a custom view and would like to set the background color to the
current theme's background color.
How do I do it?
I know the solution entails themes and attributes - but not too sure.
Is there a list of all the relevent values for a given OS version (e.g
.Android 3.0)
--
You
I've got a simple .9.png file.
Trying to create a red background with a 1-pixel gray border.
My png file is 5x5 pixels
--B--
-GGG-
BGRG-
-GGG-
-
B black
G gray - hex 99
R red
- transparent
The problem is when the image is displayed - it seems to display
a gradient - gray from the
Thank you.
That was it - spent 3 hrs on this!!!
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
I'm trying to implement a horizontal view class that holds list-items
that are created using a layout.
The problem is when I scroll the listview and then lift my finger up -
singleTap gets registered by the children inside the list-items (e.g. a
button)
I don't want that - it was a scroll
Is it possible to create a preference screen which has normal
preference categories (i.e. checkbox etc) along with PreferenceHeaders
(i.e. invokes a new PreferenceFragment w/ an intent)
Thanks.
This is for 3.0+
--
You received this message because you are subscribed to the Google
Groups
/settings.html#Custom
On Fri, May 30, 2014 at 5:17 PM, dashman erjd...@gmail.com javascript:
wrote:
Is it possible to create a custom layout entry/row
- i'd like a togglebutton + an imagebutton on the same preference row.
--
You received this message because you are subscribed to the Google
Is it possible to create a custom layout entry/row
- i'd like a togglebutton + an imagebutton on the same preference row.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
/action_settings /
item
android:id=@+id/action_log
android:orderInCategory=100
android:title=@string/action_log
app:showAsAction=never/
/menu
On Monday, May 26, 2014 10:22:21 PM UTC-4, uudashr wrote:
How did you write the menu.xml?
On May 27, 2014 2:03 AM, dashman erjd
I've decided to write my app API 11 (Honeycomb) or later.
So I don't need the support library.
In my activity, I have an ActionBar - getActionBar() returns an object.
The activity style is derived from Theme.Holo.
But I don't see the 3 vertical dots for the menu on the right side.
If I use
I've got a service that I'd like to be active in the background.
But when I delete the associated app from the Android recently used
list - it kills the service also. I assume because it's running in the
same process. Though I do not get the service.onDestroy() call.
Any way to prevent this.
In
Some additional info...after remove the app from the Recents list...
I went to the Android app running page and the service IS running/active.
The problem is next time I start the main activity/app, in the onCreate()
method I'm calling startService() and that seems to be recreating the
service.
Yes I did look at that.
I chose to implement the MessengerService example because I want
the main activity to receive messages from the service also.
I believe the implementation is exactlly the same.
In the main activity onCreate(), I have
startService( new Intent( this, MainService.class) );
calling startForeground() seems to have done the trick.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
I updated to ADT 22.6.3 and having problems.
On Eclipse startup getting an error message to update ADT.
I read some other messages and went to eclipse install-new-software.
and tried to update from https://dl-ssl.google.com/android/eclipse/
When I try to update the ADT from there...
I get
to find required software and try again.
Marina
On Wed, May 21, 2014 at 11:37 AM, dashman erjd...@gmail.com javascript:
wrote:
I updated to ADT 22.6.3 and having problems.
On Eclipse startup getting an error message to update ADT.
I read some other messages and went to eclipse
I'm trying to design my app for different size screens.
When setting view paddings - i'd like to set the dimension based on screen
size.
I think I have 2 options.
use dimens or custom attributes.
Which one would be preferred?
--
You received this message because you are subscribed to the
I can do a custom app specific padding
dimen name=my_padding16dp/dimen
or
attr name=my_padding format=reference|dimension /
style name=custom
item name=my_padding16dp/item/style
I think both accomplish similar end goal right? i.e. not hard-coding the number
in the layout file.
My
I'm writing an Android app and need a feature where users can type in a
a address (e.g. home address) and gets mapped to a lat/lon geo-position.
I know I need Geo-coding services - but there seems to be several APIs -
some kinda dated.
I'm using Google Maps API 2.0 and Google Play Services.
android:layout_alignParentLeft=true
android:layout_alignParentRight=true
No changes - still the full width of the parent View (not layout)
On Saturday, May 10, 2014 9:06:10 PM UTC-4, TreKing wrote:
On Sat, May 10, 2014 at 6:57 PM, dashman erjd...@gmail.com
variable for both the parent and child (see
dimensions.xml), will save you the headache understanding android's layout
mechanism.
On Sunday, May 11, 2014 3:37:09 PM UTC+3, dashman wrote:
android:layout_alignParentLeft=true
android:layout_alignParentRight=true
No changes
I've got a layout (that's a listitem) and want to set a fixed width.
(it's a horizontal listview)
?xml version=1.0 encoding=utf-8?
RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=60dp
android:layout_height=wrap_content
Button
I've got custom views inside a listview.
I've noticed that built-in widgets and other apps have a certain behavior.
1. When an item is tapped (DOWN) to initiate a move - the item is not
hi-lighted (the listview starts to scroll)
2. When an item is held down for a little bit longer - then it's
I'd like to display char \u1F374 in a textview.
Not working!
the char is there because I can view with the store app Unicode Map.
Do I have to select a specific font?
Just using default and setting string as \u1F374
Note the code is 5 digits.
--
You received this message because you are
My app locks and unlocks the lock screen.
I unlock/disable lock - by calling deviceManager.resetPassword( ,
DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY );
Next time the screen is turned on - the user gets a lock screen with no pin
input requirement - just has to slide it.
Happens just
I've got a main activity that starts it's own service - if it's not already
started
by the system on boot.
Right now I'm doing the bindService() call in onStart() and
unbind in onStop().
The problem is onStart() calls do not match onStop() - no 1:1 correlation.
Activity life-cycle explains
I'm getting a stacktrace like this
java.lang.NullPointerException
at com.myapp.bb.a(Unknown Source)
at com.myapp.bb.c(Unknown Source)
at com.myapp.bb.a(Unknown Source)
at com.myapp.DownloadService.a(Unknown Source)
at com.myapp.DownloadService.a(Unknown Source)
at
I've got a character stream that I get from a HTTP GET and store it in a
string.
The retrieve string has encoding w/ unicode escape codes (e.g. ABC\u0028DEF
etc)
When I take that string and display in a textView - the \u codes are
displayed as is - not translated to their equivalent ascii.
I'm writing an app that enables and disables the lockscreen.
Sometimes the lockscreen is on the screen - my app running
in the background disables it (actually sets the password length to zero).
Now the user enters their full password and it's no longer the valid - it's
blank.
Any way t o
.
On Thursday, January 30, 2014 7:43:11 PM UTC-5, TreKing wrote:
On Thu, Jan 30, 2014 at 5:14 PM, dashman erjd...@gmail.com
javascript:wrote:
I've got a service class that runs in the background.
I'd like to make calls from my main activity to the service object.
In the Activity.onCreate
);
startService(requestIntent);
The problem is that with the above - even if the service is active - it's
onCreate()
gets called again.
On Thursday, January 30, 2014 7:43:11 PM UTC-5, TreKing wrote:
On Thu, Jan 30, 2014 at 5:14 PM, dashman erjd...@gmail.com
javascript:wrote:
I've
Absolutely - happy to explain.
My service can be started at phone bootup - works wonderfully.
Now when the user starts my app (Activity) - in the onCreate method
i want to see if the service is running - if not running - i want to run it.
I've taken your advice and in the
The service doesn't do much right now - in fact I'm not creating a worker
thread in onStartCommand()
But it is a listener for some system callbacks - but later I might add a
worker thread - will always be running.
Basically I want a single instance of the service running all the time.
I read
What's confusing is this.
I've got the app and service running.
Then using the active app-list option of the launcher, I remove the app.
I would think this would kill the app - but not the service.
Service.onDestroy() is not called.
But now if I restart the app - the Service.onCreate() is
:
2014-01-31 dashman erjd...@gmail.com javascript::
What's confusing is this.
I've got the app and service running.
Then using the active app-list option of the launcher, I remove the app.
I would think this would kill the app - but not the service.
Service.onDestroy() is not called
.
-- K
2014-02-01 dashman erjd...@gmail.com javascript::
I think your analysis is correct.
I also think it happens because my service doesn't create a worker thread.
In the onStartCommand() method - it sets up some system listeners and
returns STICKY.
So when the main app is being killed
calling startForeground() seems to have done the trick.
Not entirely comfortable because it's not a foreground service - but it
does need to be there on at least until the user tells it to stop -
I hope it's not eating up too much resources.
Thanks everyone.
--
You received this
Testing out a small geo-fence app.
it seems to work with mock locations and app in foreground.
but it's not working w/ real data locations.
the fence trigger is reported by Google API to an IntentService
sub-class.
My app is running in the background - would that cause not
receiving the fence
Same app - tested on a phone with Android 4.1 - triggers the geofence events
Same app tested on an Android 4.4 - does not trigger!!
I've got this in the manifest file
uses-sdk
android:minSdkVersion=11
android:targetSdkVersion=19 /
Incidentally, when i'm testing with mock
I've got a service class that runs in the background.
I'd like to make calls from my main activity to the service object.
In the Activity.onCreate() method - if the service is not running - i'd
like to start it.
The way i did it - was in the Service.onCreate() method - i set a static
variable
After doing some testing i found this.
If I delete an app from the app list - the system deletes the app and also
the associated
service.
It then takes about 10-30 seconds for the service to be restarted by the OS.
So if i start my app before the system has a chance to start the service -
My app enables lock-screen.
Have all the device-admin privs etc.
When i enable it - i just get the slider - not the password prompt.
devicePolicyManager.setPasswordQuality(
componentName,
DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED );
-to-unlock
prompt.
On Wednesday, January 29, 2014 10:47:15 AM UTC-5, dashman wrote:
My app enables lock-screen.
Have all the device-admin privs etc.
When i enable it - i just get the slider - not the password prompt.
devicePolicyManager.setPasswordQuality(
componentName
Looking into the Play Services Location API.
There's a concept of geofence.
Is there a call to find out (at any given time) whether you're
inside a geofence - as opposed to just enter/exit transitions
For example - at app startup - i'd like to know wx in any
geofence.
Thanks.
--
You received
I've got an app that enables itself as a device administrator.
I get the prompt to Activate - which I do.
I can call all the admin methods - e.g. lock the screen etc.
But the app doesn't show up on the
phone Settings Security Device Administrators
screen.
What could the problem be??
--
.
On Friday, January 24, 2014 12:21:06 PM UTC-5, 12169 wrote:
HI,
1) is app present in settings-manage apps?
2)or on the home screen ?
On Friday, January 24, 2014 5:51:38 AM UTC-8, dashman wrote:
I've got an app that enables itself as a device administrator.
I get the prompt
Ok found the problem.
In the manifest file - the receiver was defined as
receiver android:name=.LockScreenActivity$MyAdmin
android:label=@string/sample_device_admin
android:description=@string/sample_device_admin_description
I've got an EditTextPreference listener
public boolean onPreferenceChange (Preference preference, Object newValue)
returns true/false whether the new value needs to be saved or not.
I'd like to change newValue before being saved - e.g. trim and convert to
uppercase.
Any help?
I tried a
I've got a canvas that's a sole child of a scrollview.
i'm intercepting motion events.
i get the ACTION_DOWN but i frequently get ACTION_CANCEL
before i get ACTION_UP.
I think the reason is that the motion events is being captured by
the parent scrollview.
Anyway to prevent that from
in my view class, i'm intercepting
public boolean onTouchEvent(MotionEvent event)
when i drag my finger across the screen.
i get ACTION_DOWN and then after some time ACTION_CANCEL.
i would like to get ACTION_DOWN...ACTION_MOVE and then
eventually ACTION_UP.
--
You received this
I've got a Dialog sub-class with a textview - the view contains html with
weburls.
the links are not working - here's my code
My class is derived from android.app.Dialog - in the constructor i have:
TextView textView1 = (TextView)findViewById(
R.id.about_about_textview );
!
On Tue, Aug 13, 2013 at 7:46 PM, dashman erjd...@gmail.com
javascript:wrote:
I've got a Dialog sub-class with a textview - the view contains html with
weburls.
the links are not working - here's my code
My class is derived from android.app.Dialog - in the constructor i have
The link is anchored type - a href=http://www.google.com;xxx/a
As i wrote earlier - the text is in blue and underlined.
i'm actually calling the following - after the dialog.show()
Linkify.addLinks(textView1, Linkify.ALL);
I'm writing a data file to my app folder
/Android/data/package/files
and the file is visible from my android phone file explorer app.
But when I use the desktop Windows file explorer - it's not visible.
This is how i'm writing the file out:
File storageFolder =
Yes - it's connected via USB as an MTP device.
I can see the folder in the Windows explorer - but not
the file that i created.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
This is a Droid Razr HD.
I don't get a prompt to mount.
USB debugging is enabled and it auto connects via MTP.
In Windows Explorer, I can access the device storage - but
there's no virtual drive (e.g. F:) created.
On Tuesday, August 6, 2013 1:59:21 PM UTC-4, dashman wrote:
I'm writing
I've got an ExpandableListView and would like to write
the full view to a bitmap - not just a screenful.
i.e. if the view has a 100 entries - write it out to a long bitmap.
I'm using listview.draw(canvas) and it's set to a long/tall bitmap.
The problem is the draw() function seems to write only
I've got a custom view that's a child of a LinearLayout that's a child of a
ScrollView.
In layout xml file, the height of the custom view and LinearLayout is set
as WRAP_CONTENT.
I'd like to set the height of the custom view dynamically.
@Override
protected void onMeasure(int
I have my apk file served from own server and have set the mime type
correctly.
On being sent the url to the apk file, i would like the file to be
downloaded
and installed automatically.
But some users are writing that it installs only - then they have to click
on the download notifcation to
My quest was the file to be downloaded and then the installation
process to begin automatically - along with the permissions review.
Right now it just downloads - and the user has be be savvy enough
to know the notifications bar and tap on the entry to start the process.
I would like the
I'm using
((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number()
to retrieve the tel# of the device and then create a serial# out of it.
Some users have installed a telephony app (magic jack) that inhibits the
reporting
of the tel# - getLine1Number() reports
There's something seriously wrong with google merchant support.
I'm just trying to open a google checkout and the simple signup
forms do not work and no support.
Also there seems to be a pattern of heavy handedness on the
part of google as far as payments and accounting goes.
On Tuesday,
developing for android on a mac laptop.
any issues?
compatible with eclipse and the sdk.
i plan to have my main dev on a windows desktop.
are the files compatible across the two platforms at the binary
level.
--
--
You received this message because you are subscribed to the Google
Groups
I have a DialogFragment subclass and would like to open
up as full screen in certain conditions (e.g. on a small screen).
The current app is a viewpager with 3 fragments.
The code below replaces the active fragment - instead of
taking up the full screen.
InputDialog inputDialog = new
Looks like AGPS uses WIFI and cell-phone tower locations.
The problem for my app is that I don't necessarily have access
to data service - so AGPS will not work.
Even though I want to do want AGPS does - i.e. provide a
start location for getting satellite queries. But my understanding
is that
I'd like to improve the gps lock time.
my app does not require a data plan - so i have to do it w/o
internet access.
but i've got a pretty good idea where the user might be (very app specific).
is there any way to initialize the LocationManager gps provider with a
starting point for the lock -
ok - maybe there's other methods.
i've seen apps decrease lock time by contacting NTP servers.
Also apparently assisted gps helps - assisted gps just gets a
wifi geo location - and just using that helps.
i have a geo location also.
i'm sure gps lock speeds can be decreased if you have an
I'm calling context.getExternalFilesDir(null) and get
/storage/sdcard0/Android/data/my-package/files
calling Environment.getExternalStorageDirectory() i get /storage/sdcard0
sdcard0 - that's the internal memory card right?
how do i get access to the external memory card, if available.
I
in file explorer, i see a path to /storage/sdcard1
but there doesn't seem to be an api to access it.
especially with the data/my-package/files setup
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I noticed that if the Android BACK key is pressed, the Activity
saveInstanceData() is not called.
I understand that.
Is there a way to intercept the BACK key - prompt the user
to confirm exit or something.
What's the proper UI functionality when the BACK key is pressed.
--
--
You received
So I'm trying to obfuscate my code
I'm using reflection to get the package name.
i also plan to use proguard.
i understand variables xxx and yyy will be abfuscated by proguard.
android.content.pm.PackageManager xxx=
(android.content.pm.PackageManager)yyy.invoke( context );
but
Mark,
I think you should write a toolkit to protect Android apps.
Looks like it has to be done in native code - an app along with a how-to
documentation
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send
Thank you for some excellent suggestions.
I've watched that google i/o a few times.
i problem is actually doing it. e.g. just looking at the NDK and wish they
had a sample to read the package info etc.
offloading app logic to server is a great idea - but my app is designed to
work while
Any system launcher is fine.
What I'm trying to solve is the piracy issue.
i.e. someone just wrapping my app and launching it.
i want to disable that.
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email
ok - message received.
on to other things...
On Thursday, February 28, 2013 11:25:47 AM UTC-5, Kristopher Micinski wrote:
Mark's right, this is a complete nonsolution to the piracy issue.
Kris
On Thu, Feb 28, 2013 at 7:46 AM, dashman erjd...@gmail.com javascript:
wrote:
Any system
Is there any way to detect whether an activity was started by the
Android os launcher as opposed to another activity.
Or put another way - is there wa way to force an activity not
be launchable (sp?) by another activity.
--
--
You received this message because you are subscribed to the Google
1 - 100 of 372 matches
Mail list logo