crouton

Setting the duration of Crouton messages in Android

戏子无情 提交于 2020-01-01 09:38:28
问题 I have started using Crouton messages instead of toast messages because I could configure the time duration. Is there any way I can keep displaying the crouton message until a particular event rather than specifying the time in definite units? 回答1: You can set the Crouton's duration to INFINITE from within the Configuration . Then add an OnClickListener to it in which you call Crouton.hide(...) like this: final Crouton crouton = Crouton.makeText(new Activity(), "foo", Style.ALERT)

Using custom layouts for the crouton library

强颜欢笑 提交于 2019-12-23 03:03:32
问题 I've got the crouton library ( https://github.com/keyboardsurfer/Crouton ) working with the default layout for notifications. I would like to use a custom layout xml file for the notifications so I could set a different typeface to the TextView to match the rest of my application. I have extended a TextView to get the custom typeface working. Browsing the source for the library, I found a couple of methods that will probably help me: public static Crouton make(Activity activity, View

I can't access Crouton library in Eclipse

限于喜欢 提交于 2019-12-21 05:25:17
问题 I followed all the steps for using the crouton library with Eclipse, but I still have not been able to use it. Here are the steps I followed: Clone the Crouton library from GitHub. Unzipped the file and copied out the library folder. Open eclipse and import the library into the workspace (The name changes to 'main'). Right-click on 'main' and select Add Support Library in the android tools option. Open project properties set build target to 4.4.2, and tick 'is library'. In the project which I

Scrolling text in Crouton Library

早过忘川 提交于 2019-12-10 10:15:30
问题 The crouton library can be found on Github And my question is if it's possible how to make the text displayed in the Crouton scrolling horizontally. In a TextView it can be done like this: android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit ="marquee_forever" android:scrollHorizontally="true" android:focusable="true" android:focusableInTouchMode="true" But is this also possible in a Crouton? I appreciate every help/answer! 回答1: You can provide a custom View to

Notification like whatsapp or sms app android

这一生的挚爱 提交于 2019-12-09 18:36:28
问题 I want to create a Notification view just like whatsapp or sms notification.How can i achieve that. What I have search till now Crouton : Can found here this will show a crouton at running activity and below to the action bar. if my activity not running or i am on the other activity how can this handle. Toast : this is not looking like a toast. It show only on bottom or center . Dialog : this can be done like this but this will blur the application. and disable the background. And i don't

Adding library in Android Studio make “UNEXPECTED TOP-LEVEL EXCEPTION”

假如想象 提交于 2019-12-08 09:58:51
问题 I'm trying to add libraries from maven, specifically, Crouton library. I can add it, Sync and use the Crouton object in my project, but when trying to run the app, i get this FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':timetable:preDexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files (x86)\Android\android-studio\sdk\build-tools\19.0.1\dx.bat --dex --output D:\Developer\TimeTable3\timetable\build

Adding library in Android Studio make “UNEXPECTED TOP-LEVEL EXCEPTION”

谁说我不能喝 提交于 2019-12-08 01:10:27
I'm trying to add libraries from maven, specifically, Crouton library. I can add it, Sync and use the Crouton object in my project, but when trying to run the app, i get this FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':timetable:preDexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files (x86)\Android\android-studio\sdk\build-tools\19.0.1\dx.bat --dex --output D:\Developer\TimeTable3\timetable\build\pre-dexed\debug\crouton-library-1.8.2-c968ce53b92080dec516373cec51e9993ca5051f.jar C:\Users\Shahar\

java.lang.NoClassDefFoundError when crouton library in eclipse

吃可爱长大的小学妹 提交于 2019-12-07 18:14:41
问题 I was finally able to find my crouton library, after getting solutions for this question on SO. I was directed to maven central where i downloaded crouton-1.8.4 the third of size 24kb on a list at the bottom of the page. Then i copied it into the libs folder in my android project, added it to build path, and checked it in the order and export panel. This solved the problem i was facing then in the question i asked before. The code i tried to run was Crouton.makeText(this, "BAD Crouton", Style

Scrolling text in Crouton Library

女生的网名这么多〃 提交于 2019-12-05 23:59:46
The crouton library can be found on Github And my question is if it's possible how to make the text displayed in the Crouton scrolling horizontally. In a TextView it can be done like this: android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit ="marquee_forever" android:scrollHorizontally="true" android:focusable="true" android:focusableInTouchMode="true" But is this also possible in a Crouton? I appreciate every help/answer! You can provide a custom View to Crouton via Crouton.show(Activity, View) and it's equivalent Crouton.make(...) methods. You custom View can

java.lang.NoClassDefFoundError when crouton library in eclipse

匆匆过客 提交于 2019-12-05 22:09:24
I was finally able to find my crouton library, after getting solutions for this question on SO. I was directed to maven central where i downloaded crouton-1.8.4 the third of size 24kb on a list at the bottom of the page. Then i copied it into the libs folder in my android project, added it to build path, and checked it in the order and export panel. This solved the problem i was facing then in the question i asked before. The code i tried to run was Crouton.makeText(this, "BAD Crouton", Style.ALERT); just to see if it works. I i'm testing it on a 4.4.2 emulator. And i also tried it on a 2.2