I can not make rating bar in android studio - ratingbar

How to make rating bar in android studio, perhaps it can show the sample of xml and also the code(main.activity)?

if you new for android Studio then do not worry about it.
google officially go on android studio.
buy the way you want android Studio example with source of xml file in main activity.
First How to add?
1. In your build.gradle add latest appcompat library.
dependencies {
compile 'com.android.support:appcompat-v7:X.X.X' // where X.X.X version
}
Make your activity extend android.support.v7.app.AppCompatActivity.
public class MainActivity extends AppCompatActivity {
...
}
Declare your RatingBar inside any layout.xml file.
android:rating="3.5"
android:rating="3.5"
android:stepSize="0.5"
android:numStars="5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
Android Rating Bar Example
I am developing all material design stuffs for newbie developers so they can learn easly Android.. this is my site helping you how to create MATERIAL DESIGN STUFF'S in Android..
And for Rating Bar with Material Design this may be helps you http://exandroidstudio.blogspot.in/2015/11/rating-bar-material-design-tips.html

Related

How to create a Kotlin console application with Gradle in Intellij IDEA

I found this tutorial from JetBrains: https://www.jetbrains.com/help/idea/create-your-first-kotlin-app.html?section=Gradle%20Kotlin
It is dated August 19th, 2020.
I am using the same IntelliJ IDEA version as in their documentation: 2020.2.
However, my project creation wizard looks quite different from theirs.
They provide this screenshot:
But for me, it looks like this:
and when I click on Next:
I don't see where I can choose the Console Application template, or Gradle.
I found a second tutorial - https://kotlinlang.org/docs/tutorials/jvm-get-started.html , which shows yet a third variation of the New Project wizard:
Are the tutorials out of date? Am I doing anything wrong? How do I create a Kotlin project, based on a console application template, with Gradle?
The wizard you have seems to be obsolete now. There was a brand-new one, released as a part of Kotlin 1.4 recently(see here). Most probably, the problem is caused by the Kotlin IDE plugin being outdated or something. Please try to delete in and re-install using the Preferences -> Plugins menu. Comment here with the results, please. I'd like to know if this would help.
Indeed it's quite weird, I've never seen the dialog to look like yours (mine looks like the one in the tutorials). However, choosing the template doesn't do anything special - it simply creates the main file, which you can do so yourself.
So create a new project with the "JVM/IDEA" option. If it already opens up a main.kt file, you don't need to do anything else. If it didn't, look in the src folder - you should see a folder named main with a folder named kotlin (with a blue icon instead of grey) inside - here's where you wanna create your main file (right click -> new kotlin file/class -> main.kt and make it a file, not a class). Finally, put this in the file:
fun main(args: Array<String>) {
println("Hello world!")
}
Note: if you don't have a kotlin folder, create the file in the folder with the blue icon (might even be src). Also, if this doesn't use Gradle (for some reason), create a Gradle project instead, and at the "Additional libraries and frameworks" option, uncheck Java and check Kotlin, then continue with creating main.kt if it isn't created.
You may create a Kotlin + gradle project from the terminal:
$mkdir myProject; cd myProject; gradle init
follow the tutorial.
And then start the Intellij & open the dir
You're good to go
Same process like this
The same happened to me but I figured out how to fix it:
Just disable Material Theme UI.

How to contribute a Label to an Eclipse RCP 3.X Application status-bar?

Im working on a new eclipse bundle (Eclipse RCP Legacy mixed mode) that must contribute some information to our applications status-bar (that one on right bottom corner).
The class that extends ActionBarAdvisor is in another bundle and cant be edited by me. So just an overriding of protected void fillStatusLine(IStatusLineManager statusLine) in that class is not an option for me.
I need to contribute directly to the status-bar out of my new bundle. Me new bundle has a .e4xmi file (remember my rcp application bundle dont have any .e4xmi file ) and I want to create a model fragment in my bundle and contribute to the status bar. Here my problem starts, I dont know what to type in into Extended Element-ID, Feature Name and so on...

"The type or namespace name 'App' could not be found" Xamarin Forms

