From 3f508b3a2727d3ff98713146f3ca7ae57b19eb28 Mon Sep 17 00:00:00 2001 From: mjaillot Date: Wed, 4 Mar 2020 19:32:41 +0100 Subject: [PATCH 1/2] First draft of the profile page --- app/src/main/AndroidManifest.xml | 1 + .../java/com/h/pixeldroid/MainActivity.kt | 10 +- .../java/com/h/pixeldroid/ProfileActivity.kt | 104 ++++++++++++++ app/src/main/res/layout/activity_main.xml | 8 ++ app/src/main/res/layout/activity_profile.xml | 129 ++++++++++++++++++ 5 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/com/h/pixeldroid/ProfileActivity.kt create mode 100644 app/src/main/res/layout/activity_profile.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2d63dcda..c016c997 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,6 +9,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> + diff --git a/app/src/main/java/com/h/pixeldroid/MainActivity.kt b/app/src/main/java/com/h/pixeldroid/MainActivity.kt index 4631f819..50d4f4ea 100644 --- a/app/src/main/java/com/h/pixeldroid/MainActivity.kt +++ b/app/src/main/java/com/h/pixeldroid/MainActivity.kt @@ -1,8 +1,11 @@ package com.h.pixeldroid +import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log +import android.view.View +import android.widget.Button import com.h.pixeldroid.api.PixelfedAPI import com.h.pixeldroid.objects.Status import retrofit2.Call @@ -17,6 +20,11 @@ class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) - } + val button = findViewById