activity

Using FLAG_SHOW_WHEN_LOCKED with disableKeyguard() in secured Android lock screen

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The Context Recently, I have been looking for reliable ways to control a secured Android Keyguard. Mainly to display a custom lock screen. I know that Google had stated custom lock screens are not officially supported by the platform and should expect things to break, however, with the existing APIs, I believe there must be ways to do this. I have done tons of research for about a week but still having problem here and there. What I have implemented, assuming a secured Keyguard is enabled, so far are, WindowManager.LayoutParams.FLAG_SHOW

Android Material Design profile page [closed]

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm new to android and material design. Could some one please help me point to any websites that help me build a profile screen as below as per Google's material design guidelines? 回答1: I was about to write a blog on this screen briefing about CoordinatorLayout . Anyways.. You can have my fully working code.: activity_scrolling.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools=

No Activity found to handle Intent com.android.camera.action.CROP

匿名 (未验证) 提交于 2019-12-03 02:43:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to do a picture from my application. I can launch the camera and do the picture, but when has finish to do the picture my app crash. I can see in my screen that my Galery is stopped and this is the error in my log: I've tried to find something but any help me. Thanks in advance FATAL EXCEPTION: main android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///data/data/com.android.gallery3d/files/crop-temp (has extras) } at android.app.Instrumentation

Error type 3: Activity Class {…} does not exist

匿名 (未验证) 提交于 2019-12-03 02:43:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: AndroidManifest: ..... Error : Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.m.e/.Splash } Error type 3 Error: Activity class {com.m.e/com.m.e.Splash} does not exist. Note: .Splash does exist. 回答1: In build.gradle , the line: apply plugin: 'android-library' needs changed to: apply plugin: 'com.android.application' 回答2: I had the same error after renaming/refactoring. What I did was add the applicationId property attribute to my build.gradle file, and set its value to the application package.

Android Studio Navigation Draw Activity

匿名 (未验证) 提交于 2019-12-03 02:43:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am creating an App with a Navigation Draw Activity. In android studio, after I start a new android activity project, I select Navigation draw activity. My question is, how to a change the background color of the navigation draw activity? Right now, the top part is green but the white part where the text and icons are is white and I want to change this white part to dark grey with white text. Thanks. Rob 回答1: Go to res -> layout -> activity_main.xml and add the following: <android.support.design.widget.NavigationView app:itemTextColor="

“Error Parsing XML: XML declaration not well-formed” [android]

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting the titled error in my AndroidManifest.xml file. The error is on the line below the < / manifest>. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.contactpicker" <uses-permission android:name="android.permission.READ_CONTACTS"/> <application android:icon="@drawable/ic_launcher"> <activity android:name=".ContactPicker" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.PICK"></action> <category android:name=

Embed external Intent in main Activity

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have seen a number of examples of using an ActivityGroup to embed multiple Activites in a single view. In each of these cases, the Activities being loaded are internal to the current application. In addition, they all appear to take over the entire view. I would like to start an external Activity using an Intent for a particular mime type. Specifically, if the device has a PDF viewer installed, I would like to start that Activity to view a PDF. However, I would like it to appear within the View of my running application Activity, keeping

return value to fragment from activity android

匿名 (未验证) 提交于 2019-12-03 02:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have Fragment(F) which calls the activity(A). On press of button(B) in activity(A) the activity must return selected arraylist value back to fragment(F) and finish activity(A)... is this possible? I know from Activity you can send data with intent as: Bundle bundle = new Bundle(); bundle.putString("key", "value"); // set Fragmentclass Arguments Fragmentclass fragmentobj = new Fragmentclass(); fragmentobj.setArguments(bundle); in Fragment onCreateView method: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,

Activity has leaked ServiceConnection com.google.android.youtube.player that was originally bound here

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using an Activity that has a layout with android.support.v4.view.ViewPager that I used to manipulate Tab navigation. I have different Fragments for different Tabs. On my third Tab, I'm loading some YouTube thumbnails from my YouTube account. When I load the application (when I'm staying at the first Tab) and press Back to exit from the application, it exists without any issue. But when I navigate to second Tab and try to press Back button, app exists with an error as follow. E/ActivityThread(7187): Activity package.name.ActivityName has

Keep app running in background on Android all the time

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have to get people's trajectory (from home to job, for example), so my app gets latitude and longitude (I have two buttons: 1. Start to get lat and lon 2. Stop to get lat and lon). However, I want that android does not kill the app, I want to keep my application running while the user use facebook, twitter (for example) or simply the user locks his smartphone. My app works fine when user use the app while using facebook or twitter (for example), but when I lock my smartphone, Android kill the app. I have tried to use intentservice and