-
-
Notifications
You must be signed in to change notification settings - Fork 327
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 #21 from anastr/version-1.1.4
Version 1.1.4
- Loading branch information
Showing
47 changed files
with
2,104 additions
and
1,056 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
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
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
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/github/anastr/speedview/lineargauge/ImageLinearGaugeActivity.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,54 @@ | ||
package com.github.anastr.speedview.lineargauge; | ||
|
||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.SeekBar; | ||
import android.widget.TextView; | ||
|
||
import com.github.anastr.speedview.R; | ||
import com.github.anastr.speedviewlib.ImageLinearGauge; | ||
|
||
import java.util.Locale; | ||
|
||
public class ImageLinearGaugeActivity extends AppCompatActivity { | ||
|
||
ImageLinearGauge imageLinearGauge; | ||
SeekBar seekBar; | ||
Button ok; | ||
TextView textSpeed; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_image_linear_gauge); | ||
|
||
imageLinearGauge = (ImageLinearGauge) findViewById(R.id.gauge); | ||
seekBar = (SeekBar) findViewById(R.id.seekBar); | ||
ok = (Button) findViewById(R.id.ok); | ||
textSpeed = (TextView) findViewById(R.id.textSpeed); | ||
|
||
ok.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
imageLinearGauge.speedTo(seekBar.getProgress()); | ||
} | ||
}); | ||
|
||
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { | ||
@Override | ||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { | ||
textSpeed.setText(String.format(Locale.getDefault(), "%d", progress)); | ||
} | ||
|
||
@Override | ||
public void onStartTrackingTouch(SeekBar seekBar) { | ||
} | ||
|
||
@Override | ||
public void onStopTrackingTouch(SeekBar seekBar) { | ||
} | ||
}); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/github/anastr/speedview/lineargauge/ProgressiveGaugeActivity.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,54 @@ | ||
package com.github.anastr.speedview.lineargauge; | ||
|
||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.SeekBar; | ||
import android.widget.TextView; | ||
|
||
import com.github.anastr.speedview.R; | ||
import com.github.anastr.speedviewlib.ProgressiveGauge; | ||
|
||
import java.util.Locale; | ||
|
||
public class ProgressiveGaugeActivity extends AppCompatActivity { | ||
|
||
ProgressiveGauge progressiveGauge; | ||
SeekBar seekBar; | ||
Button ok; | ||
TextView textSpeed; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_progressive_gauge); | ||
|
||
progressiveGauge = (ProgressiveGauge) findViewById(R.id.gauge); | ||
seekBar = (SeekBar) findViewById(R.id.seekBar); | ||
ok = (Button) findViewById(R.id.ok); | ||
textSpeed = (TextView) findViewById(R.id.textSpeed); | ||
|
||
ok.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
progressiveGauge.speedTo(seekBar.getProgress()); | ||
} | ||
}); | ||
|
||
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { | ||
@Override | ||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { | ||
textSpeed.setText(String.format(Locale.getDefault(), "%d", progress)); | ||
} | ||
|
||
@Override | ||
public void onStartTrackingTouch(SeekBar seekBar) { | ||
} | ||
|
||
@Override | ||
public void onStopTrackingTouch(SeekBar seekBar) { | ||
} | ||
}); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.