1 |
recyclerView.setNestedScrollingEnabled( false ); |
しかし、そもそもNestedScrollViewとRecyclerViewをネストにすることが問題っぽい.
例えば、画面をスクロールしてもRecyclerView.onScrolledは呼ばれないみたいなので、ネストするというデザインを変えたほうがいいかもしれない.
1 |
recyclerView.setNestedScrollingEnabled( false ); |
1 |
android:layoutDirection="rtl" |
1 2 |
android:button="@null" android:drawableEnd="?android:attr/listChoiceIndicatorMultiple" |
1 2 3 |
$ git clone https: //github .com /syntaxhighlighter/syntaxhighlighter .git $ cd syntaxhighlighter $ npm install |
1 2 |
ko-ika@PC MINGW64 ~ /Blogger/syntaxhighlighter (master) $ . /node_modules/gulp/bin/gulp .js setup-project |
1 |
[hh:mm:ss] TypeError: loadReposFromCache(...).error is not a function |
39 |
const loadRepos = () => loadReposFromCache(). catch (loadReposFromGitHub).then(R.map(R.pick([ 'clone_url' , 'name' ]))); |
1 2 |
ko-ika@PC MINGW64 ~ /Blogger/syntaxhighlighter (master) $ . /node_modules/gulp/bin/gulp .js build --brushes=javascript,css --theme=default |
1 |
[hh:mm:ss] TypeError: Promise.props is not a function |
33 |
const Promise = require( 'bluebird' ); |
1 2 3 |
ERROR in . /src/core .js Module not found: Error: Cannot resolve module 'brush-javascript' in C:\Users\ko-ika\Blogger\syntaxhighlighter\src @ . /src/core .js 241:14-41 |
1 2 |
ko-ika@PC MINGW64 ~ /Blogger/syntaxhighlighter (master) $ npm install folder-name |
1 2 3 4 5 |
ko-ika@PC MINGW64 ~ /Blogger/syntaxhighlighter (master) $ npm install brush-javascript ko-ika@PC MINGW64 ~ /Blogger/syntaxhighlighter (master) $ npm install brush-css |
1 2 3 4 |
npm install opts-parser npm install syntaxhighlighter-match npm install syntaxhighlighter-html-renderer npm install syntaxhighlighter-regex |
1 2 |
< script src = '[path]/syntaxhighlighter.js' type = 'text/javascript' /> < link href = '[path]/theme.css' rel = 'stylesheet' type = 'text/css' /> |
- EditText editText = findViewById(R.id.editText);
- editText.getBackground().clearColorFilter();
- EditText editText = findViewById(R.id.editText);
- editText.getBackground().setColorFilter(null);
- editText.refreshDrawableState();
- Button button = findViewById(R.id.button);
- Button button = new Button(this);
- constrintLayout.addView(button)
- ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams)button.getLayoutParams();
- layoutParams.startToEnd = anotherView.getId();
- layoutParams.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.verticalBias = (float) 0.1;
- layoutParams.horizontalBias = (float) 0.1;
- button1.setLayoutParams(layoutParams);
- button.setLayoutParams(layoutParams);
- <?xml version="1.0" encoding="utf-8"?>
- <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/constraintLayoutParamsLayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context="com.blogspot.ko-ika.constraintlayoutparams.MainActivity">
- <Button
- android:id="@+id/button1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Button1" />
- <Button
- android:id="@+id/button2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Button2" />
- </android.support.constraint.ConstraintLayout>
- package jp.blogspot.ko-ika.constraintlayoutparams;
- import android.support.constraint.ConstraintLayout;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.widget.Button;
- public class MainActivity extends AppCompatActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- Button button1 = findViewById(R.id.button1);
- Button button2 = findViewById(R.id.button2);
- ConstraintLayout constraintLayout = findViewById(R.id.constraintLayoutParamsLayout);
- // Button1の設定
- ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams)button1.getLayoutParams();
- layoutParams.topMargin = 8;
- layoutParams.rightMargin = 16;
- layoutParams.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.verticalBias = (float) 0.1;
- layoutParams.horizontalBias = (float) 0.1;
- button1.setLayoutParams(layoutParams);
- // Button2の設定
- layoutParams = (ConstraintLayout.LayoutParams)button2.getLayoutParams();
- layoutParams.leftMargin = 16;
- layoutParams.startToEnd = button1.getId();
- layoutParams.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.verticalBias = (float)0.1;
- layoutParams.horizontalBias = 0;
- button2.setLayoutParams(layoutParams);
- }
- }
- <?xml version="1.0" encoding="utf-8"?>
- <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/constraintLayoutParamsLayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context="com.blogspot.ko-ika.constraintlayoutparams.MainActivity">
- </android.support.constraint.ConstraintLayout>
- Button button1 = new Button(this);
- Button button2 = new Button(this);
- ConstraintLayout constraintLayout = findViewById(R.id.constraintLayoutParamsLayout);
- // Button1の設定
- constraintLayout.addView(button1);
- button1.setText("Button1");
- ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams)button1.getLayoutParams();
- layoutParams.topMargin = 8;
- layoutParams.rightMargin = 16;
- layoutParams.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.verticalBias = (float) 0.1;
- layoutParams.horizontalBias = (float) 0.1;
- button1.setLayoutParams(layoutParams);
- // Button2の設定
- constraintLayout.addView(button2);
- button2.setText("Button2");
- layoutParams = (ConstraintLayout.LayoutParams)button2.getLayoutParams();
- layoutParams.leftMargin = 16;
- layoutParams.startToEnd = button1.getId();
- layoutParams.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
- layoutParams.verticalBias = (float)0.1;
- layoutParams.horizontalBias = 0;
- button2.setLayoutParams(layoutParams);
- parentLinearLayout.removeView(childLinearLayout);
- parentLinearLayout.removeViewAt(index);
- int index = parentLinearLayout.indexOfChild(childLinearLayout);
- LinearLayout linearLayout = findViewById(R.id.LinearLayout);
- ViewGroup.LayoutParams layoutParams = linearLayout.getLayoutParams();
- layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
- layoutParams.width = 200;
- ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams)linearLayout.getLayoutParams();
- marginLayoutParams.leftMargin = 8;
- marginLayoutParams.rightMargin = 8;
- marginLayoutParams.topMargin = 8;
- marginLayoutParams.bottomMargin = 8;
- linearLayout.setLayoutParams(marginLayoutParams);
- layoutParams.width = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200, getResources().getDisplayMetrics());
NestedScrollView を下にスクロールしている間は, FloatingActionButton を表示させないようにする. 少し変えれば, RecyclerView 等の他のScrollViewにも使えそう(未確認). 下に実際の挙動を示した. 目次 ...