Created
October 17, 2018 11:28
-
-
Save JolandaVerhoef/8d7a0ef7d905d8aeb0d3586658bb6b6b to your computer and use it in GitHub Desktop.
Sample project with failing preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<com.jolandaverhoef.test.TestView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintTop_toTopOf="parent"/> | |
</android.support.constraint.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jolandaverhoef.test | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jolandaverhoef.test | |
import android.content.Context | |
import android.support.constraint.ConstraintLayout | |
import android.util.AttributeSet | |
import android.view.View | |
class TestView : ConstraintLayout { | |
constructor(context: Context) : super(context) { | |
View.inflate(context, R.layout.view_test, this) | |
} | |
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) { | |
View.inflate(context, R.layout.view_test, this) | |
} | |
constructor(context: Context, attrs: AttributeSet?, attributeSetId: Int) : super(context, attrs, attributeSetId) { | |
View.inflate(context, R.layout.view_test, this) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<merge xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
tools:parentTag="android.support.constraint.ConstraintLayout"> | |
<TextView | |
android:id="@+id/text_test" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
tools:text="test"/> | |
</merge> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment