Skip to content

Commit

Permalink
add enable debug warning
Browse files Browse the repository at this point in the history
  • Loading branch information
SiberiaDante committed Aug 31, 2017
1 parent 7c4b1df commit f83e101
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion customapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:theme="@style/AppThemeA"
tools:replace="android:icon,android:theme,android:label">
<activity android:name=".ui.activity.MainActivity">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import android.util.Log;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.RadioGroup;
import android.widget.Toast;

Expand Down Expand Up @@ -85,6 +88,21 @@ protected void initData() {
}


@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_setting, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {

}
return super.onOptionsItemSelected(item);

}

@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId != R.id.rb_mine) {
Expand Down Expand Up @@ -178,6 +196,7 @@ private void exitDoubleClick() {
System.exit(0);
}
}

private void getNetData() {
RetrofitManager.getInstance().createReq(ApiService.class)
.questionApi(Constants.ACCESS_TOKEN, Constants.METHOD_GET)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import android.os.Bundle;
import android.util.Log;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;

import com.siberiadante.custom.R;
import com.siberiadante.lib.util.ToastUtil;
Expand Down Expand Up @@ -34,4 +38,5 @@ protected void onCreateViewLazy(Bundle savedInstanceState) {
ToastUtil.toast("第一个页面");
Log.d(TAG, "onCreateViewLazy: FragmentOne");
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions customapp/src/main/res/menu/menu_setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item
android:icon="@drawable/setting_right_top_black"
android:orderInCategory="100"
android:title="设置"
android:visible="true" />
<item
android:icon="@drawable/setting_right_top_black"
android:title="设置" />
<item
android:icon="@drawable/ic_back"
app:showAsAction="always"
android:title="设置"
android:visible="true" />
</menu>
8 changes: 8 additions & 0 deletions customapp/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppThemeA" parent="Theme.AppCompat.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="Radio_Btn_Style">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">match_parent</item>
Expand Down

0 comments on commit f83e101

Please sign in to comment.