) fragments, mTabTitle));
+ viewPager.setOffscreenPageLimit(fragments.size());
+ tabLayout.setupWithViewPager(viewPager);
+ tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+ @Override
+ public void onTabSelected(TabLayout.Tab tab) {
+ viewPager.setCurrentItem(tab.getPosition());
+ }
+
+ @Override
+ public void onTabUnselected(TabLayout.Tab tab) {
+
+ }
+
+ @Override
+ public void onTabReselected(TabLayout.Tab tab) {
+
+ }
+ });
+ }
+
+ private void addFragment(String[] mTabTitle) {
+
+ int mTextLength = 14;
+ int mButtonLength = 8;
+ int mWidgetLength = 12;
+ int mLayoutLength = 7;
+ int mContainersLength = 16;
+ int mGoogleLength = 2;
+ int mLegacyLength = 5;
+
+ if (mTabTitle.length == mTextLength) {
+ fragments.add(new TextViewFragment());
+ fragments.add(new PlainTextFragment());
+ fragments.add(new PasswordFragment());
+ fragments.add(new EmailFragment());
+ fragments.add(new PhoneFragment());
+ fragments.add(new PostalAddressFragment());
+ fragments.add(new MultilineTextFragment());
+ fragments.add(new TimeFragment());
+ fragments.add(new DateFragment());
+ fragments.add(new NumberFragment());
+ fragments.add(new AutoCompleteTextViewFragment());
+ fragments.add(new MultiAutoCompleteTextViewFragment());
+ fragments.add(new CheckedTextViewFragment());
+ fragments.add(new TextInputLayoutFragment());
+ } else if (mTabTitle.length == mButtonLength) {
+ fragments.add(new ButtonFragment());
+ fragments.add(new ImageButtonFragment());
+ fragments.add(new CheckBoxFragment());
+ fragments.add(new RadioGroupFragment());
+ fragments.add(new RadioButtonFragment());
+ fragments.add(new ToggleButtonFragment());
+ fragments.add(new SwitchFragment());
+ fragments.add(new FloatingActionButtonFragment());
+ } else if (mTabTitle.length == mWidgetLength) {
+ fragments.add(new ViewFragment());
+ fragments.add(new ImageViewFragment());
+ fragments.add(new WebViewFragment());
+ fragments.add(new VideoViewFragment());
+ fragments.add(new CalendarViewFragment());
+ fragments.add(new ProgressBarFragment());
+ fragments.add(new SeekBarFragment());
+ fragments.add(new RatingBarFragment());
+ fragments.add(new SearchViewFragment());
+ fragments.add(new TextureViewFragment());
+ fragments.add(new SurfaceViewFragment());
+ fragments.add(new DividerFragment());
+ } else if (mTabTitle.length == mLayoutLength) {
+ fragments.add(new ConstraintLayoutFragment());
+ fragments.add(new GuidelineFragment());
+ fragments.add(new LinearLayoutFragment());
+ fragments.add(new FrameLayoutFragment());
+ fragments.add(new TableLayoutFragment());
+ fragments.add(new TableRowFragment());
+ fragments.add(new SpaceFragment());
+
+ } else if (mTabTitle.length == mContainersLength) {
+ fragments.add(new SpinnerFragment());
+ fragments.add(new RecyclerViewFragment());
+ fragments.add(new ScrollViewFragment());
+ fragments.add(new ViewPagerFragment());
+ fragments.add(new CardViewFragment());
+ fragments.add(new TabsFragment());
+ fragments.add(new AppBarLayoutFragment());
+ fragments.add(new NavigationViewFragment());
+ fragments.add(new BottomNavigationFragment());
+ fragments.add(new ToolbarFragment());
+ fragments.add(new TabLayoutFragment());
+ fragments.add(new ViewStubFragment());
+ fragments.add(new IncludeFragment());
+ fragments.add(new fragmentFragment());
+ fragments.add(new ViewFragment());
+ fragments.add(new RequestFocusFragment());
+ } else if (mTabTitle.length == mGoogleLength) {
+ fragments.add(new AdViewFragment());
+ fragments.add(new MapViewFragment());
+
+ } else if (mTabTitle.length == mLegacyLength) {
+ fragments.add(new GridLayoutFragment());
+ fragments.add(new ListViewFragment());
+ fragments.add(new TabHostFragment());
+ fragments.add(new RelativeLayoutFragment());
+ fragments.add(new GridViewFragment());
+
+ }
+ }
+
+ @Override
+ public void onBackPressed() {
+ if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
+ drawerLayout.closeDrawer(GravityCompat.START);
+ } else {
+ super.onBackPressed();
+ }
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ int id = item.getItemId();
+ if (id == R.id.action_settings) {
+ Toast.makeText(this, "onClick Settings", Toast.LENGTH_SHORT).show();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.nav_text:
+ setTopTab(mTexts);
+ break;
+ case R.id.nav_button:
+ setTopTab(mButtons);
+ break;
+ case R.id.nav_widgets:
+ setTopTab(mWidgets);
+ break;
+ case R.id.nav_layout:
+ setTopTab(mLayouts);
+ break;
+ case R.id.nav_containers:
+ setTopTab(mContainers);
+ break;
+ case R.id.nav_google:
+ setTopTab(mGoogles);
+ break;
+ case R.id.nav_legacy:
+ setTopTab(mLegacies);
+ break;
+ /*// 自定义控件
+ case R.id.nav_custom:
+ break;*/
+ case R.id.nav_code:
+ startActivity(new Intent(this, CodeActivity.class));
+ break;
+ case R.id.nav_bar:
+ startActivity(new Intent(this, StatusBarActivity.class));
+ break;
+ case R.id.nav_sheet:
+ startActivity(new Intent(this, SheetActivity.class));
+ break;
+ default:
+ break;
+ }
+
+ drawerLayout.closeDrawer(GravityCompat.START);
+ return true;
+ }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/ButtonFragment.java b/app/src/main/java/org/incoder/uiwidget/button/ButtonFragment.java
new file mode 100644
index 0000000..859aad3
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/ButtonFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * ButtonFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class ButtonFragment extends Fragment {
+
+
+ public ButtonFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_button, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/CheckBoxFragment.java b/app/src/main/java/org/incoder/uiwidget/button/CheckBoxFragment.java
new file mode 100644
index 0000000..0b8e7a4
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/CheckBoxFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * CheckBoxFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class CheckBoxFragment extends Fragment {
+
+
+ public CheckBoxFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_check_box, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/FloatingActionButtonFragment.java b/app/src/main/java/org/incoder/uiwidget/button/FloatingActionButtonFragment.java
new file mode 100644
index 0000000..bf89d7b
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/FloatingActionButtonFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * FloatingActionButtonFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class FloatingActionButtonFragment extends Fragment {
+
+
+ public FloatingActionButtonFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_floating_action_button, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/ImageButtonFragment.java b/app/src/main/java/org/incoder/uiwidget/button/ImageButtonFragment.java
new file mode 100644
index 0000000..8e7308b
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/ImageButtonFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * ImageButtonFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class ImageButtonFragment extends Fragment {
+
+
+ public ImageButtonFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_image_button, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/RadioButtonFragment.java b/app/src/main/java/org/incoder/uiwidget/button/RadioButtonFragment.java
new file mode 100644
index 0000000..1f6b77a
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/RadioButtonFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * RadioButtonFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class RadioButtonFragment extends Fragment {
+
+
+ public RadioButtonFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_radio_button, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/RadioGroupFragment.java b/app/src/main/java/org/incoder/uiwidget/button/RadioGroupFragment.java
new file mode 100644
index 0000000..68edd1c
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/RadioGroupFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * RadioGroupFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class RadioGroupFragment extends Fragment {
+
+
+ public RadioGroupFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_radio_group, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/SwitchFragment.java b/app/src/main/java/org/incoder/uiwidget/button/SwitchFragment.java
new file mode 100644
index 0000000..d52b7f8
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/SwitchFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * SwitchFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class SwitchFragment extends Fragment {
+
+
+ public SwitchFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_switch, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/button/ToggleButtonFragment.java b/app/src/main/java/org/incoder/uiwidget/button/ToggleButtonFragment.java
new file mode 100644
index 0000000..0d35206
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/button/ToggleButtonFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.button;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * ToggleButtonFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class ToggleButtonFragment extends Fragment {
+
+
+ public ToggleButtonFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_toggle_button, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/code/CodeActivity.java b/app/src/main/java/org/incoder/uiwidget/code/CodeActivity.java
new file mode 100644
index 0000000..0012b7b
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/code/CodeActivity.java
@@ -0,0 +1,105 @@
+package org.incoder.uiwidget.code;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.widget.RadioButton;
+import android.widget.Toast;
+
+import org.incoder.uiwidget.R;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+public class CodeActivity extends AppCompatActivity {
+
+ @BindView(R.id.edit_solid)
+ CodeEditText editSolid;
+ @BindView(R.id.edit_underline)
+ CodeEditText editUnderline;
+ @BindView(R.id.edit_hollow)
+ CodeEditText editHollow;
+ @BindView(R.id.rb_password_yes)
+ RadioButton rbPasswordYes;
+ @BindView(R.id.rb_password_no)
+ RadioButton rbPasswordNo;
+ @BindView(R.id.rb_cursor_yes)
+ RadioButton rbCursorYes;
+ @BindView(R.id.rb_cursor_no)
+ RadioButton rbCursorNo;
+
+ @OnClick({R.id.rb_password_yes, R.id.rb_password_no})
+ void passwordType() {
+ if (rbPasswordYes.isChecked()) {
+ editSolid.setPassword(true);
+ editUnderline.setPassword(true);
+ editHollow.setPassword(true);
+ } else {
+ editSolid.setPassword(false);
+ editUnderline.setPassword(false);
+ editHollow.setPassword(false);
+ }
+ }
+
+ @OnClick({R.id.rb_cursor_yes, R.id.rb_password_no})
+ void cursorShow() {
+ if (rbCursorYes.isChecked()) {
+ editSolid.setShowCursor(true);
+ editUnderline.setShowCursor(true);
+ editHollow.setShowCursor(true);
+ } else {
+ editSolid.setShowCursor(false);
+ editUnderline.setShowCursor(false);
+ editHollow.setShowCursor(false);
+ }
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_code);
+ ButterKnife.bind(this);
+
+ editSolid.setPassword(true);
+ editUnderline.setPassword(true);
+ editHollow.setPassword(true);
+
+ editSolid.setShowCursor(true);
+ editUnderline.setShowCursor(true);
+ editHollow.setShowCursor(true);
+
+ editSolid.setTextChangedListener(new CodeEditText.TextChangedListener() {
+ @Override
+ public void textChanged(CharSequence changeText) {
+
+ }
+
+ @Override
+ public void textCompleted(CharSequence text) {
+ Toast.makeText(CodeActivity.this, "input content:" + text, Toast.LENGTH_SHORT).show();
+ }
+ });
+ editUnderline.setTextChangedListener(new CodeEditText.TextChangedListener() {
+ @Override
+ public void textChanged(CharSequence changeText) {
+
+ }
+
+ @Override
+ public void textCompleted(CharSequence text) {
+ Toast.makeText(CodeActivity.this, "input content:" + text, Toast.LENGTH_SHORT).show();
+ }
+ });
+ editHollow.setTextChangedListener(new CodeEditText.TextChangedListener() {
+ @Override
+ public void textChanged(CharSequence changeText) {
+
+ }
+
+ @Override
+ public void textCompleted(CharSequence text) {
+ Toast.makeText(CodeActivity.this, "input content:" + text, Toast.LENGTH_SHORT).show();
+ }
+ });
+ }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/code/CodeEditText.java b/app/src/main/java/org/incoder/uiwidget/code/CodeEditText.java
new file mode 100644
index 0000000..658fb60
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/code/CodeEditText.java
@@ -0,0 +1,451 @@
+package org.incoder.uiwidget.code;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.RectF;
+import android.os.Handler;
+import android.support.v4.content.ContextCompat;
+import android.text.InputFilter;
+import android.util.AttributeSet;
+import android.view.ActionMode;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.inputmethod.InputMethodManager;
+
+import org.incoder.uiwidget.R;
+
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ScheduledExecutorService;
+
+/**
+ * 验证码输入自定义控件
+ *
+ * @author : Jerry xu
+ * @date : 2019年7月30日 10:33
+ */
+public class CodeEditText extends android.support.v7.widget.AppCompatEditText {
+
+ /**
+ * 空心
+ */
+ private static final int TYPE_HOLLOW = 1;
+ /**
+ * 实心
+ */
+ private static final int TYPE_SOLID = 2;
+ /**
+ * 下划线
+ */
+ private static final int TYPE_UNDERLINE = 3;
+
+ /**
+ * 边界画笔
+ */
+ private Paint borderPaint;
+ /**
+ * 实心块画笔
+ */
+ private Paint blockPaint;
+ private Paint textPaint;
+ private Paint cursorPaint;
+
+ private RectF borderRectF;
+ private RectF boxRectF;//小方块、小矩形
+
+ /**
+ * 方框宽,高
+ */
+ private int boxWidth, boxHeight;
+ /**
+ * 方框之间间隙
+ */
+ private int spacing;
+ /**
+ * 方框圆角
+ */
+ private int corner;
+ /**
+ * 验证码最大位数
+ */
+ private int maxLength;
+ /**
+ * 边界粗细
+ */
+ private int borderWidth;
+ /**
+ * 是否是密码类型
+ */
+ private boolean password;
+ /**
+ * 显示光标
+ */
+ private boolean showCursor;
+ /**
+ * 光标闪动间隔
+ */
+ private int cursorDuration;
+ /**
+ * 光标宽度
+ */
+ private int cursorWidth;
+ /**
+ * 光标颜色
+ */
+ private int cursorColor;
+ /**
+ * 实心方式、空心方式
+ */
+ private int type;
+ private int borderColor;
+ private int blockColor;
+ private int textColor;
+
+ private boolean isCursorShowing;
+
+ private CharSequence contentText;
+
+ private TextChangedListener textChangedListener;
+
+ private Timer timer;
+ private ScheduledExecutorService mExecutorService;
+ private TimerTask timerTask;
+
+ public CodeEditText(Context context) {
+ this(context, null);
+ }
+
+ public CodeEditText(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public CodeEditText(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+
+ setLongClickable(false);
+ setTextIsSelectable(false);
+ setCustomSelectionActionModeCallback(new ActionMode.Callback() {
+ @Override
+ public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
+ return false;
+ }
+
+ @Override
+ public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
+ return false;
+ }
+
+ @Override
+ public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
+ return false;
+ }
+
+ @Override
+ public void onDestroyActionMode(ActionMode actionMode) {
+
+ }
+ });
+
+ TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.CodeEditText);
+
+ password = ta.getBoolean(R.styleable.CodeEditText_password, false);
+ showCursor = ta.getBoolean(R.styleable.CodeEditText_showCursor, true);
+ borderColor = ta.getColor(R.styleable.CodeEditText_borderColor, Color.GRAY);
+ blockColor = ta.getColor(R.styleable.CodeEditText_blockColor, Color.LTGRAY);
+ textColor = ta.getColor(R.styleable.CodeEditText_textColor, Color.DKGRAY);
+ cursorColor = ta.getColor(R.styleable.CodeEditText_cursorColor, ContextCompat.getColor(getContext(), R.color.colorAccent));
+ corner = (int) ta.getDimension(R.styleable.CodeEditText_corner, 0);
+ spacing = (int) ta.getDimension(R.styleable.CodeEditText_blockSpacing, 0);
+ type = ta.getInt(R.styleable.CodeEditText_separateType, TYPE_HOLLOW);
+ maxLength = ta.getInt(R.styleable.CodeEditText_maxLength, 6);
+ cursorDuration = ta.getInt(R.styleable.CodeEditText_cursorDuration, 500);
+ cursorWidth = (int) ta.getDimension(R.styleable.CodeEditText_cursorWidth, 2);
+ borderWidth = (int) ta.getDimension(R.styleable.CodeEditText_borderWidth, 2);
+ ta.recycle();
+ init();
+
+ }
+
+ public void setSpacing(int spacing) {
+ this.spacing = spacing;
+ postInvalidate();
+ }
+
+ public void setCorner(int corner) {
+ this.corner = corner;
+ postInvalidate();
+ }
+
+ public void setMaxLength(int maxLength) {
+ this.maxLength = maxLength;
+ postInvalidate();
+ }
+
+ public void setBorderWidth(int borderWidth) {
+ this.borderWidth = borderWidth;
+ postInvalidate();
+ }
+
+ public void setPassword(boolean password) {
+ this.password = password;
+ postInvalidate();
+ }
+
+ public void setShowCursor(boolean showCursor) {
+ this.showCursor = showCursor;
+ postInvalidate();
+ }
+
+ public void setCursorDuration(int cursorDuration) {
+ this.cursorDuration = cursorDuration;
+ postInvalidate();
+ }
+
+ public void setCursorWidth(int cursorWidth) {
+ this.cursorWidth = cursorWidth;
+ postInvalidate();
+ }
+
+ public void setCursorColor(int cursorColor) {
+ this.cursorColor = cursorColor;
+ postInvalidate();
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ postInvalidate();
+ }
+
+ public void setBorderColor(int borderColor) {
+ this.borderColor = borderColor;
+ postInvalidate();
+ }
+
+ public void setBlockColor(int blockColor) {
+ this.blockColor = blockColor;
+ postInvalidate();
+ }
+
+ public void clearText() {
+ setText("");
+ }
+
+ @Override
+ public void setTextColor(int textColor) {
+ this.textColor = textColor;
+ postInvalidate();
+ }
+
+ private void init() {
+ this.setFocusableInTouchMode(true);
+ this.setFocusable(true);
+ this.requestFocus();
+ this.setCursorVisible(false);
+ this.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});
+
+ new Handler().postDelayed(() -> {
+ InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.toggleSoftInput(0, InputMethodManager.SHOW_FORCED);
+ }, 500);
+
+ blockPaint = new Paint();
+ blockPaint.setAntiAlias(true);
+ blockPaint.setColor(blockColor);
+ blockPaint.setStyle(Paint.Style.FILL);
+ blockPaint.setStrokeWidth(1);
+
+ // 输入文字绘制
+ textPaint = new Paint();
+ textPaint.setAntiAlias(true);
+ textPaint.setColor(textColor);
+ textPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+ textPaint.setStrokeWidth(1);
+
+ // 边框绘制
+ borderPaint = new Paint();
+ borderPaint.setAntiAlias(true);
+ borderPaint.setColor(borderColor);
+ borderPaint.setStyle(Paint.Style.STROKE);
+ borderPaint.setStrokeWidth(borderWidth);
+
+ // 光标绘制
+ cursorPaint = new Paint();
+ cursorPaint.setAntiAlias(true);
+ cursorPaint.setColor(cursorColor);
+ cursorPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+ cursorPaint.setStrokeWidth(cursorWidth);
+
+ borderRectF = new RectF();
+ boxRectF = new RectF();
+
+ if (type == TYPE_HOLLOW) {
+ spacing = 0;
+ }
+
+ timerTask = new TimerTask() {
+ @Override
+ public void run() {
+ isCursorShowing = !isCursorShowing;
+ postInvalidate();
+ }
+ };
+ timer = new Timer();
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ boxWidth = (w - spacing * (maxLength + 1)) / maxLength;
+ boxHeight = h;
+ borderRectF.set(0, 0, w, h);
+ textPaint.setTextSize(boxWidth / 2);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ drawRect(canvas);
+ drawText(canvas, contentText);
+ drawCursor(canvas);
+ }
+
+ /**
+ * 绘制矩形
+ *
+ * @param canvas canvas
+ */
+ private void drawRect(Canvas canvas) {
+ for (int i = 0; i < maxLength; i++) { + + boxRectF.set(spacing * (i + 1) + boxWidth * i, 0, + spacing * (i + 1) + boxWidth * i + boxWidth, boxHeight); + + if (type == TYPE_SOLID) { + canvas.drawRoundRect(boxRectF, corner, corner, blockPaint); + } else if (type == TYPE_UNDERLINE) { + canvas.drawLine(boxRectF.left, boxRectF.bottom, boxRectF.right, boxRectF.bottom, borderPaint); + } else if (type == TYPE_HOLLOW) { + if (i == 0 || i == maxLength) { + continue; + } + canvas.drawLine(boxRectF.left, boxRectF.top, boxRectF.left, boxRectF.bottom, borderPaint); + } + } + // 绘制圆角矩形 + if (type == TYPE_HOLLOW) { + canvas.drawRoundRect(borderRectF, corner, corner, borderPaint); + } + } + + /** + * 绘制文字 + * + * @param canvas canvas + * @param charSequence charSequence + */ + private void drawText(Canvas canvas, CharSequence charSequence) { + for (int i = 0; i < charSequence.length(); i++) { + int startX = spacing * (i + 1) + boxWidth * i; + int startY = 0; + int baseX = (int) (startX + boxWidth / 2 - textPaint.measureText(String.valueOf(charSequence.charAt(i))) / 2); + int baseY = (int) (startY + boxHeight / 2 - (textPaint.descent() + textPaint.ascent()) / 2); + int centerX = startX + boxWidth / 2; + int centerY = startY + boxHeight / 2; + int radius = Math.min(boxWidth, boxHeight) / 6; + if (password) { + canvas.drawCircle(centerX, centerY, radius, textPaint); + } else { + canvas.drawText(String.valueOf(charSequence.charAt(i)), baseX, baseY, textPaint); + } + } + } + + /** + * 绘制光标 + * + * @param canvas canvas + */ + private void drawCursor(Canvas canvas) { + if (!isCursorShowing && showCursor && contentText.length() < maxLength && hasFocus()) { + int cursorPosition = contentText.length() + 1; + int startX = spacing * cursorPosition + boxWidth * (cursorPosition - 1) + boxWidth / 2; + int startY = boxHeight / 4; + int endX = startX; + int endY = boxHeight - boxHeight / 4; + canvas.drawLine(startX, startY, endX, endY, cursorPaint); + } + } + + @Override + protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) { + super.onTextChanged(text, start, lengthBefore, lengthAfter); + contentText = text; + invalidate(); + + if (textChangedListener != null) { + if (text.length() == maxLength) { + textChangedListener.textCompleted(text); + } else { + textChangedListener.textChanged(text); + } + } + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + // cursorFlashTime为光标闪动的间隔时间 + timer.scheduleAtFixedRate(timerTask, 0, cursorDuration); + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + timer.cancel(); + } + + @Override + public boolean onTextContextMenuItem(int id) { + return true; + } + + @Override + protected void onSelectionChanged(int selStart, int selEnd) { + CharSequence text = getText(); + if (text != null) { + if (selStart != text.length() || selEnd != text.length()) { + setSelection(text.length(), text.length()); + return; + } + } + super.onSelectionChanged(selStart, selEnd); + } + + + public void setTextChangedListener(TextChangedListener listener) { + textChangedListener = listener; + } + + /** + * 密码监听者 + */ + public interface TextChangedListener { + + /** + * 输入/删除监听 + * + * @param changeText 输入/删除的字符 + */ + void textChanged(CharSequence changeText); + + /** + * 输入完成 + * + * @param text 输入的字符 + */ + void textCompleted(CharSequence text); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/AppBarLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/AppBarLayoutFragment.java new file mode 100644 index 0000000..6d94807 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/AppBarLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * AppBarLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class AppBarLayoutFragment extends Fragment { + + + public AppBarLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_app_bar_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/BottomNavigationFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/BottomNavigationFragment.java new file mode 100644 index 0000000..4150db7 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/BottomNavigationFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * BottomNavigationFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class BottomNavigationFragment extends Fragment { + + + public BottomNavigationFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_bottom_navigation, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/CardViewFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/CardViewFragment.java new file mode 100644 index 0000000..ff4158c --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/CardViewFragment.java @@ -0,0 +1,30 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * A simple {@link Fragment} subclass. + */ +public class CardViewFragment extends Fragment { + + + public CardViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_card_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/IncludeFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/IncludeFragment.java new file mode 100644 index 0000000..f4b4661 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/IncludeFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * IncludeFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class IncludeFragment extends Fragment { + + + public IncludeFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_include, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/NavigationViewFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/NavigationViewFragment.java new file mode 100644 index 0000000..ae6ac2c --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/NavigationViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * NavigationViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class NavigationViewFragment extends Fragment { + + + public NavigationViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_navigation_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/RecyclerViewFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/RecyclerViewFragment.java new file mode 100644 index 0000000..2a7bde6 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/RecyclerViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * RecyclerViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class RecyclerViewFragment extends Fragment { + + + public RecyclerViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_recycler_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/RequestFocusFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/RequestFocusFragment.java new file mode 100644 index 0000000..3eb2628 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/RequestFocusFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * RequestFocusFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class RequestFocusFragment extends Fragment { + + + public RequestFocusFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_request_focus, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/ScrollViewFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/ScrollViewFragment.java new file mode 100644 index 0000000..54e79e9 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/ScrollViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ScrollViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ScrollViewFragment extends Fragment { + + + public ScrollViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_scroll_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/SpinnerFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/SpinnerFragment.java new file mode 100644 index 0000000..9f6f564 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/SpinnerFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * SpinnerFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class SpinnerFragment extends Fragment { + + + public SpinnerFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_spinner, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/TabLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/TabLayoutFragment.java new file mode 100644 index 0000000..c27ed49 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/TabLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * TabLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class TabLayoutFragment extends Fragment { + + + public TabLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_tab_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/TabsFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/TabsFragment.java new file mode 100644 index 0000000..928fcc4 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/TabsFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * TabsFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class TabsFragment extends Fragment { + + + public TabsFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_tabs, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/ToolbarFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/ToolbarFragment.java new file mode 100644 index 0000000..a51c782 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/ToolbarFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ToolbarFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ToolbarFragment extends Fragment { + + + public ToolbarFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_toolbar, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/ViewFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/ViewFragment.java new file mode 100644 index 0000000..c030124 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/ViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ViewFragment extends Fragment { + + + public ViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/ViewPagerFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/ViewPagerFragment.java new file mode 100644 index 0000000..6c8c127 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/ViewPagerFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ViewPagerFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ViewPagerFragment extends Fragment { + + + public ViewPagerFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_view_pager, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/ViewStubFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/ViewStubFragment.java new file mode 100644 index 0000000..aeb4458 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/ViewStubFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ViewStubFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ViewStubFragment extends Fragment { + + + public ViewStubFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_view_stub, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/containers/fragmentFragment.java b/app/src/main/java/org/incoder/uiwidget/containers/fragmentFragment.java new file mode 100644 index 0000000..2e8981f --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/containers/fragmentFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.containers; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * fragmentFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class fragmentFragment extends Fragment { + + + public fragmentFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_fragment, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/google/AdViewFragment.java b/app/src/main/java/org/incoder/uiwidget/google/AdViewFragment.java new file mode 100644 index 0000000..9bda3ca --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/google/AdViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.google; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * AdViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class AdViewFragment extends Fragment { + + + public AdViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_ad_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/google/MapViewFragment.java b/app/src/main/java/org/incoder/uiwidget/google/MapViewFragment.java new file mode 100644 index 0000000..273a93b --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/google/MapViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.google; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * MapViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class MapViewFragment extends Fragment { + + + public MapViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_map_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/ConstraintLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/ConstraintLayoutFragment.java new file mode 100644 index 0000000..fc5bc68 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/ConstraintLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ConstraintLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ConstraintLayoutFragment extends Fragment { + + + public ConstraintLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_constraint_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/FrameLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/FrameLayoutFragment.java new file mode 100644 index 0000000..ab6181d --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/FrameLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * FrameLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class FrameLayoutFragment extends Fragment { + + + public FrameLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_frame_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/GuidelineFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/GuidelineFragment.java new file mode 100644 index 0000000..03102b0 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/GuidelineFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * GuidelineFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class GuidelineFragment extends Fragment { + + + public GuidelineFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_guideline, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/LinearLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/LinearLayoutFragment.java new file mode 100644 index 0000000..5980785 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/LinearLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * LinearLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class LinearLayoutFragment extends Fragment { + + + public LinearLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_linear_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/SpaceFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/SpaceFragment.java new file mode 100644 index 0000000..accbad0 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/SpaceFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * SpaceFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class SpaceFragment extends Fragment { + + + public SpaceFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_space, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/TableLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/TableLayoutFragment.java new file mode 100644 index 0000000..5f35cea --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/TableLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * TableLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class TableLayoutFragment extends Fragment { + + + public TableLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_table_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/layout/TableRowFragment.java b/app/src/main/java/org/incoder/uiwidget/layout/TableRowFragment.java new file mode 100644 index 0000000..c02f1d7 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/layout/TableRowFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.layout; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * TableRowFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class TableRowFragment extends Fragment { + + + public TableRowFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_table_row, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/legacy/GridLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/legacy/GridLayoutFragment.java new file mode 100644 index 0000000..91d248a --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/legacy/GridLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.legacy; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * GridLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class GridLayoutFragment extends Fragment { + + + public GridLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_grid_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/legacy/GridViewFragment.java b/app/src/main/java/org/incoder/uiwidget/legacy/GridViewFragment.java new file mode 100644 index 0000000..e2c1a36 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/legacy/GridViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.legacy; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * GridViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class GridViewFragment extends Fragment { + + + public GridViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_grid_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/legacy/ListViewFragment.java b/app/src/main/java/org/incoder/uiwidget/legacy/ListViewFragment.java new file mode 100644 index 0000000..ea6e6c4 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/legacy/ListViewFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.legacy; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * ListViewFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class ListViewFragment extends Fragment { + + + public ListViewFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_list_view, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/legacy/RelativeLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/legacy/RelativeLayoutFragment.java new file mode 100644 index 0000000..69ca8f7 --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/legacy/RelativeLayoutFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.legacy; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * RelativeLayoutFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class RelativeLayoutFragment extends Fragment { + + + public RelativeLayoutFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_relative_layout, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/legacy/TabHostFragment.java b/app/src/main/java/org/incoder/uiwidget/legacy/TabHostFragment.java new file mode 100644 index 0000000..c29cbbd --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/legacy/TabHostFragment.java @@ -0,0 +1,34 @@ +package org.incoder.uiwidget.legacy; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.incoder.uiwidget.R; + +/** + * TabHostFragment + * + * @author Jerry xu + * @date 4/6/2018 8:00 AM. + */ +public class TabHostFragment extends Fragment { + + + public TabHostFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_tab_host, container, false); + } + +} diff --git a/app/src/main/java/org/incoder/uiwidget/sheet/BottomSheetFragment.java b/app/src/main/java/org/incoder/uiwidget/sheet/BottomSheetFragment.java new file mode 100644 index 0000000..9ed91cb --- /dev/null +++ b/app/src/main/java/org/incoder/uiwidget/sheet/BottomSheetFragment.java @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2018 The Jerry xu Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.incoder.uiwidget.sheet; + +import android.content.Context; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.design.widget.BottomSheetDialogFragment; +import android.support.v4.app.DialogFragment; +import android.support.v4.app.Fragment; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import org.incoder.uiwidget.R; + +/** + * A fragment that shows a list of items as a modal bottom sheet.
+ * You can show this modal bottom sheet from your activity like this:
+ *
+ * BottomSheetFragment.newInstance(30).show(getSupportFragmentManager(), "dialog");
+ *
+ * You activity (or fragment) needs to implement {@link BottomSheetFragment.Listener}.
+ *
+ *
+ * @author Jerry xu
+ * @date 8/1/2019 1:00 AM.
+ */
+public class BottomSheetFragment extends BottomSheetDialogFragment {
+
+ private static final String ARG_ITEM_COUNT = "item_count";
+ private Listener mListener;
+
+ public static BottomSheetFragment newInstance(int itemCount) {
+ final BottomSheetFragment fragment = new BottomSheetFragment();
+ final Bundle args = new Bundle();
+ args.putInt(ARG_ITEM_COUNT, itemCount);
+ fragment.setArguments(args);
+ fragment.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.BottomSheetDialogTheme);
+ return fragment;
+ }
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
+ @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_bottom_sheet, container, false);
+ }
+
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+ final RecyclerView recyclerView = (RecyclerView) view;
+ recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
+ if (getArguments() != null) {
+ recyclerView.setAdapter(new ItemAdapter(getArguments().getInt(ARG_ITEM_COUNT)));
+ }
+ }
+
+ @Override
+ public void onAttach(Context context) {
+ super.onAttach(context);
+ final Fragment parent = getParentFragment();
+ if (parent != null) {
+ mListener = (Listener) parent;
+ } else {
+ mListener = (Listener) context;
+ }
+ }
+
+ @Override
+ public void onDetach() {
+ mListener = null;
+ super.onDetach();
+ }
+
+ public interface Listener {
+ void onItemClicked(int position);
+ }
+
+ private class ViewHolder extends RecyclerView.ViewHolder {
+
+ final TextView text;
+
+ ViewHolder(LayoutInflater inflater, ViewGroup parent) {
+ super(inflater.inflate(R.layout.fragment_item_list_dialog_item, parent, false));
+ text = itemView.findViewById(R.id.text);
+ text.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (mListener != null) {
+ mListener.onItemClicked(getAdapterPosition());
+ dismiss();
+ }
+ }
+ });
+ }
+
+ }
+
+ private class ItemAdapter extends RecyclerView.Adapter {
+
+ private final int mItemCount;
+
+ ItemAdapter(int itemCount) {
+ mItemCount = itemCount;
+ }
+
+ @NonNull
+ @Override
+ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ return new ViewHolder(LayoutInflater.from(parent.getContext()), parent);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
+ holder.text.setText(String.valueOf(position));
+ }
+
+ @Override
+ public int getItemCount() {
+ return mItemCount;
+ }
+
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/sheet/SheetActivity.java b/app/src/main/java/org/incoder/uiwidget/sheet/SheetActivity.java
new file mode 100644
index 0000000..21f937d
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/sheet/SheetActivity.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2018 The Jerry xu Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.incoder.uiwidget.sheet;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.widget.Button;
+
+import org.incoder.uiwidget.R;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+/**
+ * SheetActivity
+ *
+ * @author Jerry xu
+ * @date 8/1/2019 1:00 AM.
+ */
+public class SheetActivity extends AppCompatActivity implements BottomSheetFragment.Listener {
+
+ @BindView(R.id.btn_open)
+ Button mOpen;
+
+ @OnClick(R.id.btn_open)
+ void openSheets() {
+ BottomSheetFragment.newInstance(30).show(getSupportFragmentManager(), "dialog");
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_sheet);
+ ButterKnife.bind(this);
+ }
+
+ @Override
+ public void onItemClicked(int position) {
+
+ }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/statusbar/GradientFragment.java b/app/src/main/java/org/incoder/uiwidget/statusbar/GradientFragment.java
new file mode 100644
index 0000000..cc23bee
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/statusbar/GradientFragment.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2018 The Jerry xu Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.incoder.uiwidget.statusbar;
+
+
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+
+import org.incoder.uiwidget.R;
+
+import java.util.Objects;
+
+import butterknife.BindDrawable;
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+
+/**
+ * 渐变色
+ *
+ * @author Jerry xu
+ * @date 7/29/2019 1:00 AM.
+ */
+public class GradientFragment extends Fragment {
+
+ @BindView(R.id.ll_toolbar)
+ LinearLayout mLinearToolbar;
+ @BindView(R.id.toolbar)
+ Toolbar toolbar;
+ @BindView(R.id.status_bar_fix)
+ View mBar;
+ @BindView(R.id.rb_shape)
+ RadioButton rbShape;
+ @BindView(R.id.rb_img)
+ RadioButton rbImg;
+ @BindView(R.id.rb_light)
+ RadioButton rbLight;
+ @BindView(R.id.rb_black)
+ RadioButton rbBlack;
+
+ @BindDrawable(R.drawable.gradient_status_bar)
+ Drawable shapeGradient;
+ @BindDrawable(R.drawable.gradient_img)
+ Drawable imgGradient;
+
+ Unbinder unbinder;
+
+ @OnClick({R.id.rb_shape, R.id.rb_img})
+ void shapeGradient(View view) {
+ if (view.getId() == R.id.rb_shape) {
+ mLinearToolbar.setBackground(shapeGradient);
+ } else {
+ mLinearToolbar.setBackground(imgGradient);
+ }
+ }
+
+ @OnClick({R.id.rb_light, R.id.rb_black})
+ void selectMode(View view) {
+ if (view.getId() == R.id.rb_light) {
+ StatusUtils.setStatusBarLightMode(Objects.requireNonNull(getActivity()).getWindow(), false);
+ } else {
+ StatusUtils.setStatusBarLightMode(Objects.requireNonNull(getActivity()).getWindow(), true);
+ }
+ }
+
+ public GradientFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ View view = inflater.inflate(R.layout.fragment_gradient, container, false);
+ unbinder = ButterKnife.bind(this, view);
+ // 填充状态栏
+ mBar.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, StatusUtils.getStatusBarHeight(Objects.requireNonNull(getActivity()))));
+ ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
+ setHasOptionsMenu(true);
+ return view;
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ unbinder.unbind();
+ }
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ inflater.inflate(R.menu.info, menu);
+ super.onCreateOptionsMenu(menu, inflater);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/statusbar/ImageFragment.java b/app/src/main/java/org/incoder/uiwidget/statusbar/ImageFragment.java
new file mode 100644
index 0000000..3f21b77
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/statusbar/ImageFragment.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2018 The Jerry xu Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.incoder.uiwidget.statusbar;
+
+
+import android.graphics.Color;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * StatusBarActivity
+ *
+ * @author Jerry xu
+ * @date 7/29/2019 1:00 AM.
+ */
+public class ImageFragment extends Fragment {
+
+
+ public ImageFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.KITKAT) {
+ // 4.4
+ getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ }
+ if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.LOLLIPOP) {
+ // 5.0
+ Window window = getActivity().getWindow();
+ // 确认取消半透明设置
+ window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ // 全屏显示,status bar 不隐藏,activity 上方layout会被status bar覆盖
+ window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ // 配合其他flag使用,防止system bar改变layout的变动
+ | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
+ // 跟系统标识要渲染system bar背景
+ window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+ window.setStatusBarColor(Color.TRANSPARENT);
+ }
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_image, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/statusbar/MagicFragment.java b/app/src/main/java/org/incoder/uiwidget/statusbar/MagicFragment.java
new file mode 100644
index 0000000..9c1efaa
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/statusbar/MagicFragment.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2018 The Jerry xu Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.incoder.uiwidget.statusbar;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.Toolbar;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.SeekBar;
+import android.widget.TextView;
+
+import org.incoder.uiwidget.R;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+/**
+ * 魔法状态栏
+ *
+ * @author Jerry xu
+ * @date 7/29/2019 1:00 AM.
+ */
+public class MagicFragment extends Fragment {
+
+
+ @BindView(R.id.toolbar)
+ Toolbar toolbar;
+ @BindView(R.id.tv_transparency)
+ TextView tvTransparency;
+ @BindView(R.id.sb_transparency)
+ SeekBar sbTransparency;
+
+ Unbinder unbinder;
+
+ public MagicFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ View view = inflater.inflate(R.layout.fragment_magic, container, false);
+ unbinder = ButterKnife.bind(this, view);
+// ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
+// setHasOptionsMenu(true);
+ return view;
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ unbinder.unbind();
+ }
+
+
+// @Override
+// public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+// inflater.inflate(R.menu.info, menu);
+// super.onCreateOptionsMenu(menu,inflater);
+// }
+//
+// @Override
+// public boolean onOptionsItemSelected(MenuItem item) {
+// return super.onOptionsItemSelected(item);
+//
+// }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/statusbar/StatusBarActivity.java b/app/src/main/java/org/incoder/uiwidget/statusbar/StatusBarActivity.java
new file mode 100644
index 0000000..479c8b8
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/statusbar/StatusBarActivity.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2019 The Jerry xu Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.incoder.uiwidget.statusbar;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.design.widget.BottomNavigationView;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.ViewPager;
+import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
+
+import org.incoder.uiwidget.BasePagerAdapter;
+import org.incoder.uiwidget.R;
+
+import java.util.ArrayList;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+/**
+ * StatusBarActivity
+ *
+ * @author Jerry xu
+ * @date 7/29/2019 1:00 AM.
+ */
+public class StatusBarActivity extends AppCompatActivity {
+
+ @BindView(R.id.vp_content)
+ ViewPager vpContent;
+ @BindView(R.id.nav_view)
+ BottomNavigationView navView;
+
+ private ArrayList mFragments = new ArrayList();
+
+ private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
+ = new BottomNavigationView.OnNavigationItemSelectedListener() {
+
+ @Override
+ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.navigation_image:
+ vpContent.setCurrentItem(0);
+ return true;
+ case R.id.navigation_translucent:
+ vpContent.setCurrentItem(1);
+ return true;
+ case R.id.navigation_gradient:
+ vpContent.setCurrentItem(2);
+ return true;
+ case R.id.navigation_magic:
+ vpContent.setCurrentItem(3);
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
+ };
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_status_bar);
+ ButterKnife.bind(this);
+ navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
+ mFragments.add(new ImageFragment());
+ mFragments.add(new TranslucentFragment());
+ mFragments.add(new GradientFragment());
+ mFragments.add(new MagicFragment());
+ vpContent.setOffscreenPageLimit(mFragments.size());
+ vpContent.setAdapter(new BasePagerAdapter(getSupportFragmentManager(), mFragments));
+ vpContent.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+ @Override
+ public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+
+ }
+
+ @Override
+ public void onPageSelected(int position) {
+ if (position == 0) {
+ navView.setSelectedItemId(R.id.navigation_image);
+ } else if (position == 1) {
+ navView.setSelectedItemId(R.id.navigation_translucent);
+ } else if (position == 2) {
+ navView.setSelectedItemId(R.id.navigation_gradient);
+ } else if (position == 3) {
+ navView.setSelectedItemId(R.id.navigation_magic);
+ }
+ }
+
+ @Override
+ public void onPageScrollStateChanged(int state) {
+
+ }
+ });
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/statusbar/StatusUtils.java b/app/src/main/java/org/incoder/uiwidget/statusbar/StatusUtils.java
new file mode 100644
index 0000000..539cb82
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/statusbar/StatusUtils.java
@@ -0,0 +1,73 @@
+package org.incoder.uiwidget.statusbar;
+
+import android.app.Activity;
+import android.os.Build;
+import android.support.annotation.NonNull;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * StatusUtils
+ *
+ * @author : Jerry xu
+ * @date : 2019年7月31日 15:18
+ */
+public class StatusUtils {
+
+ /**
+ * Let toolbar to extend to status bar.
+ *
+ * @notice this method have to be used after setContentView.
+ */
+ public static void setToolbar(Activity activity) {
+ // Set the padding to match the Status Bar height
+ Toolbar toolbar = activity.findViewById(R.id.toolbar);
+ toolbar.setPadding(0, getStatusBarHeight(activity), 0, 0);
+ }
+
+ /**
+ * Get StatusBar height
+ *
+ * @return height of status bar
+ */
+ public static int getStatusBarHeight(Activity activity) {
+ int result = 0;
+ int resourceId = activity.getResources()
+ .getIdentifier("status_bar_height", "dimen", "android");
+ if (resourceId> 0) {
+ result = activity.getResources().getDimensionPixelSize(resourceId);
+ }
+ return result;
+ }
+
+ /**
+ * Set the status bar's light mode.
+ *
+ * @param window The window.
+ * @param isLightMode True to set status bar light mode, false otherwise.
+ */
+ public static void setStatusBarLightMode(@NonNull final Window window,
+ final boolean isLightMode) {
+ if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.M) {
+ View decorView = window.getDecorView();
+ if (decorView != null) {
+ int vis = decorView.getSystemUiVisibility();
+ if (isLightMode) {
+ window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+ vis |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+ vis |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
+ // 状态栏icon 表现为深色系
+ vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
+ } else {
+ vis &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
+ }
+ decorView.setSystemUiVisibility(vis);
+ }
+ }
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/statusbar/TranslucentFragment.java b/app/src/main/java/org/incoder/uiwidget/statusbar/TranslucentFragment.java
new file mode 100644
index 0000000..f377d7a
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/statusbar/TranslucentFragment.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2018 The Jerry xu Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.incoder.uiwidget.statusbar;
+
+
+import android.graphics.Color;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.Toolbar;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+
+import org.incoder.uiwidget.R;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+/**
+ * 透明色
+ *
+ * @author Jerry xu
+ * @date 7/29/2019 1:00 AM.
+ */
+public class TranslucentFragment extends Fragment {
+
+ @BindView(R.id.toolbar)
+ Toolbar mToolbar;
+ Unbinder unbinder;
+
+ public TranslucentFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.KITKAT){ // 4.4
+ getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ }
+
+ if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.LOLLIPOP) { // 5.0
+ Window window = getActivity().getWindow();
+ window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); // 確認取消半透明設置。
+ window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN // 全螢幕顯示,status bar 不隱藏,activity 上方 layout 會被 status bar 覆蓋。
+ | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); // 配合其他 flag 使用,防止 system bar 改變後 layout 的變動。
+ window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); // 跟系統表示要渲染 system bar 背景。
+ window.setStatusBarColor(Color.TRANSPARENT);
+ }
+ // Inflate the layout for this fragment
+ View view = inflater.inflate(R.layout.fragment_translucent, container, false);
+ unbinder = ButterKnife.bind(this, view);
+ return view;
+ }
+
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ unbinder.unbind();
+ }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/AutoCompleteTextViewFragment.java b/app/src/main/java/org/incoder/uiwidget/text/AutoCompleteTextViewFragment.java
new file mode 100644
index 0000000..19ba751
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/AutoCompleteTextViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * AutoCompleteTextViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class AutoCompleteTextViewFragment extends Fragment {
+
+
+ public AutoCompleteTextViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_auto_complete_text_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/CheckedTextViewFragment.java b/app/src/main/java/org/incoder/uiwidget/text/CheckedTextViewFragment.java
new file mode 100644
index 0000000..a09e082
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/CheckedTextViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * CheckedTextViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class CheckedTextViewFragment extends Fragment {
+
+
+ public CheckedTextViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_checked_text_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/DateFragment.java b/app/src/main/java/org/incoder/uiwidget/text/DateFragment.java
new file mode 100644
index 0000000..be86369
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/DateFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * DateFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class DateFragment extends Fragment {
+
+
+ public DateFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_date, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/EmailFragment.java b/app/src/main/java/org/incoder/uiwidget/text/EmailFragment.java
new file mode 100644
index 0000000..dcc9eb6
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/EmailFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * EmailFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class EmailFragment extends Fragment {
+
+
+ public EmailFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_email, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/MultiAutoCompleteTextViewFragment.java b/app/src/main/java/org/incoder/uiwidget/text/MultiAutoCompleteTextViewFragment.java
new file mode 100644
index 0000000..4ae93e6
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/MultiAutoCompleteTextViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * MultiAutoCompleteTextViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class MultiAutoCompleteTextViewFragment extends Fragment {
+
+
+ public MultiAutoCompleteTextViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_multi_auto_complete_text_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/MultilineTextFragment.java b/app/src/main/java/org/incoder/uiwidget/text/MultilineTextFragment.java
new file mode 100644
index 0000000..dd00a30
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/MultilineTextFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * MultilineTextFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class MultilineTextFragment extends Fragment {
+
+
+ public MultilineTextFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_multiline_text, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/NumberFragment.java b/app/src/main/java/org/incoder/uiwidget/text/NumberFragment.java
new file mode 100644
index 0000000..417f384
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/NumberFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * NumberFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class NumberFragment extends Fragment {
+
+
+ public NumberFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_number, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/PasswordFragment.java b/app/src/main/java/org/incoder/uiwidget/text/PasswordFragment.java
new file mode 100644
index 0000000..c8da7a3
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/PasswordFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * PasswordFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class PasswordFragment extends Fragment {
+
+
+ public PasswordFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_password, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/PhoneFragment.java b/app/src/main/java/org/incoder/uiwidget/text/PhoneFragment.java
new file mode 100644
index 0000000..efe596d
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/PhoneFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * PhoneFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class PhoneFragment extends Fragment {
+
+
+ public PhoneFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_phone, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/PlainTextFragment.java b/app/src/main/java/org/incoder/uiwidget/text/PlainTextFragment.java
new file mode 100644
index 0000000..8dfd8ee
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/PlainTextFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * PlainTextFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class PlainTextFragment extends Fragment {
+
+
+ public PlainTextFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_plain_text, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/PostalAddressFragment.java b/app/src/main/java/org/incoder/uiwidget/text/PostalAddressFragment.java
new file mode 100644
index 0000000..5b58a2b
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/PostalAddressFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * PostalAddressFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class PostalAddressFragment extends Fragment {
+
+
+ public PostalAddressFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_postal_address, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/TextInputLayoutFragment.java b/app/src/main/java/org/incoder/uiwidget/text/TextInputLayoutFragment.java
new file mode 100644
index 0000000..a1b94f0
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/TextInputLayoutFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * TextInputLayoutFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class TextInputLayoutFragment extends Fragment {
+
+
+ public TextInputLayoutFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_text_input_layout, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/TextViewFragment.java b/app/src/main/java/org/incoder/uiwidget/text/TextViewFragment.java
new file mode 100644
index 0000000..944a32d
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/TextViewFragment.java
@@ -0,0 +1,49 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import org.incoder.uiwidget.R;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+/**
+ * TextViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 6:00 AM.
+ */
+public class TextViewFragment extends Fragment {
+
+ @BindView(R.id.tv_textView)
+ TextView tvTextView;
+ Unbinder unbinder;
+
+ public TextViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ View view = inflater.inflate(R.layout.fragment_text_view, container, false);
+ unbinder = ButterKnife.bind(this, view);
+ return view;
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ unbinder.unbind();
+ }
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/text/TimeFragment.java b/app/src/main/java/org/incoder/uiwidget/text/TimeFragment.java
new file mode 100644
index 0000000..ff34524
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/text/TimeFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.text;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * TimeFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class TimeFragment extends Fragment {
+
+
+ public TimeFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_time, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/CalendarViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/CalendarViewFragment.java
new file mode 100644
index 0000000..73f4302
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/CalendarViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * CalendarViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class CalendarViewFragment extends Fragment {
+
+
+ public CalendarViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_calendar_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/DividerFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/DividerFragment.java
new file mode 100644
index 0000000..3252502
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/DividerFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * DividerFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class DividerFragment extends Fragment {
+
+
+ public DividerFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_divider, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/ImageViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/ImageViewFragment.java
new file mode 100644
index 0000000..6af8f42
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/ImageViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * ImageViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class ImageViewFragment extends Fragment {
+
+
+ public ImageViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_image_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/ProgressBarFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/ProgressBarFragment.java
new file mode 100644
index 0000000..fbdff40
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/ProgressBarFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * ProgressBarFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class ProgressBarFragment extends Fragment {
+
+
+ public ProgressBarFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_progress_bar, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/RatingBarFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/RatingBarFragment.java
new file mode 100644
index 0000000..e4cb919
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/RatingBarFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * RatingBarFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class RatingBarFragment extends Fragment {
+
+
+ public RatingBarFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_rating_bar, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/SearchViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/SearchViewFragment.java
new file mode 100644
index 0000000..56c14aa
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/SearchViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * SearchViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class SearchViewFragment extends Fragment {
+
+
+ public SearchViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_search_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/SeekBarFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/SeekBarFragment.java
new file mode 100644
index 0000000..4fd4a5d
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/SeekBarFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * SeekBarFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class SeekBarFragment extends Fragment {
+
+
+ public SeekBarFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_seek_bar, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/SurfaceViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/SurfaceViewFragment.java
new file mode 100644
index 0000000..f059d74
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/SurfaceViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * SurfaceViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class SurfaceViewFragment extends Fragment {
+
+
+ public SurfaceViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_surface_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/TextureViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/TextureViewFragment.java
new file mode 100644
index 0000000..6494764
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/TextureViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * TextureViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class TextureViewFragment extends Fragment {
+
+
+ public TextureViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_texture_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/VideoViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/VideoViewFragment.java
new file mode 100644
index 0000000..526c306
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/VideoViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * VideoViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class VideoViewFragment extends Fragment {
+
+
+ public VideoViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_video_view, container, false);
+ }
+
+}
diff --git a/app/src/main/java/org/incoder/uiwidget/widgets/WebViewFragment.java b/app/src/main/java/org/incoder/uiwidget/widgets/WebViewFragment.java
new file mode 100644
index 0000000..215d9ee
--- /dev/null
+++ b/app/src/main/java/org/incoder/uiwidget/widgets/WebViewFragment.java
@@ -0,0 +1,34 @@
+package org.incoder.uiwidget.widgets;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.incoder.uiwidget.R;
+
+/**
+ * WebViewFragment
+ *
+ * @author Jerry xu
+ * @date 4/6/2018 8:00 AM.
+ */
+public class WebViewFragment extends Fragment {
+
+
+ public WebViewFragment() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_web_view, container, false);
+ }
+
+}
diff --git a/app/src/main/res/drawable-v21/ic_button.xml b/app/src/main/res/drawable-v21/ic_button.xml
new file mode 100644
index 0000000..23dff7f
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_button.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_containers.xml b/app/src/main/res/drawable-v21/ic_containers.xml
new file mode 100644
index 0000000..9766fb5
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_containers.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_google.xml b/app/src/main/res/drawable-v21/ic_google.xml
new file mode 100644
index 0000000..c794f2a
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_google.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_layout.xml b/app/src/main/res/drawable-v21/ic_layout.xml
new file mode 100644
index 0000000..1f91125
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_layout.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_legacy.xml b/app/src/main/res/drawable-v21/ic_legacy.xml
new file mode 100644
index 0000000..3eb9100
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_legacy.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_send.xml b/app/src/main/res/drawable-v21/ic_send.xml
new file mode 100644
index 0000000..e5d35a7
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_send.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_share.xml b/app/src/main/res/drawable-v21/ic_share.xml
new file mode 100644
index 0000000..68fa1d8
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_share.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_text.xml b/app/src/main/res/drawable-v21/ic_text.xml
new file mode 100644
index 0000000..07a9950
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_text.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/ic_widgets.xml b/app/src/main/res/drawable-v21/ic_widgets.xml
new file mode 100644
index 0000000..444be55
--- /dev/null
+++ b/app/src/main/res/drawable-v21/ic_widgets.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..c7bd21d
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable-xxxhdpi/gradient_img.jpg b/app/src/main/res/drawable-xxxhdpi/gradient_img.jpg
new file mode 100644
index 0000000..bbba5ac
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/gradient_img.jpg differ
diff --git a/app/src/main/res/drawable-xxxhdpi/img_naruto.jpg b/app/src/main/res/drawable-xxxhdpi/img_naruto.jpg
new file mode 100644
index 0000000..ff33cdd
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/img_naruto.jpg differ
diff --git a/app/src/main/res/drawable-xxxhdpi/spiderman.jpg b/app/src/main/res/drawable-xxxhdpi/spiderman.jpg
new file mode 100644
index 0000000..903ad8e
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/spiderman.jpg differ
diff --git a/app/src/main/res/drawable/bottom_sheets_background.xml b/app/src/main/res/drawable/bottom_sheets_background.xml
new file mode 100644
index 0000000..9379f6d
--- /dev/null
+++ b/app/src/main/res/drawable/bottom_sheets_background.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/gradient_status_bar.xml b/app/src/main/res/drawable/gradient_status_bar.xml
new file mode 100644
index 0000000..647d41d
--- /dev/null
+++ b/app/src/main/res/drawable/gradient_status_bar.xml
@@ -0,0 +1,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_baseline_ballot_24px.xml b/app/src/main/res/drawable/ic_baseline_ballot_24px.xml
new file mode 100644
index 0000000..8d82b94
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_ballot_24px.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_broken_image_black_24dp.xml b/app/src/main/res/drawable/ic_broken_image_black_24dp.xml
new file mode 100644
index 0000000..8d563a9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_broken_image_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_button.xml b/app/src/main/res/drawable/ic_button.xml
new file mode 100644
index 0000000..23dff7f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_button.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_containers.xml b/app/src/main/res/drawable/ic_containers.xml
new file mode 100644
index 0000000..9766fb5
--- /dev/null
+++ b/app/src/main/res/drawable/ic_containers.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_flip_black_24dp.xml b/app/src/main/res/drawable/ic_flip_black_24dp.xml
new file mode 100644
index 0000000..2bc2762
--- /dev/null
+++ b/app/src/main/res/drawable/ic_flip_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_google.xml b/app/src/main/res/drawable/ic_google.xml
new file mode 100644
index 0000000..c794f2a
--- /dev/null
+++ b/app/src/main/res/drawable/ic_google.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_gradient_black_24dp.xml b/app/src/main/res/drawable/ic_gradient_black_24dp.xml
new file mode 100644
index 0000000..4761d5e
--- /dev/null
+++ b/app/src/main/res/drawable/ic_gradient_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_info_outline_black_24dp.xml b/app/src/main/res/drawable/ic_info_outline_black_24dp.xml
new file mode 100644
index 0000000..ba951dc
--- /dev/null
+++ b/app/src/main/res/drawable/ic_info_outline_black_24dp.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..d5fccc5
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_layout.xml b/app/src/main/res/drawable/ic_layout.xml
new file mode 100644
index 0000000..1f91125
--- /dev/null
+++ b/app/src/main/res/drawable/ic_layout.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_legacy.xml b/app/src/main/res/drawable/ic_legacy.xml
new file mode 100644
index 0000000..3eb9100
--- /dev/null
+++ b/app/src/main/res/drawable/ic_legacy.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_search_24dp.xml b/app/src/main/res/drawable/ic_search_24dp.xml
new file mode 100644
index 0000000..be5ad99
--- /dev/null
+++ b/app/src/main/res/drawable/ic_search_24dp.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_send.xml b/app/src/main/res/drawable/ic_send.xml
new file mode 100644
index 0000000..e5d35a7
--- /dev/null
+++ b/app/src/main/res/drawable/ic_send.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_share.xml b/app/src/main/res/drawable/ic_share.xml
new file mode 100644
index 0000000..68fa1d8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_share.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_text.xml b/app/src/main/res/drawable/ic_text.xml
new file mode 100644
index 0000000..07a9950
--- /dev/null
+++ b/app/src/main/res/drawable/ic_text.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_widgets.xml b/app/src/main/res/drawable/ic_widgets.xml
new file mode 100644
index 0000000..444be55
--- /dev/null
+++ b/app/src/main/res/drawable/ic_widgets.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/side_nav_bar.xml b/app/src/main/res/drawable/side_nav_bar.xml
new file mode 100644
index 0000000..6d81870
--- /dev/null
+++ b/app/src/main/res/drawable/side_nav_bar.xml
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_code.xml b/app/src/main/res/layout/activity_code.xml
new file mode 100644
index 0000000..196dc06
--- /dev/null
+++ b/app/src/main/res/layout/activity_code.xml
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..a61d8a6
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_sheet.xml b/app/src/main/res/layout/activity_sheet.xml
new file mode 100644
index 0000000..3bae3cd
--- /dev/null
+++ b/app/src/main/res/layout/activity_sheet.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_status_bar.xml b/app/src/main/res/layout/activity_status_bar.xml
new file mode 100644
index 0000000..ded9c6a
--- /dev/null
+++ b/app/src/main/res/layout/activity_status_bar.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml
new file mode 100644
index 0000000..7ee4411
--- /dev/null
+++ b/app/src/main/res/layout/app_bar_main.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_ad_view.xml b/app/src/main/res/layout/fragment_ad_view.xml
new file mode 100644
index 0000000..43f7b94
--- /dev/null
+++ b/app/src/main/res/layout/fragment_ad_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_app_bar_layout.xml b/app/src/main/res/layout/fragment_app_bar_layout.xml
new file mode 100644
index 0000000..243add9
--- /dev/null
+++ b/app/src/main/res/layout/fragment_app_bar_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_auto_complete_text_view.xml b/app/src/main/res/layout/fragment_auto_complete_text_view.xml
new file mode 100644
index 0000000..c4cd7e6
--- /dev/null
+++ b/app/src/main/res/layout/fragment_auto_complete_text_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_bottom_navigation.xml b/app/src/main/res/layout/fragment_bottom_navigation.xml
new file mode 100644
index 0000000..5ec0c7c
--- /dev/null
+++ b/app/src/main/res/layout/fragment_bottom_navigation.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_bottom_sheet.xml b/app/src/main/res/layout/fragment_bottom_sheet.xml
new file mode 100644
index 0000000..48fd604
--- /dev/null
+++ b/app/src/main/res/layout/fragment_bottom_sheet.xml
@@ -0,0 +1,26 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_button.xml b/app/src/main/res/layout/fragment_button.xml
new file mode 100644
index 0000000..37f0a0e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_button.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_calendar_view.xml b/app/src/main/res/layout/fragment_calendar_view.xml
new file mode 100644
index 0000000..7088480
--- /dev/null
+++ b/app/src/main/res/layout/fragment_calendar_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_card_view.xml b/app/src/main/res/layout/fragment_card_view.xml
new file mode 100644
index 0000000..1e1f480
--- /dev/null
+++ b/app/src/main/res/layout/fragment_card_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_check_box.xml b/app/src/main/res/layout/fragment_check_box.xml
new file mode 100644
index 0000000..26ba46d
--- /dev/null
+++ b/app/src/main/res/layout/fragment_check_box.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_checked_text_view.xml b/app/src/main/res/layout/fragment_checked_text_view.xml
new file mode 100644
index 0000000..41819a7
--- /dev/null
+++ b/app/src/main/res/layout/fragment_checked_text_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_constraint_layout.xml b/app/src/main/res/layout/fragment_constraint_layout.xml
new file mode 100644
index 0000000..ba864a8
--- /dev/null
+++ b/app/src/main/res/layout/fragment_constraint_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_date.xml b/app/src/main/res/layout/fragment_date.xml
new file mode 100644
index 0000000..628e8f0
--- /dev/null
+++ b/app/src/main/res/layout/fragment_date.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_divider.xml b/app/src/main/res/layout/fragment_divider.xml
new file mode 100644
index 0000000..a0e8ba4
--- /dev/null
+++ b/app/src/main/res/layout/fragment_divider.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_email.xml b/app/src/main/res/layout/fragment_email.xml
new file mode 100644
index 0000000..4488ccd
--- /dev/null
+++ b/app/src/main/res/layout/fragment_email.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_floating_action_button.xml b/app/src/main/res/layout/fragment_floating_action_button.xml
new file mode 100644
index 0000000..13f11e3
--- /dev/null
+++ b/app/src/main/res/layout/fragment_floating_action_button.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_fragment.xml b/app/src/main/res/layout/fragment_fragment.xml
new file mode 100644
index 0000000..cce85a6
--- /dev/null
+++ b/app/src/main/res/layout/fragment_fragment.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_frame_layout.xml b/app/src/main/res/layout/fragment_frame_layout.xml
new file mode 100644
index 0000000..8ae7c1e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_frame_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_gradient.xml b/app/src/main/res/layout/fragment_gradient.xml
new file mode 100644
index 0000000..9700f71
--- /dev/null
+++ b/app/src/main/res/layout/fragment_gradient.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_grid_layout.xml b/app/src/main/res/layout/fragment_grid_layout.xml
new file mode 100644
index 0000000..7386ec0
--- /dev/null
+++ b/app/src/main/res/layout/fragment_grid_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_grid_view.xml b/app/src/main/res/layout/fragment_grid_view.xml
new file mode 100644
index 0000000..9b5a1f7
--- /dev/null
+++ b/app/src/main/res/layout/fragment_grid_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_guideline.xml b/app/src/main/res/layout/fragment_guideline.xml
new file mode 100644
index 0000000..b312dd9
--- /dev/null
+++ b/app/src/main/res/layout/fragment_guideline.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_image.xml b/app/src/main/res/layout/fragment_image.xml
new file mode 100644
index 0000000..bf8de8f
--- /dev/null
+++ b/app/src/main/res/layout/fragment_image.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_image_button.xml b/app/src/main/res/layout/fragment_image_button.xml
new file mode 100644
index 0000000..738b31f
--- /dev/null
+++ b/app/src/main/res/layout/fragment_image_button.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_image_view.xml b/app/src/main/res/layout/fragment_image_view.xml
new file mode 100644
index 0000000..eb964c5
--- /dev/null
+++ b/app/src/main/res/layout/fragment_image_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_include.xml b/app/src/main/res/layout/fragment_include.xml
new file mode 100644
index 0000000..f06a56e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_include.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_item_list_dialog_item.xml b/app/src/main/res/layout/fragment_item_list_dialog_item.xml
new file mode 100644
index 0000000..9539855
--- /dev/null
+++ b/app/src/main/res/layout/fragment_item_list_dialog_item.xml
@@ -0,0 +1,28 @@
+
+
+
diff --git a/app/src/main/res/layout/fragment_linear_layout.xml b/app/src/main/res/layout/fragment_linear_layout.xml
new file mode 100644
index 0000000..83171ca
--- /dev/null
+++ b/app/src/main/res/layout/fragment_linear_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_list_view.xml b/app/src/main/res/layout/fragment_list_view.xml
new file mode 100644
index 0000000..871e076
--- /dev/null
+++ b/app/src/main/res/layout/fragment_list_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_magic.xml b/app/src/main/res/layout/fragment_magic.xml
new file mode 100644
index 0000000..57040fc
--- /dev/null
+++ b/app/src/main/res/layout/fragment_magic.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_map_view.xml b/app/src/main/res/layout/fragment_map_view.xml
new file mode 100644
index 0000000..d1197e5
--- /dev/null
+++ b/app/src/main/res/layout/fragment_map_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_multi_auto_complete_text_view.xml b/app/src/main/res/layout/fragment_multi_auto_complete_text_view.xml
new file mode 100644
index 0000000..d2a704b
--- /dev/null
+++ b/app/src/main/res/layout/fragment_multi_auto_complete_text_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_multiline_text.xml b/app/src/main/res/layout/fragment_multiline_text.xml
new file mode 100644
index 0000000..672ed95
--- /dev/null
+++ b/app/src/main/res/layout/fragment_multiline_text.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_navigation_view.xml b/app/src/main/res/layout/fragment_navigation_view.xml
new file mode 100644
index 0000000..aec27eb
--- /dev/null
+++ b/app/src/main/res/layout/fragment_navigation_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_number.xml b/app/src/main/res/layout/fragment_number.xml
new file mode 100644
index 0000000..f4677db
--- /dev/null
+++ b/app/src/main/res/layout/fragment_number.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_password.xml b/app/src/main/res/layout/fragment_password.xml
new file mode 100644
index 0000000..e7b144a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_password.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_phone.xml b/app/src/main/res/layout/fragment_phone.xml
new file mode 100644
index 0000000..0d13c32
--- /dev/null
+++ b/app/src/main/res/layout/fragment_phone.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_plain_text.xml b/app/src/main/res/layout/fragment_plain_text.xml
new file mode 100644
index 0000000..83fd934
--- /dev/null
+++ b/app/src/main/res/layout/fragment_plain_text.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_postal_address.xml b/app/src/main/res/layout/fragment_postal_address.xml
new file mode 100644
index 0000000..fac15ba
--- /dev/null
+++ b/app/src/main/res/layout/fragment_postal_address.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_progress_bar.xml b/app/src/main/res/layout/fragment_progress_bar.xml
new file mode 100644
index 0000000..9ad4497
--- /dev/null
+++ b/app/src/main/res/layout/fragment_progress_bar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_radio_button.xml b/app/src/main/res/layout/fragment_radio_button.xml
new file mode 100644
index 0000000..4d4515d
--- /dev/null
+++ b/app/src/main/res/layout/fragment_radio_button.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_radio_group.xml b/app/src/main/res/layout/fragment_radio_group.xml
new file mode 100644
index 0000000..92ae58c
--- /dev/null
+++ b/app/src/main/res/layout/fragment_radio_group.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_rating_bar.xml b/app/src/main/res/layout/fragment_rating_bar.xml
new file mode 100644
index 0000000..40bef9f
--- /dev/null
+++ b/app/src/main/res/layout/fragment_rating_bar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_recycler_view.xml b/app/src/main/res/layout/fragment_recycler_view.xml
new file mode 100644
index 0000000..3cd049c
--- /dev/null
+++ b/app/src/main/res/layout/fragment_recycler_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_relative_layout.xml b/app/src/main/res/layout/fragment_relative_layout.xml
new file mode 100644
index 0000000..1048ca7
--- /dev/null
+++ b/app/src/main/res/layout/fragment_relative_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_request_focus.xml b/app/src/main/res/layout/fragment_request_focus.xml
new file mode 100644
index 0000000..4fd9106
--- /dev/null
+++ b/app/src/main/res/layout/fragment_request_focus.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_scroll_view.xml b/app/src/main/res/layout/fragment_scroll_view.xml
new file mode 100644
index 0000000..a0dc00e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_scroll_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_search_view.xml b/app/src/main/res/layout/fragment_search_view.xml
new file mode 100644
index 0000000..5aba204
--- /dev/null
+++ b/app/src/main/res/layout/fragment_search_view.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_seek_bar.xml b/app/src/main/res/layout/fragment_seek_bar.xml
new file mode 100644
index 0000000..dfcc16a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_seek_bar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_space.xml b/app/src/main/res/layout/fragment_space.xml
new file mode 100644
index 0000000..3ad9a04
--- /dev/null
+++ b/app/src/main/res/layout/fragment_space.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_spinner.xml b/app/src/main/res/layout/fragment_spinner.xml
new file mode 100644
index 0000000..14c88e8
--- /dev/null
+++ b/app/src/main/res/layout/fragment_spinner.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_surface_view.xml b/app/src/main/res/layout/fragment_surface_view.xml
new file mode 100644
index 0000000..7cce797
--- /dev/null
+++ b/app/src/main/res/layout/fragment_surface_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_switch.xml b/app/src/main/res/layout/fragment_switch.xml
new file mode 100644
index 0000000..55fd2e0
--- /dev/null
+++ b/app/src/main/res/layout/fragment_switch.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_tab_host.xml b/app/src/main/res/layout/fragment_tab_host.xml
new file mode 100644
index 0000000..b229cc0
--- /dev/null
+++ b/app/src/main/res/layout/fragment_tab_host.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_tab_layout.xml b/app/src/main/res/layout/fragment_tab_layout.xml
new file mode 100644
index 0000000..79ffeb0
--- /dev/null
+++ b/app/src/main/res/layout/fragment_tab_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_table_layout.xml b/app/src/main/res/layout/fragment_table_layout.xml
new file mode 100644
index 0000000..86b135f
--- /dev/null
+++ b/app/src/main/res/layout/fragment_table_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_table_row.xml b/app/src/main/res/layout/fragment_table_row.xml
new file mode 100644
index 0000000..5314cd6
--- /dev/null
+++ b/app/src/main/res/layout/fragment_table_row.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_tabs.xml b/app/src/main/res/layout/fragment_tabs.xml
new file mode 100644
index 0000000..223bb39
--- /dev/null
+++ b/app/src/main/res/layout/fragment_tabs.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_text_input_layout.xml b/app/src/main/res/layout/fragment_text_input_layout.xml
new file mode 100644
index 0000000..1a663b5
--- /dev/null
+++ b/app/src/main/res/layout/fragment_text_input_layout.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_text_view.xml b/app/src/main/res/layout/fragment_text_view.xml
new file mode 100644
index 0000000..f01374d
--- /dev/null
+++ b/app/src/main/res/layout/fragment_text_view.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_texture_view.xml b/app/src/main/res/layout/fragment_texture_view.xml
new file mode 100644
index 0000000..5724799
--- /dev/null
+++ b/app/src/main/res/layout/fragment_texture_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_time.xml b/app/src/main/res/layout/fragment_time.xml
new file mode 100644
index 0000000..e2737dc
--- /dev/null
+++ b/app/src/main/res/layout/fragment_time.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_toggle_button.xml b/app/src/main/res/layout/fragment_toggle_button.xml
new file mode 100644
index 0000000..5d683b7
--- /dev/null
+++ b/app/src/main/res/layout/fragment_toggle_button.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_toolbar.xml b/app/src/main/res/layout/fragment_toolbar.xml
new file mode 100644
index 0000000..47af95b
--- /dev/null
+++ b/app/src/main/res/layout/fragment_toolbar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_translucent.xml b/app/src/main/res/layout/fragment_translucent.xml
new file mode 100644
index 0000000..cb286bc
--- /dev/null
+++ b/app/src/main/res/layout/fragment_translucent.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_video_view.xml b/app/src/main/res/layout/fragment_video_view.xml
new file mode 100644
index 0000000..573ad4e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_video_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_view.xml b/app/src/main/res/layout/fragment_view.xml
new file mode 100644
index 0000000..803b48c
--- /dev/null
+++ b/app/src/main/res/layout/fragment_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_view_pager.xml b/app/src/main/res/layout/fragment_view_pager.xml
new file mode 100644
index 0000000..dac9f81
--- /dev/null
+++ b/app/src/main/res/layout/fragment_view_pager.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_view_stub.xml b/app/src/main/res/layout/fragment_view_stub.xml
new file mode 100644
index 0000000..fdef570
--- /dev/null
+++ b/app/src/main/res/layout/fragment_view_stub.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_web_view.xml b/app/src/main/res/layout/fragment_web_view.xml
new file mode 100644
index 0000000..0a13345
--- /dev/null
+++ b/app/src/main/res/layout/fragment_web_view.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/include_tab.xml b/app/src/main/res/layout/include_tab.xml
new file mode 100644
index 0000000..4e4bcc2
--- /dev/null
+++ b/app/src/main/res/layout/include_tab.xml
@@ -0,0 +1,10 @@
+
+
diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml
new file mode 100644
index 0000000..211e10a
--- /dev/null
+++ b/app/src/main/res/layout/nav_header_main.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml
new file mode 100644
index 0000000..5d8fa4f
--- /dev/null
+++ b/app/src/main/res/menu/activity_main_drawer.xml
@@ -0,0 +1,67 @@
+
+
diff --git a/app/src/main/res/menu/bottom_nav_menu.xml b/app/src/main/res/menu/bottom_nav_menu.xml
new file mode 100644
index 0000000..0413e81
--- /dev/null
+++ b/app/src/main/res/menu/bottom_nav_menu.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/menu/info.xml b/app/src/main/res/menu/info.xml
new file mode 100644
index 0000000..6ed8f95
--- /dev/null
+++ b/app/src/main/res/menu/info.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml
new file mode 100644
index 0000000..a2411e3
--- /dev/null
+++ b/app/src/main/res/menu/main.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/menu/options_menu.xml b/app/src/main/res/menu/options_menu.xml
new file mode 100644
index 0000000..5386ae8
--- /dev/null
+++ b/app/src/main/res/menu/options_menu.xml
@@ -0,0 +1,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..a2f5908
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..1b52399
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..ff10afd
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..115a4c7
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..dcd3cd8
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..459ca60
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..8ca12fe
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..8e19b41
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b824ebd
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..4c19a13
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..8b9a9cd
--- /dev/null
+++ b/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..21236f5
--- /dev/null
+++ b/app/src/main/res/values/attrs.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..c782ab7
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,8 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
+ #FFFFFF
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..788ef66
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,10 @@
+
+
+ 16dp
+ 16dp
+ 8dp
+ 176dp
+ 16dp
+ 16dp
+ 8dp
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..1f03ca7
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,130 @@
+
+
+ UIWidget
+ Open navigation drawer
+ Close navigation drawer
+ Android Studio
+ android.studio@android.com
+ Navigation header
+ Settings
+
+
+ Hello blank fragment
+ StatusBarActivity
+ Image
+ Translucent
+ Gradient
+ Magic
+
+ Search
+ Info
+ Text
+ Button
+ Widgets
+ Layout
+ Containers
+ Google
+ Legacy
+ Components
+ StatusBar & NavigationBar
+ Bottom Sheets
+ Chips
+ CodeEdit
+ Notification
+
+
+ "Material is the metaphor.\n\n"
+
+ "A material metaphor is the unifying theory of a rationalized space and a system of motion."
+ "The material is grounded in tactile reality, inspired by the study of paper and ink, yet "
+ "technologically advanced and open to imagination and magic.\n"
+ "Surfaces and edges of the material provide visual cues that are grounded in reality. The "
+ "use of familiar tactile attributes helps users quickly understand affordances. Yet the "
+ "flexibility of the material creates new affordances that supercede those in the physical "
+ "world, without breaking the rules of physics.\n"
+ "The fundamentals of light, surface, and movement are key to conveying how objects move, "
+ "interact, and exist in space and in relation to each other. Realistic lighting shows "
+ "seams, divides space, and indicates moving parts.\n\n"
+
+ "Bold, graphic, intentional.\n\n"
+
+ "The foundational elements of print based design typography, grids, space, scale, color, "
+ "and use of imagery guide visual treatments. These elements do far more than please the "
+ "eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge to edge "
+ "imagery, large scale typography, and intentional white space create a bold and graphic "
+ "interface that immerse the user in the experience.\n"
+ "An emphasis on user actions makes core functionality immediately apparent and provides "
+ "waypoints for the user.\n\n"
+
+ "Motion provides meaning.\n\n"
+
+ "Motion respects and reinforces the user as the prime mover. Primary user actions are "
+ "inflection points that initiate motion, transforming the whole design.\n"
+ "All action takes place in a single environment. Objects are presented to the user without "
+ "breaking the continuity of experience even as they transform and reorganize.\n"
+ "Motion is meaningful and appropriate, serving to focus attention and maintain continuity. "
+ "Feedback is subtle yet clear. Transitions are efficient yet coherent.\n\n"
+
+ "3D world.\n\n"
+
+ "The material environment is a 3D space, which means all objects have x, y, and z "
+ "dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the "
+ "positive z-axis extending towards the viewer. Every sheet of material occupies a single "
+ "position along the z-axis and has a standard 1dp thickness.\n"
+ "On the web, the z-axis is used for layering and not for perspective. The 3D world is "
+ "emulated by manipulating the y-axis.\n\n"
+
+ "Light and shadow.\n\n"
+
+ "Within the material environment, virtual lights illuminate the scene. Key lights create "
+ "directional shadows, while ambient light creates soft shadows from all angles.\n"
+ "Shadows in the material environment are cast by these two light sources. In Android "
+ "development, shadows occur when light sources are blocked by sheets of material at "
+ "various positions along the z-axis. On the web, shadows are depicted by manipulating the "
+ "y-axis only. The following example shows the card with a height of 6dp.\n\n"
+
+ "Resting elevation.\n\n"
+
+ "All material objects, regardless of size, have a resting elevation, or default elevation "
+ "that does not change. If an object changes elevation, it should return to its resting "
+ "elevation as soon as possible.\n\n"
+
+ "Component elevations.\n\n"
+
+ "The resting elevation for a component type is consistent across apps (e.g., FAB elevation "
+ "does not vary from 6dp in one app to 16dp in another app).\n"
+ "Components may have different resting elevations across platforms, depending on the depth "
+ "of the environment (e.g., TV has a greater depth than mobile or desktop).\n\n"
+
+ "Responsive elevation and dynamic elevation offsets.\n\n"
+
+ "Some component types have responsive elevation, meaning they change elevation in response "
+ "to user input (e.g., normal, focused, and pressed) or system events. These elevation "
+ "changes are consistently implemented using dynamic elevation offsets.\n"
+ "Dynamic elevation offsets are the goal elevation that a component moves towards, relative "
+ "to the component’s resting state. They ensure that elevation changes are consistent "
+ "across actions and component types. For example, all components that lift on press have "
+ "the same elevation change relative to their resting elevation.\n"
+ "Once the input event is completed or cancelled, the component will return to its resting "
+ "elevation.\n\n"
+
+ "Avoiding elevation interference.\n\n"
+
+ "Components with responsive elevations may encounter other components as they move between "
+ "their resting elevations and dynamic elevation offsets. Because material cannot pass "
+ "through other material, components avoid interfering with one another any number of ways, "
+ "whether on a per component basis or using the entire app layout.\n"
+ "On a component level, components can move or be removed before they cause interference. "
+ "For example, a floating action button (FAB) can disappear or move off screen before a "
+ "user picks up a card, or it can move if a snackbar appears.\n"
+ "On the layout level, design your app layout to minimize opportunities for interference. "
+ "For example, position the FAB to one side of stream of a cards so the FAB won’t interfere "
+ "when a user tries to pick up one of cards.\n\n"
+
+ Shape Background
+ Image Background
+ Light mode
+ Black mode
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..f98c180
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/test/java/org/incoder/uiwidget/ExampleUnitTest.java b/app/src/test/java/org/incoder/uiwidget/ExampleUnitTest.java
new file mode 100644
index 0000000..2da874c
--- /dev/null
+++ b/app/src/test/java/org/incoder/uiwidget/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package org.incoder.uiwidget;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..cb686eb
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,25 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.4.2'
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..743d692
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,13 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..7a3265e
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..519b0b4
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Jul 31 17:39:29 CST 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: 0ドル may be a link
+PRG="0ドル"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*'> /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/">/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED">/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "0ドル"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java>/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "0ドル")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version>NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'