android-5.0-lollipop

Bazaar(Iranian Android Market) inAppBilling error in Android 5 Lollipop

自作多情 提交于 2019-12-12 09:56:18
问题 For inAppBilling in my app use Bazaar(Iranian Android Market) API. All things are right but in in Android 5 Lollipop this not work correctly and return error : After many search found this similar problem and this link too this one.( solutions are similar together ) So I try to adding this line : serviceIntent.setPackage("ir.cafebazaar.pardakht"); After this line: Intent serviceIntent = new Intent("ir.cafebazaar.pardakht.InAppBillingService.BIND"); Now app return this Errors : java.lang

How to remove this gray color from topbar/status bar

只愿长相守 提交于 2019-12-12 09:45:49
问题 I have an app where I have set the top bar / status bar to ascent colors, its working for most screens on lollipop but having an issue on one of the screen its an activity. The code is as follows: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.realsales.reatsalesapp.activities.EditContactActivity"> <android.support.v7.widget

Can't override textAllCaps for buttons on style under android 21

旧时模样 提交于 2019-12-12 08:33:14
问题 This is how I set my buttons. <Button android:id="@+id/button_login" style="@style/ButtonStyle" android:text="@string/button_login" /> This is my style on values folder. <style name="ButtonStyle" parent="ButtonStyleBase" /> <style name="ButtonStyleBase"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_marginTop">@dimen/padding</item> <item name="android:textSize">@dimen/font_regular</item> <item name=

BackupManagerService restoration timeout leads to force stop

♀尐吖头ヾ 提交于 2019-12-12 07:58:44
问题 Since yesterday, my Nexus 5 is running Lollipop and the application I am working on is stopping without any crash. Each time it exits, the device logs the following: 11-20 00:23:32.679: I/ActivityManager(723): START u0 {flg=0x14008000 cmp=com.mycompany.android/.app.LoginActivity} from uid 10549 on display 0 11-20 00:23:32.713: W/ActivityManager(723): Duplicate finish request for ActivityRecord{2cd672e4 u0 com.mycompany.android/.app.StartupActivity t39 f} 11-20 00:23:32.926: I/ActivityManager

Android 5.0: howto change Overview Screen Task Title background color

て烟熏妆下的殇ゞ 提交于 2019-12-12 07:51:57
问题 The new Android 5.0 Lollipop Overview Screen features each App's Task with a screenshot and a (by default) grey title bar. Some Lollipop Apps (For example the new Play Store) use different colours. How can the colour of the Overview Screen title background be changed? 回答1: In general, if you're targeting Material then you should set colorPrimary (action bar, recents), colorPrimaryDark (status bar), and colorAccent (check boxes, progress bars, etc) in your theme. That said, you can dynamically

How to implement Custom Collapsable Toolbar in android?

社会主义新天地 提交于 2019-12-12 07:30:40
问题 Using this tutorial to implement a Flexible Space pattern (the one with the collapsing toolbar). I'm trying to achieve a similar effect as in the Lollipop Contacts activity , which at the beginning while entering the activity, views are only part of the image header: Then, the user can scroll down the layout below the image in order to reveal more of it, until it reaches the maximum: In my app, I can't manage to make it work. What happens is that when entering the activity, the image header

How to add ripple effect on Android Action bar button click event?

跟風遠走 提交于 2019-12-12 05:27:48
问题 I have implemented ripple effect on button, list-view click in my application . Now i want to add ripple effect on Action Bar button click Please give me the solution 回答1: Check out here Snapshot: MainActivity.java: package com.andexert.rippleeffect; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log;

Maintaining backward compatibility with Material Design

房东的猫 提交于 2019-12-12 04:48:35
问题 I'm trying to implement an activity that has the Material Design tinted title bar. My standard style is: <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> </style> My v21 style is: <style name="AppTheme" parent=" -see rest of this post- "> <item name="android:colorPrimary">@color/primary</item> <item name="android:colorPrimaryDark">@color/primary_dark</item> <item name="android:colorAccent">@color/accent</item> </style> and the results I get are: API 18: MyActivity extends

Android Navigation drawer UI different displayed in Below SDK 22

余生颓废 提交于 2019-12-12 04:30:22
问题 Navigation drawer working pretty in above SDK 23 and same app execute on below SDK 22 its Title not appear in navigation drawer...It's showing as blank screen Actionbar title. Below is my NavigationDrwer .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="http://schemas.android.com/tools" android:id="@+id/coordinateLayout" android

Get Persistable SD Cad write Permission using SAF

纵饮孤独 提交于 2019-12-12 03:52:34
问题 In my application, list of Image files is inflated in recyclerview. Then after application edits the metadata of Image file. My code for writing metadata:- DocumentFile fos = DocumentFile.fromFile(new File(fileIn)); ByteSource bytsInputStream = new ByteSourceFile(new File(fileIn)); byte[] byteArrayInputStream = bytsInputStream.getAll(); try { ParcelFileDescriptor pfd = context.getContentResolver(). openFileDescriptor(fos.getUri(), "w"); FileOutputStream fileOutputStream = new FileOutputStream