This file contains hidden or 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
Usage: MyToast.show(context, "MyToast Sample", true); | |
public class MyToast { | |
public static void show(Context context, String text, boolean isLong) { | |
LayoutInflater inflater = LayoutInflater.from(context); | |
View layout = inflater.inflate(R.layout.toast_layout, null); | |
ImageView image = (ImageView) layout.findViewById(R.id.toast_image); | |
image.setImageResource(R.drawable.ic_launcher); |
This file contains hidden or 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 MainActivity extends AppCompatActivity implements RecyclerItemClickListener.OnItemClickListener{ | |
private RecyclerView recyclerView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
recyclerView = (RecyclerView) rootView.findViewById(R.id.recycleview); | |
//set you adapter |
NewerOlder