Skip to content

Commit

Permalink
Add KeyboardUtils
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Girgis <[email protected]>
  • Loading branch information
Mycoola committed Jan 30, 2020
1 parent 208a8da commit 63ae75d
Show file tree
Hide file tree
Showing 477 changed files with 12,042 additions and 26 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.libandexample.tutorials.codinginflow.mvvm

import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView

import androidx.recyclerview.widget.RecyclerView
import com.libandexample.R

import java.util.ArrayList
import java.util.*

class NoteAdapter : RecyclerView.Adapter<NoteAdapter.NoteHolder>() {
private var notes: List<Note> = ArrayList()
Expand Down Expand Up @@ -41,14 +39,11 @@ class NoteAdapter : RecyclerView.Adapter<NoteAdapter.NoteHolder>() {
}

inner class NoteHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val textViewTitle: TextView
val textViewDescription: TextView
val textViewPriority: TextView
val textViewTitle: TextView = itemView.findViewById(R.id.text_view_title)
val textViewDescription: TextView = itemView.findViewById(R.id.text_view_description)
val textViewPriority: TextView = itemView.findViewById(R.id.text_view_priority)

init {
textViewTitle = itemView.findViewById(R.id.text_view_title)
textViewDescription = itemView.findViewById(R.id.text_view_description)
textViewPriority = itemView.findViewById(R.id.text_view_priority)

itemView.setOnClickListener {
val position = adapterPosition
Expand Down
6 changes: 4 additions & 2 deletions liband/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
implementation 'com.google.android.material:material:1.2.0-alpha03'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha02'
implementation 'com.google.android.material:material:1.2.0-alpha04'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'

implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.7.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.3.1'

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
o/classes
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Generated by data binding compiler. Do not edit!
package com.liband.databinding;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import com.liband.R;
import java.lang.Deprecated;
import java.lang.Object;

public abstract class DailogFragmentEditTextBinding extends ViewDataBinding {
@NonNull
public final ConstraintLayout editName;

@NonNull
public final EditText txtYourName;

protected DailogFragmentEditTextBinding(Object _bindingComponent, View _root,
int _localFieldCount, ConstraintLayout editName, EditText txtYourName) {
super(_bindingComponent, _root, _localFieldCount);
this.editName = editName;
this.txtYourName = txtYourName;
}

@NonNull
public static DailogFragmentEditTextBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup root, boolean attachToRoot) {
return inflate(inflater, root, attachToRoot, DataBindingUtil.getDefaultComponent());
}

/**
* This method receives DataBindingComponent instance as type Object instead of
* type DataBindingComponent to avoid causing too many compilation errors if
* compilation fails for another reason.
* https://issuetracker.google.com/issues/116541301
* @Deprecated Use DataBindingUtil.inflate(inflater, R.layout.dailog_fragment_edit_text, root, attachToRoot, component)
*/
@NonNull
@Deprecated
public static DailogFragmentEditTextBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup root, boolean attachToRoot, @Nullable Object component) {
return ViewDataBinding.<DailogFragmentEditTextBinding>inflateInternal(inflater, R.layout.dailog_fragment_edit_text, root, attachToRoot, component);
}

@NonNull
public static DailogFragmentEditTextBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, DataBindingUtil.getDefaultComponent());
}

/**
* This method receives DataBindingComponent instance as type Object instead of
* type DataBindingComponent to avoid causing too many compilation errors if
* compilation fails for another reason.
* https://issuetracker.google.com/issues/116541301
* @Deprecated Use DataBindingUtil.inflate(inflater, R.layout.dailog_fragment_edit_text, null, false, component)
*/
@NonNull
@Deprecated
public static DailogFragmentEditTextBinding inflate(@NonNull LayoutInflater inflater,
@Nullable Object component) {
return ViewDataBinding.<DailogFragmentEditTextBinding>inflateInternal(inflater, R.layout.dailog_fragment_edit_text, null, false, component);
}

public static DailogFragmentEditTextBinding bind(@NonNull View view) {
return bind(view, DataBindingUtil.getDefaultComponent());
}

