Skip to content

Commit

Permalink
问题反馈,关于界面添加
Browse files Browse the repository at this point in the history
  • Loading branch information
firelotus committed Dec 31, 2017
1 parent 13fab31 commit b5c6240
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.os.Handler;

import com.blankj.utilcode.util.Utils;
import com.firelotus.meteoritelibrary.tools.AppStatusTracker;
import com.firelotus.meteoritelibrary.utils.ExceptionWriter;

/**
Expand Down Expand Up @@ -34,7 +33,7 @@ public void onCreate() {
super.onCreate();
mContext = this;
mHandler = new Handler();
AppStatusTracker.init(this);
//AppStatusTracker.init(this);
Utils.init(this);
exceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(handler);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<activity android:name=".ui.WebActivity"
android:launchMode="singleTop"/>
<activity android:name=".ui.ImageViewerActivity" android:launchMode="singleTop"/>
<activity android:name=".ui.FeedBackActivity" />
</application>

</manifest>
67 changes: 67 additions & 0 deletions app/src/main/java/com/firelotus/meteorite/ui/FeedBackActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.firelotus.meteorite.ui;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.widget.TextView;

import com.firelotus.meteorite.R;
import com.firelotus.meteoritelibrary.base.BaseActivity;

import butterknife.BindView;

/**
* Created by firelotus on 2017/12/31.
*/

public class FeedBackActivity extends BaseActivity implements View.OnClickListener{
@BindView(R.id.tv_issues)
public TextView issues;

@BindView(R.id.tv_qq)
public TextView qq;

@BindView(R.id.tv_email)
public TextView email;

public static void start(Context mContext) {
Intent intent = new Intent(mContext, FeedBackActivity.class);
mContext.startActivity(intent);
}
@Override
protected int getLayoutId() {
return R.layout.activity_feedback;
}

@Override
protected void initView() {
setToolBarTitle("问题反馈");
issues.setOnClickListener(this);
qq.setOnClickListener(this);
email.setOnClickListener(this);
}

@Override
protected void initData() {

}

@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.tv_issues:
WebActivity.loadUrl(v.getContext(),"https://github.com/firelotus/Meteorite/issues","Issues");
break;
case R.id.tv_qq:
String url = "mqqwpa://im/chat?chat_type=wpa&uin=271512473";
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
break;
case R.id.tv_email:
Intent data = new Intent(Intent.ACTION_SENDTO);
data.setData(Uri.parse("mailto:[email protected]"));
startActivity(data);
break;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.firelotus.meteorite.R;
Expand All @@ -27,11 +25,6 @@ public static void start(Context context,String url){
context.startActivity(intent);
}

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

@Override
protected int getLayoutId() {
return R.layout.activity_imageviewer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_home) {
tv_content.setText("home");
} else if (id == R.id.nav_about) {
tv_content.setText("about");
AboutActivity.start(getApplicationContext());
Expand All @@ -144,7 +143,7 @@ public boolean onNavigationItemSelected(MenuItem item) {
} else if (id == R.id.nav_set) {
tv_content.setText("set");
} else if (id == R.id.nav_comments) {
tv_content.setText("comments");
FeedBackActivity.start(getApplicationContext());
} else if (id == R.id.nav_logout) {
finish();
}
Expand Down
37 changes: 31 additions & 6 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
>
<ImageView
android:layout_width="230px"
android:layout_height="230px"
android:layout_gravity="center"
android:src="@drawable/head"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前版本V1.0"/>
</LinearLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="about"/>
</LinearLayout>
android:layout_height="wrap_content"
android:layout_below="@+id/ll_version"
android:layout_marginTop="60px"
android:gravity="center"
android:text="O(∩_∩)O图标还不能自给自足,见谅!很高兴您能关注,如果感到满意就Star一下吧,由于时间有限,部分功能还在完善中..."/>

</RelativeLayout>
85 changes: 85 additions & 0 deletions app/src/main/res/layout/activity_feedback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Issues"
android:textColor="@color/colorTabText"
android:textSize="13sp" />


<TextView
android:id="@+id/tv_issues"
android:layout_width="match_parent"
android:layout_height="50dp"
android:clickable="true"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="12dp"
android:text="Meteorite"
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/cardview_dark_background"
android:paddingLeft="10px"
android:paddingRight="10px"/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="联系我"
android:textColor="@color/colorTabText"
android:textSize="13sp" />

<TextView
android:id="@+id/tv_qq"
android:layout_width="match_parent"
android:layout_height="50dp"
android:clickable="true"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="12dp"
android:text="QQ"
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/cardview_dark_background"
android:paddingLeft="10px"
android:paddingRight="10px"/>
<TextView
android:id="@+id/tv_email"
android:layout_width="match_parent"
android:layout_height="50dp"
android:clickable="true"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="12dp"
android:text="Email"
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/cardview_dark_background"
android:paddingLeft="10px"
android:paddingRight="10px"/>
</LinearLayout>
</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/menu/activity_main_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<item
android:id="@+id/nav_set"
android:icon="@drawable/set"
android:title="设置" />
android:title="设置"
android:visible="false"/>
<item
android:id="@+id/nav_about"
android:icon="@drawable/information"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<string name="navigation_drawer_close">Close navigation drawer</string>

<string name="action_settings">Settings</string>
<string name="email">firelotus@126.com</string>
<string name="email">271512473@qq.com</string>
<string name="name">Firelotus</string>
</resources>

0 comments on commit b5c6240

Please sign in to comment.