-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
679 additions
and
245 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 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 |
---|---|---|
@@ -1,38 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android" | ||
package="com.github.lzyzsd.circleprogressexample" > | ||
xmlns:tools="http:https://schemas.android.com/tools" | ||
package="com.github.lzyzsd.circleprogressexample"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name=".MyActivity" | ||
android:label="@string/app_name" > | ||
android:name=".MyActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<action android:name="android.intent.action.MAIN"/> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".ViewPagerActivity" /> | ||
<activity android:name=".ViewPagerActivity"/> | ||
<activity | ||
android:name=".ItemListActivity" | ||
android:label="@string/title_item_list" > | ||
android:name=".ItemListActivity" | ||
android:label="@string/title_item_list"> | ||
</activity> | ||
<activity | ||
android:name=".ItemDetailActivity" | ||
android:label="@string/title_item_detail" | ||
android:parentActivityName=".ItemListActivity" > | ||
android:name=".ItemDetailActivity" | ||
android:label="@string/title_item_detail" | ||
android:parentActivityName=".ItemListActivity" tools:ignore="UnusedAttribute"> | ||
<meta-data | ||
android:name="android.support.PARENT_ACTIVITY" | ||
android:value="com.github.lzyzsd.circleprogressexample.ItemListActivity" /> | ||
android:name="android.support.PARENT_ACTIVITY" | ||
android:value="com.github.lzyzsd.circleprogressexample.ItemListActivity"/> | ||
</activity> | ||
<activity | ||
android:name=".ArcInFragment" | ||
android:label="@string/title_activity_arc_in_fragment" > | ||
android:name=".ArcInFragment" | ||
android:label="@string/title_activity_arc_in_fragment"> | ||
</activity> | ||
</application> | ||
|
||
</manifest> | ||
</manifest> |
17 changes: 11 additions & 6 deletions
17
example/src/main/java/com/github/lzyzsd/circleprogressexample/ArcInFragment.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
45 changes: 45 additions & 0 deletions
45
...ple/src/main/java/com/github/lzyzsd/circleprogressexample/CentralTextExampleActivity.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,45 @@ | ||
package com.github.lzyzsd.circleprogressexample; | ||
|
||
import android.content.Context; | ||
import android.support.v4.content.ContextCompat; | ||
import android.support.v7.app.ActionBarActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.EditText; | ||
import android.widget.Toast; | ||
|
||
import com.github.lzyzsd.circleprogress.ArcProgress; | ||
import com.github.lzyzsd.circleprogress.CircleProgress; | ||
import com.github.lzyzsd.circleprogress.DonutProgress; | ||
|
||
public class CentralTextExampleActivity extends ActionBarActivity { | ||
|
||
ArcProgress arcProgress; | ||
CircleProgress circleProgress; | ||
EditText editText; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_central_text_example); | ||
|
||
arcProgress = findViewById(R.id.arc_progress); | ||
arcProgress.setText("-50"); | ||
arcProgress.setSuffixText("°C"); | ||
arcProgress.setProgress(25); | ||
|
||
circleProgress = findViewById(R.id.donut_progress); | ||
circleProgress.setProgress(75); | ||
|
||
editText = findViewById(R.id.editText); | ||
} | ||
|
||
public void setCustomText(View view){ | ||
if(String.valueOf(editText.getText()) != null || !String.valueOf(editText.getText()).equals("")) { | ||
arcProgress.setText(String.valueOf(editText.getText())); | ||
circleProgress.setText(String.valueOf(editText.getText())); | ||
} else{ | ||
Toast.makeText(this, "Field should not be empty!", Toast.LENGTH_SHORT).show(); | ||
} | ||
} | ||
} |
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.