加入版號顯示
This commit is contained in:
parent
bd620a7137
commit
9c095fa4f1
@ -9,6 +9,7 @@ import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.view.View
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import com.ray650128.floatingwindow.BuildConfig
|
||||
import com.ray650128.floatingwindow.utils.FloatingWindowHelperUtils
|
||||
import com.ray650128.floatingwindow.databinding.ActivityMainBinding
|
||||
|
||||
@ -58,6 +59,8 @@ class MainActivity : AppCompatActivity() {
|
||||
val intent = Intent(mContext, SettingActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
textVersion.text = BuildConfig.VERSION_NAME
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -89,4 +89,13 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textVersion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -20,4 +20,5 @@ kotlin.code.style=official
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.nonTransitiveRClass=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
Loading…
Reference in New Issue
Block a user