-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from cryptape/develop
Develop
- Loading branch information
Showing
303 changed files
with
8,385 additions
and
3,375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
app/src/main/java/org/nervos/neuron/activity/AboutUsActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package org.nervos.neuron.activity; | ||
|
||
import android.content.pm.PackageManager; | ||
import android.os.Build; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import org.nervos.neuron.R; | ||
import org.nervos.neuron.custom.SettingButtonView; | ||
import org.nervos.neuron.custom.TitleBar; | ||
import org.nervos.neuron.service.HttpUrls; | ||
|
||
/** | ||
* Created by 包俊 on 2018/7/30. | ||
*/ | ||
public class AboutUsActivity extends NBaseActivity { | ||
|
||
private TextView versionText; | ||
private TitleBar title; | ||
private SettingButtonView sourceCodeSBV, serverPrivateSBV, NervosSBV, InfuraSBV, openSeaSBV; | ||
|
||
@Override | ||
protected int getContentLayout() { | ||
return R.layout.activity_about_us; | ||
} | ||
|
||
@Override | ||
protected void initView() { | ||
versionText = findViewById(R.id.app_version); | ||
sourceCodeSBV = findViewById(R.id.sbv_source_code); | ||
serverPrivateSBV = findViewById(R.id.sbv_server_private); | ||
NervosSBV = findViewById(R.id.sbv_nervos_network); | ||
InfuraSBV = findViewById(R.id.sbv_infura); | ||
openSeaSBV = findViewById(R.id.sbv_open_sea); | ||
title = findViewById(R.id.title); | ||
} | ||
|
||
@Override | ||
protected void initAction() { | ||
initListener(); | ||
} | ||
|
||
@Override | ||
protected void initData() { | ||
try { | ||
String versionName = getPackageManager() | ||
.getPackageInfo(getPackageName(), 0).versionName; | ||
versionText.setText(String.format("V %s", versionName)); | ||
} catch (PackageManager.NameNotFoundException e) { | ||
e.printStackTrace(); | ||
} | ||
title.setLeftImage(R.drawable.ic_toptitle_back_white); | ||
} | ||
|
||
private void initListener() { | ||
sourceCodeSBV.setOpenListener(() -> { | ||
SimpleWebActivity.gotoSimpleWeb(AboutUsActivity.this, HttpUrls.SOURCE_CODE_GITHUB_URL); | ||
}); | ||
serverPrivateSBV.setOpenListener(() -> { | ||
SimpleWebActivity.gotoSimpleWeb(AboutUsActivity.this, HttpUrls.PRODUCT_AGREEMENT_URL); | ||
}); | ||
NervosSBV.setOpenListener(() -> { | ||
SimpleWebActivity.gotoSimpleWeb(AboutUsActivity.this, HttpUrls.NERVOS_NETWORK); | ||
}); | ||
InfuraSBV.setOpenListener(() -> { | ||
SimpleWebActivity.gotoSimpleWeb(AboutUsActivity.this, HttpUrls.INFURA); | ||
}); | ||
openSeaSBV.setOpenListener(() -> { | ||
SimpleWebActivity.gotoSimpleWeb(AboutUsActivity.this, HttpUrls.OPEN_SEA); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.