/**
* This method receives DataBindingComponent instance as type Object instead of
* type DataBindingComponent to avoid causing too many compilation errors if
* compilation fails for another reason.
* https://issuetracker.google.com/issues/116541301
* @Deprecated Use DataBindingUtil.bind(view, component)
*/
@Deprecated
public static DailogFragmentEditTextBinding bind(@NonNull View view, @Nullable Object component) {
return (DailogFragmentEditTextBinding)bind(component, view, R.layout.dailog_fragment_edit_text);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.liband;

public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.liband";
public static final String BUILD_TYPE = "debug";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.liband;

import androidx.databinding.BindingBuildInfo;

@BindingBuildInfo
public class DataBindingInfo {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package androidx.databinding;

public interface DataBindingComponent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package androidx.databinding;

public interface DataBindingComponent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package androidx.databinding.library.baseAdapters;

public class BR {
public static int _all = 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package androidx.databinding.library.baseAdapters;

public class BR {
public static int _all = 0;
}
5 changes: 5 additions & 0 deletions liband/build/generated/source/kapt/debug/com/liband/BR 2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.liband;

public class BR {
public static int _all = 0;
}
5 changes: 5 additions & 0 deletions liband/build/generated/source/kapt/debug/com/liband/BR.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.liband;

public class BR {
public static int _all = 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
package com.liband;

import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import androidx.databinding.DataBinderMapper;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import com.liband.databinding.DailogFragmentEditTextBindingImpl;
import java.lang.IllegalArgumentException;
import java.lang.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.RuntimeException;
import java.lang.String;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class DataBinderMapperImpl extends DataBinderMapper {
private static final int LAYOUT_DAILOGFRAGMENTEDITTEXT = 1;

private static final SparseIntArray INTERNAL_LAYOUT_ID_LOOKUP = new SparseIntArray(1);

static {
INTERNAL_LAYOUT_ID_LOOKUP.put(com.liband.R.layout.dailog_fragment_edit_text, LAYOUT_DAILOGFRAGMENTEDITTEXT);
}

@Override
public ViewDataBinding getDataBinder(DataBindingComponent component, View view, int layoutId) {
int localizedLayoutId = INTERNAL_LAYOUT_ID_LOOKUP.get(layoutId);
if(localizedLayoutId > 0) {
final Object tag = view.getTag();
if(tag == null) {
throw new RuntimeException("view must have a tag");
}
switch(localizedLayoutId) {
case LAYOUT_DAILOGFRAGMENTEDITTEXT: {
if ("layout/dailog_fragment_edit_text_0".equals(tag)) {
return new DailogFragmentEditTextBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for dailog_fragment_edit_text is invalid. Received: " + tag);
}
}
}
return null;
}

@Override
public ViewDataBinding getDataBinder(DataBindingComponent component, View[] views, int layoutId) {
if(views == null || views.length == 0) {
return null;
}
int localizedLayoutId = INTERNAL_LAYOUT_ID_LOOKUP.get(layoutId);
if(localizedLayoutId > 0) {
final Object tag = views[0].getTag();
if(tag == null) {
throw new RuntimeException("view must have a tag");
}
switch(localizedLayoutId) {
}
}
return null;
}

@Override
public int getLayoutId(String tag) {
if (tag == null) {
return 0;
}
Integer tmpVal = InnerLayoutIdLookup.sKeys.get(tag);
return tmpVal == null ? 0 : tmpVal;
}

@Override
public String convertBrIdToString(int localId) {
String tmpVal = InnerBrLookup.sKeys.get(localId);
return tmpVal;
}

@Override
public List<DataBinderMapper> collectDependencies() {
ArrayList<DataBinderMapper> result = new ArrayList<DataBinderMapper>(1);
result.add(new androidx.databinding.library.baseAdapters.DataBinderMapperImpl());
return result;
}

private static class InnerBrLookup {
static final SparseArray<String> sKeys = new SparseArray<String>(1);

static {
sKeys.put(0, "_all");
}
}

private static class InnerLayoutIdLookup {
static final HashMap<String, Integer> sKeys = new HashMap<String, Integer>(1);

static {
sKeys.put("layout/dailog_fragment_edit_text_0", com.liband.R.layout.dailog_fragment_edit_text);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package com.liband.databinding;
import com.liband.R;
import com.liband.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class DailogFragmentEditTextBindingImpl extends DailogFragmentEditTextBinding {

@Nullable
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
@Nullable
private static final android.util.SparseIntArray sViewsWithIds;
static {
sIncludes = null;
sViewsWithIds = new android.util.SparseIntArray();
sViewsWithIds.put(R.id.txt_your_name, 1);
}
// views
// variables
// values
// listeners
// Inverse Binding Event Handlers

public DailogFragmentEditTextBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
this(bindingComponent, root, mapBindings(bindingComponent, root, 2, sIncludes, sViewsWithIds));
}
private DailogFragmentEditTextBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
super(bindingComponent, root, 0
, (androidx.constraintlayout.widget.ConstraintLayout) bindings[0]
, (android.widget.EditText) bindings[1]
);
this.editName.setTag(null);
setRootTag(root);
// listeners
invalidateAll();
}

@Override
public void invalidateAll() {
synchronized(this) {
mDirtyFlags = 0x1L;
}
requestRebind();
}

@Override
public boolean hasPendingBindings() {
synchronized(this) {
if (mDirtyFlags != 0) {
return true;
}
}
return false;
}

@Override
public boolean setVariable(int variableId, @Nullable Object variable) {
boolean variableSet = true;
return variableSet;
}

@Override
protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
switch (localFieldId) {
}
return false;
}

@Override
protected void executeBindings() {
long dirtyFlags = 0;
synchronized(this) {
dirtyFlags = mDirtyFlags;
mDirtyFlags = 0;
}
// batch finished
}
// Listener Stub Implementations
// callback impls
// dirty flag
private long mDirtyFlags = 0xffffffffffffffffL;
/* flag mapping
flag 0 (0x1L): null
flag mapping end*/
//end
}
Loading

0 comments on commit 63ae75d

Please sign in to comment.