activity

Setting android:hardwareAccelerated=“true” in <activity> or in <application>

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want my app, which relies heavily on GPU, to use hardware acceleration. On some forums I've been suggested to set android:hardwareAccelerated="true" inside <application> and on other forums same attribute inside <activity> inside my AndroidManifest.xml . Below is the representation of what it looks like: <application ... android:hardwareAccelerated="true" ...> <activity ... android:hardwareAccelerated="true" ...> </activity> </application> I ended up setting in both, yet I wonder, which one is the right way, and what is the difference? 回答1

Android: How to start an Activity in the background?

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to start an Activity in the background? I need such an Activity that can operate in the background and spawn other Activities as needed in response to user commands issued to my Home Screen widget. 回答1: Is it possible to start an Activity in the background? No. I need such an Activity that can operate in the background and spawn other Activities as needed in response to user commands issued to my Home Screen widget. Your AppWidgetProvider can "spawn other Activities as needed in response to user commands issued to my Home

Android: Client not ready yet..Waiting for process to come online

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I had error , whenever i try to launch the app it crashes. I tried few times using virtual and also my mobile, but it still doesn;t works I'm using firebase auth and database in the project, although there are no errors, i wonder does it has any affect to the error. $ adb shell am start -n "com.example.juice.health/com.example.juice.health.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to process 3016 on device Nexus_5X_API_23 [emulator-5554]

unable to startActivity master-detail from another activity

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've an activity WelcomeActivity.java in which theres a button bContinue. In the OnClick method of the button, I tried this.. startActivity ( new Intent ( this , MenuItemDetailActivity . class )); //startActivity(new Intent("com.resto.demo.activity.MENUITEMLISTACTIVITY")); neither of the above 2 lines work. instead they give me NullPointerException & the program ends abruptly..I cant find the problem.. is the problem in manifest or my call? <activity android:name = "com.resto.demo.activity.MenuItemListActivity" android:label = "

How to keep user Logged-In always “Connected with Server”

匿名 (未验证) 提交于 2019-12-03 01:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm working on an App, where I wanted the user to keep logged-in means always connected to the server after successful login(just like facebook app). I tried to google this but did not found any correct logic of this. Many website suggests to use SharedPreference but keeping the user's login cred. on SheredPreference is not good idea and did not provide any answer to stay connected to the server. I'm kinda stuck with this idea. I just need logic to implement this. Any suggestions and example code are welcome. I'm android noob. 回答1:

Android. Why would an image in activity 1 end up in activity 2? (Zxing CaptureActivity is activity 2)

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: All was going well developing a new app until I started dressing up the interface. I have implemented the zxing barcode scanner within my project for user convenience and my custom control. The only changes I make to the CaptureActivity are in handling the scan results. I also shot through the AndroidManifest.xml and took away the intent filters to avoid my app from being offered for the requests the barcode scanner app handles. (It doesn't feel right having the android OS offer my activity alongside of the hard earned "awesomeness" of Xzing

Changing fragment from SearchView submit aka Cascading down the backstack

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm currently using a SearchView object in order to give my application functionality for suggested input. This widget however, when submitted, uses an intent-filter to to initiate your searching. This is great when my application is run on a phone because what I want to do is launch a Search Results Activity to display the response. However on a tablet I want it to load my search results in a Fragment located in the current Activity ! I want my app to be as unified as possible (In terms of crossover between phone/tab) so instead

How to call getWindow() outside an Activity in Android?

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to organize my code and move repetitive functions to a single class. This line of code works fine inside a class that extends activity: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); However it is not working when I try to include it into an external class. How do I call getWindow() from another class to apply it inside an Activity? 回答1: Pass a reference of the activity when you create the class, and when calling relevant methods and use it. void

Opening Location Settings Activity from Chrome on Android

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to open location settings from Chrome (on Android) on a button click using Android Intents . I am following the Barcode Scanner example and tried encoding the url similar way. For location I have tried this:- const uri = "intent://com.google.android.gms.location.settings.GOOGLE_LOCATION_SETTINGS#Intent;action=com.google.android.gms.location.settings.GOOGLE_LOCATION_SETTINGS;end" I also tried opening settings using this:- const uri = "intent://ACTION_SETTINGS#Intent;action=android.provider.Settings.ACTION_SETTINGS;end" or this

Can&#039;t use Facebook Account Kit: Error inflating class com.facebook.accountkit.ui.ConstrainedLinearLayout

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to integrate Facebook AccountKit to allow users to sign-up with their e-mail or phone number. But when launching the AccountKitActivity, the app crash because it can't inflate a "ConstrainedLayout". Error message : java.lang.RuntimeException: Unable to start activity android.view.InflateException: Binary XML file line #45: Error inflating class com.facebook.accountkit.ui.ConstrainedLinearLayout And below: Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 12: TypedValue{t=0x3/d=0x512 "res