For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: ubuntu:22.04 | |
variables: | |
ANDROID_COMPILE_SDK: "33" | |
ANDROID_BUILD_TOOLS: "33.0.2" | |
EMULATOR_IMAGE: "24" | |
SDK_TOOLS: "9477386" # from https://developer.android.com/studio/#command-tools | |
before_script: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import java.util.concurrent.TimeUnit; | |
import rx.Observable; | |
import rx.Observer; | |
import rx.Subscription; |
Centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.
A very good way is to separate gradle build files, defining something like:
root
--gradleScript
----dependencies.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClickToSelectEditText<T extends Listable> extends AppCompactEditText { | |
List<T> mItems; | |
String[] mListableItems; | |
CharSequence mHint; | |
OnItemSelectedListener<T> onItemSelectedListener; | |
public ClickToSelectEditText(Context context) { | |
super(context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.Button; | |
import android.widget.TextView; | |
/** | |
* Created by khaled bakhtiari on 10/26/2014. | |
* <a href="http://about.me/kh.bakhtiari"> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.stf.threelevelexpandablelistview; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseExpandableListAdapter; | |
import android.widget.ExpandableListView; |
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example: