-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e57a67a
commit 1c55bc9
Showing
8 changed files
with
63 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 3 additions & 20 deletions
23
app/src/main/java/com/deathsdoor/myapplication/MainActivity.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,18 @@ | ||
package com.deathsdoor.myapplication | ||
|
||
import android.os.Bundle | ||
import android.widget.EditText | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.deathsdoor.myapplication.databinding.ActivityMainBinding | ||
import com.deathsdoor.myapplication.databinding.ActivityMainBinding.inflate | ||
import com.deathsdoor.ui_core.public.SettingBuilder.SwitchSetting | ||
import com.deathsdoor.ui_core.public.createAttributeSet | ||
import com.deathsdoor.ui_core.widgets.Switch | ||
import org.xmlpull.v1.XmlPullParserFactory | ||
import com.deathsdoor.ui_core.public.SettingBuilder | ||
|
||
class MainActivity : AppCompatActivity() { | ||
private lateinit var binding: ActivityMainBinding | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = inflate(layoutInflater) | ||
setContentView(binding.root) | ||
|
||
val parserFactory = XmlPullParserFactory.newInstance() | ||
val parser = parserFactory.newPullParser() | ||
parser.setInput(AttributeSetInputStream(attrs), null) | ||
val xmlBlockParser = XmlBlock.Parser.newInstance(parser) | ||
|
||
|
||
binding.root.addView( | ||
Switch(this, | ||
SwitchSetting( | ||
title = "Switch Setting", | ||
shortDescription = "This is a switch setting" | ||
).createAttributeSet() | ||
) | ||
) | ||
// SettingBuilder.show(binding.root.id,R.layout.setting_test,supportFragmentManager) | ||
// SettingBuilder.show(binding.root.id,R.layout.setting_test,supportFragmentManager) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<resources> | ||
<string name="app_name">My Application</string> | ||
<string name="app_name">Setting-UI Library Test</string> | ||
</resources> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.deathsdoor.ui_core"> | ||
|
||
</manifest> | ||
<manifest package="com.deathsdoor.ui_core" /> |
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
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
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