I am trying to create a simple app in Xamarin Android with Xamarin Forms using Visual Studio, however I keep getting this error everytime I try to build. I have double checked my references which should contain the Portable project, as well as made sure I have the latest version of Xamarin.Forms. What could I still be missing that would give this error?
using System;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using App2;
using Xamarin.Forms.Platform.Android;
namespace App2.Droid
{
[Activity(Label = "App2", Icon = "#drawable/icon", MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity :
global::Xamarin.Forms.Platform.Android.FormsApplicationActivity // superclass new in 1.3
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App()); // method is new in 1.3
}
}
}
In my case, I found there is a bug with Visual Studio 2017 when making a cross platform Xamarin Form app with the generated code if there is a dash in the filename.
It looks like it tries to snake case the title and then complains about not finding that file.
For example, for "my-project", it starts looking for "my_project" in some areas of the generated code.
Using a project name with no symbols seems to solve the issue.
If you're still having issues check to see that the PCL project is referenced under the references in the solution explore
the refrences option in the solution explore
Right click on the references option and click add reference.
in the dialogue box, select the PCL project and click okay.
this should solve the error
Found the source of the error! If anyone else is struggling, try updating Xamarin.Forms using NuGet Packages for Solution. I was only using the Package Manager Console which was not giving me the latest version.
Check whether the namespace you defined in pcl under which the class App() is created is defined in Android project. For example, If your pcl class App() is present under the namespace called App2, then you need to add this namespace in Android project as follows,
using App2;
Check this out if the problem is still not resolved :
Go to
project -> Reference - right click and select -.> Add reference -> from left side
select Project -> solution -> then (check ) select Project name --> OK
finish
I was renaming the projects of the solution and had this same error. What I have done is delete the reference to the .Net Standard project and readded with the new name to the Android project.
My case is really rare but I had the same issue and the problem was that I referenced two pcl projects that referenced Xamarin.Forms (one standard shared project and another my custom library with UI controls). Removing dependency to the second one solved the problem.
This answer is not related to Xamarin, but might help others in the future seeing the same error message. This was an ASP.NET 5.0 Blazor Web Assmebly project and I was developing using Visual Studio for Mac.
I got this error when I had renamed a project from Foo to FooBar.
It turns out, VS did not refactor the namespaces in any classes I created, so the root namespace was left as Foo, which was where the startup Program class was, yet the framework was searching for the App.razor file in the project root, which had been renamed to FooBar.
To fix this, I simply renamed the namespace of the Program class from Foo to FooBar.
In my case, the android and iOS projects could not find the PCL.
I had to import the PCL as a project into Android and iOS. Rebuild solution and you should be fine!

How to make a custom Class file part of Xcode? (I.E. importable from any new project without having to copy the class)

As the title says, I wanna be able to import a custom class of mine from any new project. So for example, if I have a class called LAView, I wanna be able to type #import "LAView.h" from any new project without actually having to copy LAView.h and LAView.m into the project itself. Is that possible? :)
Create a framework, copy the finished product into /Applications/Xcode.app/Contents/Developer/Library/Frameworks and /Library/Frameworks/
This way your framework will be visible and available in any Xcode project and you can access it like any other framework from the Xcode frameworks list.
NOTE: When you edit your framework you will have to copy the new version into both these locations again. You can automate this using BASH scripts run from the Terminal (if you do this be careful!).

JavaFX vertical slider

I'm exploring JavaFX and I must say I'm little disappointed with the lack of learning material. I'm rookie to JavaFX but I have some experience with Swing.
How can I place the slider vertically?
And one more question,I want the Thumb to be draggable only to the Tick marks,not in the intermediate space,how can I achieve that?
How can I place the slider vertically?
Use setOrientation
slider.setOrientation(Orientation.VERTICAL);
I want the Thumb to be draggable only to the Tick marks,not in the intermediate space,how can I achieve that?
Use setSnapToTicks after setting an appropriate tick unit, count and block increment.
slider.setMajorTickUnit(0.25f);
slider.setMinorTickCount(1);
slider.setBlockIncrement(0.125f);
slider.setSnapToTicks(true);
Sample app:
import static javafx.application.Application.launch;
import javafx.application.*;
import javafx.event.*;
import javafx.geometry.Orientation;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class VerticalSliderSample extends Application {
#Override public void start(Stage stage) {
Slider slider = new Slider(0, 1, 0.5);
slider.setShowTickMarks(true);
slider.setShowTickLabels(true);
slider.setMajorTickUnit(0.25f);
slider.setMinorTickCount(1);
slider.setBlockIncrement(0.125f);
slider.setSnapToTicks(true);
slider.setOrientation(Orientation.VERTICAL);
VBox layout = new VBox(10);
layout.setStyle("-fx-background-color: cornsilk; -fx-padding: 10;");
layout.getChildren().setAll(slider);
stage.setScene(new Scene(layout));
stage.show();
}
public static void main(String[] args) { launch(args); }
}
I'm exploring JavaFX and I must say I'm little disappointed with the luck of learning material.
Email (constructive) feedback on Oracle developed JavaFX documentation to:
jfx-docs-feedback_ww#oracle.com
With Java 8 and with it JavaFX 8 and its corresponding SceneBuilder coming (at this time of post its still Java 7 GA with SceneBuilder 2.2), people should get more familiar using it. It is a powerful tool for people who don't know each special attribute from its hat off and want to practice the Inversion of Control principle the new JavaFX and its FXMLs offer us.
Here is an example out of one of my projects to show the most popular
properties on each Node
Though I can sometimes understand you, for being frustrated especially if some new features come out, that some higher class examples what this Node can do and maybe find it easier, but as a programmer you need to learn to work with the corresponding API. It would be nice to have a part of each API documentation like in the PHP community where you can maintain it as a wiki.