Skip to content

Commit

Permalink
M.A.O: Introduce About Layout
Browse files Browse the repository at this point in the history
Layout for description app include with source code and release link
  • Loading branch information
Nicklas373 committed May 15, 2019
1 parent d66eeb4 commit 6151f6a
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 28 deletions.
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.hana.mao">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand Down
34 changes: 33 additions & 1 deletion app/src/main/java/com/hana/mao/about.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,56 @@
package com.hana.mao;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

public class about extends Fragment {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActivity().setTitle("About App");
getActivity().setTitle("About");
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_about, container, false);

}

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);

ImageView imageView = (ImageView) view.findViewById(R.id.git);
imageView.setOnClickListener(new View.OnClickListener() {

public void onClick(View v)
{
Uri uri = Uri.parse("https://github.com/Nicklas373/M.A.O");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});

ImageView git_dl = (ImageView) view.findViewById(R.id.git_dl);
git_dl.setOnClickListener(new View.OnClickListener() {

public void onClick(View v)
{
Uri uri = Uri.parse("https://github.com/Nicklas373/M.A.O/releases");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});
}
}
5 changes: 3 additions & 2 deletions app/src/main/java/com/hana/mao/audio_conf.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.Switch;
import android.widget.Toast;
Expand All @@ -20,11 +21,11 @@ public class audio_conf extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setContentView(R.layout.activity_audio_conf);

setTitle("Kernel Audio Configuration");

uhqa = findViewById(R.id.uhqa);
hph = findViewById(R.id.hph);
amp = findViewById(R.id.amp);
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/hana/mao/audio_stats.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
Expand All @@ -20,11 +21,11 @@ public class audio_stats extends AppCompatActivity {
TextView sr,bd,fl,dr,o,bc;

protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setContentView(R.layout.activity_audio_stats);

setTitle("Kernel Audio Status");

Clean();
MediaFlinger();
HiRes_Detect();
Expand Down
Binary file added app/src/main/res/drawable-v24/git.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-v24/git_dl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-v24/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 27 additions & 8 deletions app/src/main/res/layout/activity_audio_conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
android:layout_height="190dp"
app:cardUseCompatPadding="true"
app:cardElevation="0dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:gravity="top"
app:contentPaddingTop="0dp"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down Expand Up @@ -45,8 +47,10 @@

<android.support.v7.widget.CardView
android:id="@+id/cv_uhqa"
android:layout_width="410dp"
android:layout_width="384dp"
android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -67,7 +71,7 @@
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginVertical="0dp"
android:layout_marginLeft="0dp"
android:layout_marginLeft="5dp"
android:gravity="top"
android:textAllCaps="false"
android:text="@string/uhqa_text"
Expand All @@ -80,6 +84,7 @@
android:layout_width="365dp"
android:layout_height="120dp"
android:layout_marginVertical="30dp"
android:layout_marginLeft="5dp"
android:text="@string/uhqa_desc"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="#000000"
Expand All @@ -91,7 +96,10 @@

<android.support.v7.widget.CardView
android:id="@+id/cv_hph"
android:layout_width="410dp"
app:cardPreventCornerOverlap="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="384dp"
android:layout_height="100dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
Expand All @@ -113,7 +121,7 @@
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginVertical="0dp"
android:layout_marginLeft="0dp"
android:layout_marginLeft="5dp"
android:gravity="top"
android:textAllCaps="false"
android:text="@string/hph_text"
Expand All @@ -126,6 +134,7 @@
android:layout_width="365dp"
android:layout_height="120dp"
android:layout_marginVertical="30dp"
android:layout_marginLeft="5dp"
android:text="@string/hph_desc"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="#000000"
Expand All @@ -135,7 +144,10 @@

<android.support.v7.widget.CardView
android:id="@+id/cv_amp"
android:layout_width="410dp"
app:cardPreventCornerOverlap="true"
android:layout_width="384dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_height="100dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
Expand All @@ -157,7 +169,7 @@
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginVertical="0dp"
android:layout_marginLeft="0dp"
android:layout_marginLeft="5dp"
android:gravity="top"
android:textAllCaps="false"
android:text="@string/amp_text"
Expand All @@ -170,6 +182,7 @@
android:layout_width="365dp"
android:layout_height="120dp"
android:layout_marginVertical="30dp"
android:layout_marginLeft="5dp"
android:text="@string/amp_desc"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="#000000"
Expand All @@ -179,8 +192,11 @@

<android.support.v7.widget.CardView
android:id="@+id/cv_impedance"
android:layout_width="410dp"
android:layout_width="384dp"
android:layout_height="100dp"
app:cardPreventCornerOverlap="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -201,7 +217,7 @@
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginVertical="0dp"
android:layout_marginLeft="0dp"
android:layout_marginLeft="5dp"
android:gravity="top"
android:textAllCaps="false"
android:text="@string/impedance_text"
Expand All @@ -214,6 +230,7 @@
android:layout_width="365dp"
android:layout_height="120dp"
android:layout_marginVertical="30dp"
android:layout_marginLeft="5dp"
android:text="@string/impedance_desc"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="#000000"
Expand All @@ -229,6 +246,8 @@
android:background="@drawable/ripple_effect"
android:text="@string/menu_back"
android:textAllCaps="false"
android:layout_marginLeft="125dp"
android:layout_marginRight="125dp"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="#ffffff"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/res/layout/activity_audio_stats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#424242"
android:theme="@style/AppTheme.NoActionBar"
tools:context=".audio_stats">

<android.support.v7.widget.CardView
Expand Down Expand Up @@ -36,16 +37,19 @@
android:text="@string/audio_status_title"
android:textAlignment="center"
android:textSize="24sp"
android:layout_marginVertical="85dp"
android:layout_marginVertical="65dp"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="#ffffff" />
</RelativeLayout>
</android.support.v7.widget.CardView>

<android.support.v7.widget.CardView
android:id="@+id/cv_main"
android:layout_width="410dp"
android:layout_width="386dp"
android:layout_height="360dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
app:cardCornerRadius="12dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
Loading

0 comments on commit 6151f6a

Please sign in to comment.