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
@Override | |
public VH onCreateViewHolder(ViewGroup parent, int viewType) { | |
ViewGroup view = (ViewGroup) LayoutInflater.from(parent.getContext()).inflate(mModelLayout, parent, false); | |
try { | |
Constructor<VH> constructor = mViewHolderClass.getConstructor(View.class); | |
return constructor.newInstance(view); | |
} catch (NoSuchMethodException e) { | |
throw new RuntimeException(e); | |
} catch (InvocationTargetException e) { | |
throw new RuntimeException(e); |
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
class ViewHolder1 extends RecyclerView.ViewHolder { | |
... | |
} | |
class ViewHolder2 extends RecyclerView.ViewHolder { | |
... | |
} | |
class ViewHolder3 extends RecyclerView.ViewHolder { | |
... |
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
mAdapter = new FirebaseRecyclerAdapter<User, RecyclerView.ViewHolder>( | |
User.class, R.layout.item_user, RecyclerView.ViewHolder.class, ref) { | |
@Override | |
protected void populateViewHolder(final RecyclerView.ViewHolder viewHolder, final User user, | |
final int position) { | |
switch (user.getType()) { | |
case Constants.USER_TYPE_1: | |
populateType1((ViewHolder1) viewHolder, user, position); | |
break; | |
case Constants.USER_TYPE_2: |
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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<TextView | |
android:id="@+id/txt_left" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_alignParentLeft="true" | |
android:layout_alignParentStart="true" |
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
<android.support.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@android:color/white"> | |
<!-- Some conetnt --> | |
</android.support.design.widget.CoordinatorLayout> |
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 Printer { | |
private void printHello() { | |
System.out.println("Hello World"); | |
} | |
private class Test { | |
private void testPrint() { | |
printHello(); | |
} | |
} |
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
// Delete a remote branch | |
git push origin --delete <branch_name> | |
// Delete a local branch | |
git branch -d <branch_name> | |
// Force delete a local branch | |
git branch -D <branch_name> |
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 User { | |
private String userId; | |
private String email; | |
private String userName; | |
private String name; | |
private String phNumber; | |
private String country; | |
private String profilePic; |
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
class User { | |
var userId: String? = null | |
var email: String? = null | |
var userName: String? = null | |
var name: String? = null | |
var phNumber: String? = null | |
var country: String? = null | |
var profilePic: String? = null |
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
class User { | |
var userId: String = "" | |
var email: String = "" | |
var userName: String = "" | |
var name: String = "" | |
var phNumber: String = "" | |
var country: String = "" | |
var profilePic: String = "" |
OlderNewer