TouchBoarder/weekdays-buttons-bar

com.github.afollestad:TextDrawable:c32bc48d86 doesn't exist anymore

csbenz opened this issue · 8 comments

The lib com.github.afollestad:TextDrawable:c32bc48d86 is gone.
You can replace it with:
https://github.com/amulyakhare/TextDrawable
in the build.gradle

@csbenz Does that solution work? If yes can you show me your build.gradle file because its not working for me!

@csbenz thanks for reporting this issue. I'll fix this as soon as possible.

@majid701 @TouchBoarder Sorry I haven't tried with amulyakhare's library. But afollestad's is gone and this project is broken. I was suggesting a lib that was I think forked from the original

@csbenz I have tried the amulyakhare's lib and it doesn't work.
@TouchBoarder Can you fix this fast please because i can't find other librarys on the internet for week day chosing purpose, thanks :)

@csbenz, @majid701 The library have been updated with https://github.com/amulyakhare/TextDrawable, so there is some changes to the TextDrawable builder. See updated readme.md for details.

compile 'com.github.TouchBoarder:weekdays-buttons-bar:v1.0.2'

@csbenz @TouchBoarder The compiling of the library now works fine. Thanks for the quick fix but I have another problem and I am unable to make it work. When i run my application it gives the following exception:

java.lang.IllegalStateException: Weeekdays Buttons was unable to attach to your Layout, required [ViewStub],[recycleView] or ['parent' View] doesn't exist.

I'm not using it directly inside an activity, but inside a fragment which is contained in an activity that extends AppCompatActivity, And in my fragment I am doing:

wds = new WeekdaysDataSource((AppCompatActivity) getActivity(), R.id.weekdays_stub).start(callback);

The casting is working fine because I'm not getting any errors regarding that. So I thought the issue could be that the ViewStub needs to be wrapped inside a parent layout (ex: LinearLayout) like you did in the example inside the readme file. But that is not working as well.

Here is how I am using it inside my fragment layout file (the parent is a RelativeLayout):

<LinearLayout
android:minHeight="1000dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/btn_checkin"
android:orientation="vertical"
android:layout_marginBottom="200dp"
android:padding="8dp">

<ViewStub
android:id="@+id/weekdays_stub"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"/>
</LinearLayout>

But still throws exception and It's not working. Please tell me if I am doing something wrong :(

@csbenz please create a new issue for this .
So for Fragments you need to provide the 'parent' view in the constructor.

new WeekdaysDataSource((AppCompatActivity) getActivity(), R.id.weekdays_stub, parent_view) .start(callback);

The parent_view is the inflated layout returned from the fragment onCreateView or given in the onViewCreated method.

@TouchBoarder thanks bro, It works like a charm and sorry for not creating a separate issue for the problem.