-
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
9146497
commit ee73813
Showing
13 changed files
with
163 additions
and
67 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/sibyl/HttpFileDominator/activities/BaseActivity.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.sibyl.HttpFileDominator.activities | ||
|
||
import androidx.appcompat.app.AppCompatActivity | ||
|
||
/** | ||
* @author Sasuke on 2020/6/23. | ||
*/ | ||
class BaseActivity: AppCompatActivity() { | ||
} |
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
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/sibyl/HttpFileDominator/mainactivity/model/MainModel.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.sibyl.HttpFileDominator.mainactivity.model | ||
|
||
import androidx.lifecycle.ViewModel | ||
import com.sibyl.HttpFileDominator.mainactivity.repo.MainRepo | ||
|
||
/** | ||
* @author HUANGSHI-PC on 2020-03-06 0006. | ||
*/ | ||
class MainModel(val repo: MainRepo): ViewModel() { | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/sibyl/HttpFileDominator/mainactivity/repo/MainModelFactory.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.sibyl.HttpFileDominator.mainactivity.repo | ||
|
||
import androidx.lifecycle.ViewModel | ||
import androidx.lifecycle.ViewModelProvider | ||
import com.sibyl.HttpFileDominator.mainactivity.model.MainModel | ||
|
||
/** | ||
* @author HUANGSHI-PC on 2020-03-06 0006. | ||
*/ | ||
class MainModelFactory(val repo: MainRepo): ViewModelProvider.Factory { | ||
override fun <T : ViewModel?> create(modelClass: Class<T>): T { | ||
return MainModel(repo) as T | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/sibyl/HttpFileDominator/mainactivity/repo/MainRepo.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.sibyl.HttpFileDominator.mainactivity.repo | ||
|
||
/** | ||
* @author HUANGSHI-PC on 2020-03-06 0006. | ||
*/ | ||
class MainRepo { | ||
} |
34 changes: 34 additions & 0 deletions
34
app/src/main/java/com/sibyl/HttpFileDominator/mainactivity/view/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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.sibyl.HttpFileDominator.mainactivity.view | ||
|
||
import android.os.Build | ||
import android.os.Bundle | ||
import android.view.WindowManager | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.databinding.DataBindingUtil | ||
import androidx.lifecycle.ViewModelProviders | ||
import com.sibyl.HttpFileDominator.R | ||
import com.sibyl.HttpFileDominator.databinding.ActivityMainBinding | ||
import com.sibyl.HttpFileDominator.mainactivity.model.MainModel | ||
import com.sibyl.HttpFileDominator.mainactivity.repo.MainModelFactory | ||
import com.sibyl.HttpFileDominator.mainactivity.repo.MainRepo | ||
|
||
class MainActivity : AppCompatActivity() { | ||
|
||
val binding by lazy { DataBindingUtil.setContentView<ActivityMainBinding>(this, R.layout.activity_main) } | ||
|
||
val loginModel by lazy{ ViewModelProviders.of(this, MainModelFactory(MainRepo())).get(MainModel::class.java) } | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
window.setBackgroundDrawable(null) | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) | ||
super.onCreate(savedInstanceState) | ||
bind() | ||
|
||
} | ||
|
||
fun bind(){ | ||
binding.apply { | ||
|
||
} | ||
} | ||
} |
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,66 +1,73 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:background="@color/main_activity_background_color" | ||
android:layout_height="match_parent"> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
<data> | ||
|
||
<include | ||
android:id="@+id/toolbar" | ||
layout="@layout/toolbar" /> | ||
</data> | ||
|
||
<include | ||
android:id="@+id/link_layout" | ||
layout="@layout/link_layout" /> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout | ||
android:layout_width="match_parent" | ||
android:background="@color/main_activity_background_color" | ||
android:layout_height="match_parent"> | ||
|
||
<RelativeLayout | ||
android:id="@+id/containerLayout" | ||
android:layout_marginTop="-6dp" | ||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<include | ||
android:id="@+id/toolbar" | ||
layout="@layout/toolbar" /> | ||
|
||
<androidx.core.widget.NestedScrollView | ||
android:id="@+id/scrolling_information" | ||
<include | ||
android:id="@+id/link_layout" | ||
layout="@layout/link_layout" /> | ||
|
||
<RelativeLayout | ||
android:id="@+id/containerLayout" | ||
android:layout_marginTop="-6dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.google.android.flexbox.FlexboxLayout | ||
android:id="@+id/fileNameContainer" | ||
android:animateLayoutChanges="true" | ||
<androidx.core.widget.NestedScrollView | ||
android:id="@+id/scrolling_information" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:flexWrap="wrap" | ||
app:alignItems="flex_start" | ||
app:alignContent="flex_start" /> | ||
android:layout_height="match_parent"> | ||
|
||
<com.google.android.flexbox.FlexboxLayout | ||
android:id="@+id/clipboardContainer" | ||
android:animateLayoutChanges="true" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:flexWrap="wrap" | ||
app:alignItems="flex_start" | ||
app:alignContent="flex_start" /> | ||
<com.google.android.flexbox.FlexboxLayout | ||
android:id="@+id/fileNameContainer" | ||
android:animateLayoutChanges="true" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:flexWrap="wrap" | ||
app:alignItems="flex_start" | ||
app:alignContent="flex_start" /> | ||
|
||
<com.google.android.flexbox.FlexboxLayout | ||
android:id="@+id/clipboardContainer" | ||
android:animateLayoutChanges="true" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:flexWrap="wrap" | ||
app:alignItems="flex_start" | ||
app:alignContent="flex_start" /> | ||
|
||
</androidx.core.widget.NestedScrollView> | ||
</RelativeLayout> | ||
<!-- </RelativeLayout>--> | ||
</androidx.core.widget.NestedScrollView> | ||
</RelativeLayout> | ||
<!-- </RelativeLayout>--> | ||
|
||
</LinearLayout> | ||
</LinearLayout> | ||
|
||
<com.google.android.material.floatingactionbutton.FloatingActionButton | ||
android:id="@+id/fab" | ||
android:layout_gravity="right|bottom" | ||
android:tint="@color/white" | ||
android:src="@drawable/ic_add" | ||
android:layout_height="wrap_content" | ||
android:layout_width="wrap_content" | ||
android:layout_margin="24dp" | ||
app:layout_behavior="com.sibyl.HttpFileDominator.views.ScrollAwareFABBehavior" | ||
app:backgroundTint="@color/red" /> | ||
</androidx.coordinatorlayout.widget.CoordinatorLayout> | ||
<com.google.android.material.floatingactionbutton.FloatingActionButton | ||
android:id="@+id/fab" | ||
android:layout_gravity="right|bottom" | ||
android:tint="@color/white" | ||
android:src="@drawable/ic_add" | ||
android:layout_height="wrap_content" | ||
android:layout_width="wrap_content" | ||
android:layout_margin="24dp" | ||
app:layout_behavior="com.sibyl.HttpFileDominator.views.ScrollAwareFABBehavior" | ||
app:backgroundTint="@color/red" /> | ||
</androidx.coordinatorlayout.widget.CoordinatorLayout> | ||
</layout> |