Rename main activity

This commit is contained in:
Ngô Ngọc Đức Huy 2021-02-10 21:10:59 +07:00
parent 40c7d21abb
commit bde3ebda2c
Signed by: huyngo
GPG Key ID: 904AF1C7CDF695C3
5 changed files with 34 additions and 9 deletions

View File

@ -10,7 +10,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".ScrollingActivity"
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
@ -21,4 +21,4 @@
</activity>
</application>
</manifest>
</manifest>

View File

@ -1,3 +1,21 @@
/* MainActivity for user profile
* Copyright (C) 2020 Ngô Ngọc Đức Huy
* This file is part of GenWord.
*
* GenWord is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GenWord is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with GenWord. If not, see <https://www.gnu.org/licenses/>.
*/
package ht.sr.huyngo.genword
import android.os.Bundle
@ -7,8 +25,9 @@ import com.google.android.material.snackbar.Snackbar
import androidx.appcompat.app.AppCompatActivity
import android.view.Menu
import android.view.MenuItem
import android.view.View
class ScrollingActivity : AppCompatActivity() {
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -37,4 +56,9 @@ class ScrollingActivity : AppCompatActivity() {
else -> super.onOptionsItemSelected(item)
}
}
}
/**/
fun generate(view: View) {
//
}
}

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ScrollingActivity">
tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
@ -44,4 +44,4 @@
app:layout_anchorGravity="bottom|end"
app:srcCompat="@android:drawable/ic_dialog_email" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".ScrollingActivity"
tools:context=".MainActivity"
tools:showIn="@layout/activity_scrolling">
<LinearLayout
@ -46,6 +46,7 @@
android:text="@string/generate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="generate"
/>

View File

@ -1,10 +1,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="ht.sr.huyngo.genword.ScrollingActivity">
tools:context="ht.sr.huyngo.genword.MainActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
</menu>
</menu>