Skip to content

Commit ae482f6

Browse files
wintmainwosys
authored andcommitted
[foundation][refactor] Adjust files structure
1 parent 6762c48 commit ae482f6

19 files changed

+58
-56
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 wintmain
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.gesture
17+
package com.wintmain.foundation.ui.views.gesture
1818

1919
import android.graphics.Color
2020
import android.os.Bundle
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 wintmain
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.gesture
17+
package com.wintmain.foundation.ui.views.gesture
1818

1919
import android.annotation.SuppressLint
2020
import android.os.Bundle
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 wintmain
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.gesture
17+
package com.wintmain.foundation.ui.views.gesture
1818

1919
import android.os.Build.VERSION
2020
import android.view.GestureDetector.SimpleOnGestureListener
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 wintmain
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.layout
17+
package com.wintmain.foundation.ui.views.layout
1818

1919
import android.os.Bundle
2020
import android.view.View
@@ -28,55 +28,55 @@ import com.wintmain.foundation.databinding.ConstraintSetMainBinding
2828
name = "1. Centering Views",
2929
description = "水平或垂直居中子视图。",
3030
documentation = "",
31-
tags = ["android-samples", "constraint-layout"],
31+
tags = ["android-samples", "layout"],
3232
)
3333
class CenteringViewsFragment : Fragment(R.layout.constraintlayout_centering_views)
3434

3535
@Sample(
3636
name = "2. Basic arrangement",
3737
description = "排列子视图相对于其他视图的位置。",
3838
documentation = "",
39-
tags = ["android-samples", "constraint-layout"],
39+
tags = ["android-samples", "layout"],
4040
)
4141
class BasicArrangementFragment : Fragment(R.layout.constraintlayout_basic_arrangement)
4242

4343
@Sample(
4444
name = "3. Advanced arrangement",
4545
description = "更多排列选项。",
4646
documentation = "",
47-
tags = ["android-samples", "constraint-layout"],
47+
tags = ["android-samples", "layout"],
4848
)
4949
class AdvancedArrangementFragment : Fragment(R.layout.advanced_arrangement)
5050

5151
@Sample(
5252
name = "4. Aspect ratio",
53-
description = "指定子视图尺寸的纵横比(ratio)",
53+
description = "指定子视图尺寸的纵横比(ratio)",
5454
documentation = "",
55-
tags = ["android-samples", "constraint-layout"],
55+
tags = ["android-samples", "layout"],
5656
)
5757
class AspectRatioFragment : Fragment(R.layout.aspect_ratio)
5858

5959
@Sample(
6060
name = "5. Basic chains",
6161
description = "使用 chains 可以水平或垂直排列多个子视图。",
6262
documentation = "",
63-
tags = ["android-samples", "constraint-layout"],
63+
tags = ["android-samples", "layout"],
6464
)
6565
class BasicChainFragment : Fragment(R.layout.basic_chains)
6666

6767
@Sample(
6868
name = "6. Advanced chains",
6969
description = "使用 chains 可以水平或垂直排列多个子视图。",
7070
documentation = "",
71-
tags = ["android-samples", "constraint-layout"],
71+
tags = ["android-samples", "layout"],
7272
)
7373
class AdvancedChainsFragment : Fragment(R.layout.advanced_chains)
7474

7575
@Sample(
7676
name = "7. ConstraintSet",
7777
description = "使用“约束集”可以为所有子视图指定多个约束。",
7878
documentation = "",
79-
tags = ["android-samples", "constraint-layout"],
79+
tags = ["android-samples", "layout"],
8080
)
8181
class ConstraintSetFragment : Fragment(R.layout.constraint_set_main) {
8282

@@ -117,24 +117,24 @@ class ConstraintSetFragment : Fragment(R.layout.constraint_set_main) {
117117

118118
@Sample(
119119
name = "8. Guidelines",
120-
description = "使用水平或垂直基准线可以对子视图进行约束",
120+
description = "使用水平或垂直基准线可以对子视图进行约束",
121121
documentation = "",
122-
tags = ["android-samples", "constraint-layout"],
122+
tags = ["android-samples", "layout"],
123123
)
124124
class GuidelinesFragment : Fragment(R.layout.guidelines)
125125

126126
@Sample(
127127
name = "CardView",
128128
description = "创建卡片式布局",
129129
documentation = "",
130-
tags = ["android-samples"],
130+
tags = ["android-samples", "widget"],
131131
)
132132
class CardViewFragment : Fragment(R.layout.card_view)
133133

134134
@Sample(
135135
name = "LinearLayout",
136136
description = "线性布局",
137137
documentation = "",
138-
tags = ["android-samples", "linear-layout"],
138+
tags = ["android-samples", "layout"],
139139
)
140140
class LinearViewsFragment : Fragment(R.layout.linearlayout_view)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (c) 2021 The Android Open Source Project
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.layout.slidingpanelayout
17+
package com.wintmain.foundation.ui.views.layout.slidingpanelayout
1818

1919
import android.os.Bundle
2020
import android.view.LayoutInflater
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 wintmain
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.layout.slidingpanelayout
17+
package com.wintmain.foundation.ui.views.layout.slidingpanelayout
1818

1919
import android.os.Bundle
2020
import androidx.appcompat.app.AppCompatActivity
@@ -37,7 +37,7 @@ import com.wintmain.foundation.databinding.SlidingPanelMainBinding
3737
name = "SlidingPanelayout",
3838
description = "创建双窗格布局",
3939
documentation = "",
40-
tags = ["android-samples"],
40+
tags = ["android-samples", "layout"],
4141
)
4242
class SlidingPaneLayoutMain : AppCompatActivity() {
4343

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.wintmain.foundation.views.layout.slidingpanelayout
16+
package com.wintmain.foundation.ui.views.layout.slidingpanelayout
1717

1818
import com.wintmain.foundation.R
1919

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (c) 2021 The Android Open Source Project
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.layout.slidingpanelayout
17+
package com.wintmain.foundation.ui.views.layout.slidingpanelayout
1818

1919
import android.content.Context
2020
import android.view.LayoutInflater
@@ -24,9 +24,10 @@ import androidx.recyclerview.widget.ListAdapter
2424
import androidx.recyclerview.widget.RecyclerView
2525
import coil.load
2626
import com.wintmain.foundation.databinding.SportsListItemBinding
27+
import com.wintmain.foundation.ui.views.layout.slidingpanelayout.SportsAdapter.SportsViewHolder
2728

2829
class SportsAdapter(private val onItemClicked: (Sport) -> Unit) :
29-
ListAdapter<Sport, SportsAdapter.SportsViewHolder>(DiffCallback) {
30+
ListAdapter<Sport, SportsViewHolder>(DiffCallback) {
3031

3132
private lateinit var context: Context
3233

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (c) 2021 The Android Open Source Project
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.layout.slidingpanelayout
17+
package com.wintmain.foundation.ui.views.layout.slidingpanelayout
1818

1919
import com.wintmain.foundation.R
2020

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (c) 2021 The Android Open Source Project
2+
* Copyright 2023-2025 wintmain
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.wintmain.foundation.views.layout.slidingpanelayout
17+
package com.wintmain.foundation.ui.views.layout.slidingpanelayout
1818

1919
import android.os.Bundle
2020
import android.view.LayoutInflater

0 commit comments

Comments
 (0)