parent
3a79ba8aeb
commit
e3f364cdd9
@ -1,11 +1,35 @@ |
|||||||
package com.community.pocket.ui.register; |
package com.community.pocket.ui.register; |
||||||
|
|
||||||
|
import android.content.Intent; |
||||||
|
import android.os.Bundle; |
||||||
|
import android.view.View; |
||||||
|
import android.widget.Toast; |
||||||
|
|
||||||
|
import androidx.annotation.Nullable; |
||||||
|
|
||||||
import com.community.pocket.R; |
import com.community.pocket.R; |
||||||
|
import com.community.pocket.ui.BaseActivity; |
||||||
|
import com.community.pocket.ui.login.LoginActivity; |
||||||
|
|
||||||
import org.xutils.view.annotation.ContentView; |
import org.xutils.view.annotation.ContentView; |
||||||
|
import org.xutils.view.annotation.Event; |
||||||
|
|
||||||
@ContentView(R.layout.activity_register) |
@ContentView(R.layout.activity_register) |
||||||
public class RegisterActivity { |
public class RegisterActivity extends BaseActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
} |
||||||
|
|
||||||
|
@Event(value = R.id.register) |
||||||
|
private void register(View v) { |
||||||
|
Toast.makeText(this, getString(R.string.action_register), Toast.LENGTH_SHORT).show(); |
||||||
|
} |
||||||
|
|
||||||
|
@Event(value = R.id.back) |
||||||
|
private void back(View v) { |
||||||
|
startActivity(new Intent(this, LoginActivity.class)); |
||||||
|
finish(); |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,21 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout 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" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent"> |
||||||
|
|
||||||
|
<com.wuhenzhizao.titlebar.widget.CommonTitleBar |
||||||
|
android:id="@+id/titlebar" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toTopOf="parent" |
||||||
|
app:leftText="@string/app_name" |
||||||
|
app:leftType="textView" |
||||||
|
app:rightCustomView="@layout/titlebar_view" |
||||||
|
app:rightType="customView" |
||||||
|
app:titleBarColor="#2CE1CF" |
||||||
|
tools:leftText="@string/app_name" /> |
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -1,4 +1,7 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<resources> |
<resources> |
||||||
|
<dimen name="activity_horizontal_margin">16dp</dimen> |
||||||
|
<dimen name="activity_vertical_margin">16dp</dimen> |
||||||
<dimen name="size_8">8dp</dimen> |
<dimen name="size_8">8dp</dimen> |
||||||
|
<dimen name="size_50">50dp</dimen> |
||||||
</resources> |
</resources> |
@ -1,4 +1,7 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<resources> |
<resources> |
||||||
|
<dimen name="activity_horizontal_margin">16dp</dimen> |
||||||
|
<dimen name="activity_vertical_margin">16dp</dimen> |
||||||
<dimen name="size_8">8dp</dimen> |
<dimen name="size_8">8dp</dimen> |
||||||
|
<dimen name="size_50">50dp</dimen> |
||||||
</resources> |
</resources> |
Loading…
Reference in new issue